Skip to content

Commit f573316

Browse files
committed
Fix issues with job replacement
Do not exit with error if the revision does not match, as retrying will not help, and trap TERM/INT to avoid interrupting helm while it is working Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
1 parent 293bbdb commit f573316

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

entry

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,13 @@ check_revision() {
134134
if [[ -n "${EXPECTED_RELEASE_REVISION}" ]] && [[ "${EXPECTED_RELEASE_REVISION}" != "${REVISION}" ]]; then
135135
echo "Current release revision ${REVISION} does not match expected revision ${EXPECTED_RELEASE_REVISION}" >> ${TERM_LOG}
136136
echo "Current release revision ${REVISION} does not match expected revision ${EXPECTED_RELEASE_REVISION}"
137-
exit 64
137+
exit
138138
fi
139139
}
140140

141+
# do not interrupt helm while it is running, or it will likely leave the release in a pending state
142+
trap "" SIGINT SIGTERM
143+
141144
export CA_FILE=/config/ca-file.pem
142145
export CA_DIR=/ca-files
143146
export AUTH_DIR=/auth

0 commit comments

Comments
 (0)