mirror of
https://github.com/jc21/nginx-proxy-manager.git
synced 2024-08-30 18:22:48 +00:00
Fix CI pipeline
This commit is contained in:
parent
4bb63fcf8d
commit
f1c86a7d49
30
Jenkinsfile
vendored
30
Jenkinsfile
vendored
@ -39,27 +39,27 @@ node-prune'''
|
|||||||
}
|
}
|
||||||
stage('Build') {
|
stage('Build') {
|
||||||
steps {
|
steps {
|
||||||
sh '''docker build -t $TEMP_IMAGE_NAME .
|
sh 'docker build -t $TEMP_IMAGE_NAME .'
|
||||||
exit $?'''
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Publish') {
|
stage('Publish') {
|
||||||
|
when {
|
||||||
|
branch 'master'
|
||||||
|
}
|
||||||
steps {
|
steps {
|
||||||
sh '''docker tag $TEMP_IMAGE_NAME ${DOCKER_PRIVATE_REGISTRY}/$IMAGE_NAME:latest
|
sh 'docker tag $TEMP_IMAGE_NAME ${DOCKER_PRIVATE_REGISTRY}/$IMAGE_NAME:latest'
|
||||||
docker push ${DOCKER_PRIVATE_REGISTRY}/$IMAGE_NAME:latest
|
sh 'docker push ${DOCKER_PRIVATE_REGISTRY}/$IMAGE_NAME:latest'
|
||||||
exit $?'''
|
sh 'docker tag $TEMP_IMAGE_NAME ${DOCKER_PRIVATE_REGISTRY}/$IMAGE_NAME:$TAG_VERSION'
|
||||||
|
sh 'docker push ${DOCKER_PRIVATE_REGISTRY}/$IMAGE_NAME:$TAG_VERSION'
|
||||||
|
sh 'docker tag $TEMP_IMAGE_NAME docker-io/jc21/$IMAGE_NAME:latest'
|
||||||
|
sh 'docker tag $TEMP_IMAGE_NAME docker-io/jc21/$IMAGE_NAME:$TAG_VERSION'
|
||||||
|
|
||||||
sh '''docker tag $TEMP_IMAGE_NAME ${DOCKER_PRIVATE_REGISTRY}/$IMAGE_NAME:$TAG_VERSION
|
withDockerRegistry([credentialsId: 'jc21-dockerhub', url: '']) {
|
||||||
docker push ${DOCKER_PRIVATE_REGISTRY}/$IMAGE_NAME:$TAG_VERSION
|
sh 'docker push docker-io/jc21/$IMAGE_NAME:latest'
|
||||||
exit $?'''
|
sh 'docker push docker-io/jc21/$IMAGE_NAME:$TAG_VERSION'
|
||||||
|
}
|
||||||
|
|
||||||
sh '''docker tag $TEMP_IMAGE_NAME docker-io/jc21/$IMAGE_NAME:latest
|
sh 'docker rmi $TEMP_IMAGE_NAME'
|
||||||
docker push docker-io/jc21/$IMAGE_NAME:latest
|
|
||||||
exit $?'''
|
|
||||||
|
|
||||||
sh '''docker tag $TEMP_IMAGE_NAME docker-io/jc21/$IMAGE_NAME:$TAG_VERSION
|
|
||||||
docker push docker-io/jc21/$IMAGE_NAME:$TAG_VERSION
|
|
||||||
exit $?'''
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user