4 changed files with 122 additions and 0 deletions
@ -0,0 +1,8 @@
|
||||
FROM nginx:latest |
||||
|
||||
##USER www-data |
||||
|
||||
WORKDIR /usr/share/nginx/html |
||||
|
||||
COPY --chown=www-data:www-data --chmod=755 . . |
||||
|
@ -0,0 +1,75 @@
|
||||
pipeline { |
||||
|
||||
agent none |
||||
|
||||
options { |
||||
|
||||
disableConcurrentBuilds(abortPrevious: true) |
||||
|
||||
buildDiscarder(logRotator(numToKeepStr: '1')) |
||||
} |
||||
|
||||
stages { |
||||
|
||||
stage('docker compose build') { |
||||
|
||||
agent { |
||||
|
||||
label "xochi" |
||||
|
||||
} |
||||
|
||||
steps { |
||||
|
||||
dir('.') { |
||||
|
||||
sh 'docker compose build' |
||||
|
||||
} |
||||
|
||||
} |
||||
|
||||
} |
||||
|
||||
stage('docker compose push') { |
||||
|
||||
agent { |
||||
|
||||
label "xochi" |
||||
|
||||
} |
||||
|
||||
steps { |
||||
|
||||
dir('.') { |
||||
|
||||
sh 'docker compose push' |
||||
|
||||
} |
||||
|
||||
} |
||||
|
||||
} |
||||
|
||||
stage('prune') { |
||||
|
||||
agent { |
||||
|
||||
label "xochi" |
||||
|
||||
} |
||||
|
||||
steps { |
||||
|
||||
dir('.') { |
||||
|
||||
sh 'docker system prune -a -f' |
||||
|
||||
} |
||||
|
||||
} |
||||
|
||||
} |
||||
|
||||
}} |
||||
|
@ -0,0 +1,19 @@
|
||||
#!/bin/bash |
||||
|
||||
## |
||||
|
||||
reset |
||||
|
||||
clear |
||||
|
||||
## |
||||
|
||||
set -e |
||||
|
||||
set -x |
||||
|
||||
## |
||||
|
||||
docker compose down --remove-orphans |
||||
|
||||
docker compose up --build -d |
Loading…
Reference in new issue