fix(ci): release step fails with empty version, duplicate artifacts - #81
Merged
Conversation
Both snapshot and release_build uploaded files named builddeck and builddeck.sha256, creating duplicate artifacts in the Buildkite pane. Snapshot is build verification only — its binary is never consumed downstream. Remove its artifact upload so only release_build produces artifacts.
…lease Two bugs: 1. release_build used builddeck* glob which matched builddeck.tag, uploading a duplicate artifact and potentially confusing downstream downloads. Changed to explicit upload of builddeck and builddeck.sha256. 2. release step downloaded builddeck.tag from --step tag, but the download can return 0 even when no matching artifact exists, leaving an empty/missing file. Changed to check the local builddeck.tag file left by release_build on the same agent, with a [[ -s builddeck.tag ]] guard to prevent calling release.sh with an empty version. Same fix applied to pipeline.release.yml for consistency.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problems:
buildkite-agent artifact downloadfrom--step tagcan exit 0 even when no matching artifact exists, leaving an empty/missing file.release.sh ""then fails with "Usage: release.sh ".release_buildusedbuilddeck*glob which matchedbuilddeck.tag, uploading a duplicate. Samebuilddeck*glob duplicatedbuilddeckandbuilddeck.sha256already uploaded by the snapshot step.Fixes:
releasestep now readsbuilddeck.tagfrom local disk (left byrelease_buildon same agent) with[[ -s builddeck.tag ]]guard — no remote download needed.release_builduploads explicit filenames instead ofbuilddeck*glob.pipeline.release.yml.PR #80 restored the release steps but the download-from-tag-step approach was fragile.