Skip to content

Commit

Permalink
tekton: do not fail on git status -s
Browse files Browse the repository at this point in the history
It turns out, `git status -s` fails if the working directory is a
"detached" head, which is what happens in our case. This removes that
checks as it renders `pipeline` not releasable at all.

It also "locally" tag it to the specified version so that it will
appear in the go build metadata.

Signed-off-by: Vincent Demeester <vdemeest@redhat.com>
  • Loading branch information
vdemeester authored and tekton-robot committed Oct 3, 2022
1 parent b817d77 commit 5d34b0c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tekton/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,9 @@ spec:
# Publish images and create release.yaml
mkdir -p $OUTPUT_RELEASE_DIR
if [[ -n $(git status -s) ]]; then
echo "The git repository is dirty, bailing out of the release"
exit 1
fi
# Make a local git tag to make git status happy :)
# The real "tagging" will happen with the "create-release" pipeline.
git tag $(params.versionTag)
ko resolve --platform=$(params.platforms) --preserve-import-paths -t $(params.versionTag) -l 'app.kubernetes.io/component!=resolvers' -R -f ${PROJECT_ROOT}/config/ > $OUTPUT_RELEASE_DIR/release.yaml
ko resolve --platform=$(params.platforms) --preserve-import-paths -t $(params.versionTag) -f ${PROJECT_ROOT}/config/resolvers > $OUTPUT_RELEASE_DIR/resolvers.yaml
Expand Down

0 comments on commit 5d34b0c

Please sign in to comment.