Skip to content

Commit

Permalink
fix docker modified check in premerge (#1485)
Browse files Browse the repository at this point in the history
Signed-off-by: Peixin Li <[email protected]>
  • Loading branch information
pxLi authored Oct 10, 2023
1 parent 93f4d22 commit 299a0f3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ci/Jenkinsfile.premerge
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,10 @@ pipeline {
container('cpu') {
// check if pre-merge dockerfile modified
def dockerfileModified = sh(returnStdout: true,
script: 'BASE=$(git --no-pager log --oneline -1 | awk \'{ print $NF }\'); ' +
'git --no-pager diff --name-only HEAD $(git merge-base HEAD $BASE) ' +
"-- ${PREMERGE_DOCKERFILE} || true")
script: """BASE=\$(git --no-pager log --oneline -1 | awk \'{ print \$NF }\')
git --no-pager diff --name-only HEAD \$BASE -- ${PREMERGE_DOCKERFILE} || true""").trim()
echo "$dockerfileModified"

if (!dockerfileModified?.trim()) {
TEMP_IMAGE_BUILD = false
}
Expand Down

0 comments on commit 299a0f3

Please sign in to comment.