Skip to content

Trigger calico/go-build auto pin update on successful tag builds #627

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 13, 2025

Conversation

hjiawei
Copy link
Collaborator

@hjiawei hjiawei commented Jan 11, 2025

This changeset changes auto calico/go-build pin update to trigger only on successful tag builds. SEMAPHORE_WORKFLOW_BRANCH is also set to the master branch by default. Currently, it is always set to SEMAPHORE_GIT_BRANCH which isn't correct for tag builds.

Fixes issues seen in this semaphore tag build workflow.

This changeset changes auto `calico/go-build` pin update to trigger
only on successful tag builds. SEMAPHORE_WORKFLOW_BRANCH
is also set to the master branch by default. Currently, it is always set
to SEMAPHORE_GIT_BRANCH which isn't correct for tag builds.
@@ -692,7 +692,7 @@ semaphore-run-auto-pin-update-workflow:
# SEMAPHORE_AUTO_PIN_UPDATE_PROJECT_IDS.
semaphore-run-auto-pin-update-workflows:
for ID in $(SEMAPHORE_AUTO_PIN_UPDATE_PROJECT_IDS); do\
SEMAPHORE_WORKFLOW_BRANCH=$(SEMAPHORE_GIT_BRANCH) SEMAPHORE_PROJECT_ID=$$ID $(MAKE) semaphore-run-auto-pin-update-workflow; \
SEMAPHORE_PROJECT_ID=$$ID $(MAKE) semaphore-run-auto-pin-update-workflow; \
Copy link
Collaborator Author

@hjiawei hjiawei Jan 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For a semaphore tag build, SEMAPHORE_GIT_BRANCH will be something like refs/tags/1.23.4-llvm18.1.8-k8s1.31.4-1. This isn't correct for an auto calico/go-build pin update. This auto update is only planned for the master branch for downstream projects. Once I remove this hard-coded SEMAPHORE_WORKFLOW_BRANCH assignment, it will be master when not defined (defined in line 671).

@hjiawei hjiawei requested a review from danudey January 11, 2025 07:25
@hjiawei hjiawei merged commit 5e1f486 into master Jan 13, 2025
4 checks passed
@hjiawei hjiawei deleted the pin-update-on-tag branch January 13, 2025 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants