Skip to content

Commit

Permalink
Do not fail on missing dockerfile
Browse files Browse the repository at this point in the history
When a dockerfile is removed, the build CI job fails today as it
see the file in the list of modified ones, but cannot locate it
to run the test.

This still logs the missing file condition, but do not fail, so
that we may pass CI on PRs that delete a dockerfile, like:
- tektoncd#2065
- tektoncd#2064

Signed-off-by: Andrea Frittoli <[email protected]>
  • Loading branch information
afrittoli committed Jul 31, 2024
1 parent 8ec64bb commit 2a4cf78
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tekton/ci/jobs/tekton-image-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ spec:
while [ ! -f "${CONTEXT}/Dockerfile" ]; do
if [ "${CONTEXT}" == "/" ]; then
echo "No Dockerfile found in ${FQ_DOCKER_FILE}'s directory or any of its parents"
exit 1
# The file may be missing if it was deleted as part of the PR
# so we stop building but do not fail
exit 0
fi
CONTEXT=$(dirname ${CONTEXT})
done
Expand Down

0 comments on commit 2a4cf78

Please sign in to comment.