Skip to content
Snippets Groups Projects

Add filter to block docker build for standard branches in Jenkins

Merged Martin Lowe requested to merge malowe/eclipsefdn-mailing-lists-api:malowe/main/patch into main
1 file
+ 6
1
Compare changes
  • Side-by-side
  • Inline
+ 6
1
@@ -118,9 +118,14 @@ pipeline {
agent {
label 'docker-build'
}
when {
anyOf {
environment name: 'ENVIRONMENT', value: 'production'
environment name: 'ENVIRONMENT', value: 'staging'
}
}
steps {
readTrusted 'src/main/docker/Dockerfile.jvm'
unstash 'target'
sh '''
docker build -f src/main/docker/Dockerfile.jvm --no-cache -t ${IMAGE_NAME}:${TAG_NAME} -t ${IMAGE_NAME}:latest .
Loading