feat: jenkins push docker imagen by branch
gitea/salix/pipeline/pr-dev There was a failure building this commit
Details
gitea/salix/pipeline/pr-dev There was a failure building this commit
Details
This commit is contained in:
parent
6aab5fa9ef
commit
23e2c9890f
|
@ -89,6 +89,11 @@ pipeline {
|
|||
sh 'pnpm install --prefer-offline --prefix=front'
|
||||
}
|
||||
}
|
||||
stage('Push image') {
|
||||
steps {
|
||||
sh 'docker tag $IMAGE:$TAG $IMAGE:$BRANCH_NAME'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Stack') {
|
||||
|
@ -183,6 +188,10 @@ pipeline {
|
|||
}
|
||||
sh 'docker login --username $CREDENTIALS_USR --password $CREDENTIALS_PSW $REGISTRY'
|
||||
sh 'docker-compose push'
|
||||
if (env.BRANCH_NAME == 'master') {
|
||||
sh 'docker tag $IMAGE:$TAG $IMAGE:latest'
|
||||
sh 'docker push $IMAGE:latest'
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Deploy') {
|
||||
|
|
Loading…
Reference in New Issue