add jenkins file

This commit is contained in:
medcl 2021-11-22 15:02:54 +08:00
parent e99cac3164
commit ae151c185c
1 changed files with 30 additions and 0 deletions

30
Jenkinsfile-docker Normal file
View File

@ -0,0 +1,30 @@
pipeline {
agent none
environment {
CI = 'true'
}
stages {
stage('build') {
parallel {
stage('Build Docker Images') {
agent {
label 'linux'
}
steps {
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE'){
sh label: 'docker-build', script: 'cd /home/jenkins/go/src/infini.sh/ && docker build -t infini-console -f search-center/docker/Dockerfile .'
sh label: 'docker-tagging', script: 'docker tag infini-console infinilabs/console:latest && docker tag infini-console infinilabs/console:$VERSION-$BUILD_NUMBER'
sh label: 'docker-push', script: 'docker push infinilabs/console:$VERSION-$BUILD_NUMBER && docker push infinilabs/console:latest'
}
}
}
} }
}
}