Skip to content

Commit

Permalink
Always rebuild container on default branch (#1647)
Browse files Browse the repository at this point in the history
  • Loading branch information
basil authored Jul 31, 2024
1 parent e7437e7 commit b456c5f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ branches['CI'] = {
}
}

def buildImage = env.CHANGE_ID && pullRequest.labels.contains('build-image')
def skipImageBuild = env.CHANGE_ID && !pullRequest.labels.contains('build-image')

for (int i = 0; i < splits.size(); i++) {
int index = i
Expand All @@ -124,7 +124,7 @@ for (int i = 0; i < splits.size(); i++) {
checkout scm
// Need to authenticate on DockerHub with a read-only account to avoid rate limit
infra.withDockerCredentials {
def image = buildImage ? docker.build('jenkins/ath', '--build-arg uid="$(id -u)" --build-arg gid="$(id -g)" ./src/main/resources/ath-container/') : docker.image('jenkins/ath')
def image = skipImageBuild ? docker.image('jenkins/ath') : docker.build('jenkins/ath', '--build-arg uid="$(id -u)" --build-arg gid="$(id -g)" ./src/main/resources/ath-container/')
sh 'mkdir -p target/ath-reports && chmod a+rwx target/ath-reports'
def cwd = pwd()
image.inside("-v /var/run/docker.sock:/var/run/docker.sock -v '${cwd}/target/ath-reports:/reports:rw' --shm-size 2g") {
Expand Down

0 comments on commit b456c5f

Please sign in to comment.