diff --git a/Jenkinsfile b/Jenkinsfile index 19f47c5b0..13dd7749d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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') {