jenkinsfile

This commit is contained in:
2022-02-20 15:35:16 +01:00
parent fb06da774a
commit ba992c1a1f
2 changed files with 43 additions and 0 deletions

40
Jenkinsfile vendored Normal file
View File

@@ -0,0 +1,40 @@
pipeline {
agent any
stages {
stage('Checkout'){
steps {
git credentialsId: '3e336704-7d58-4dcb-88b6-1ef7b5392576', url: 'https://git.fet.at/andis/triton2_config.git'
}
}
stage('build') {
steps{
script {
app = docker.build("openrestyfetfull")
}
}
}
stage('Test Inside') {
steps{
script {
app.inside("-u root:root") {
sh '/usr/local/openresty/bin/openresty -t'
}
}
}
}
stage('Deploy Image') {
steps{
script {
docker.withRegistry( 'https://docker.fet.at', '3e336704-7d58-4dcb-88b6-1ef7b5392576') {
app.push("$BUILD_NUMBER")
app.push('latest')
}
}
}
}
}}

View File

@@ -26,3 +26,6 @@ docker network create
docker run -d -p 8000:8000 -p 9000:9000 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:2.11.1 docker run -d -p 8000:8000 -p 9000:9000 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:2.11.1
docker stop nginx
docker rm nginx
docker run -d -p 80:80 -p 443:443 --network=nginx --name nginx --restart=always docker.fet.at/openrestyfet:latest