Skip to content

Commit

Permalink
update hashrelease pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
radTuti committed Feb 10, 2025
1 parent ac0c741 commit 5d65004
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 2 deletions.
1 change: 0 additions & 1 deletion .semaphore/release/hashrelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ blocks:
jobs:
- name: Build and publish hashrelease
commands:
- if [[ ${SEMAPHORE_WORKFLOW_TRIGGERED_BY_SCHEDULE} == "true" ]]; then export BUILD_CONTAINER_IMAGES=true; export PUBLISH_IMAGES=true; fi
- make hashrelease
prologue:
commands:
Expand Down
16 changes: 16 additions & 0 deletions .semaphore/semaphore-scheduled-builds.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions .semaphore/semaphore.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions .semaphore/semaphore.yml.d/03-promotions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@ promotions:
# Manual promotion for publishing a hashrelease.
- name: Publish hashrelease
pipeline_file: release/hashrelease.yml
parameters:
env_vars:
- required: true
options:
- "true"
- "false"
default_value: "false"
description: "Set to 'true' to build images while building the hashrelease. Must set PUBLISH_IMAGES to 'true' to publish them."
name: BUILD_CONTAINER_IMAGES
- required: true
options:
- "true"
- "false"
default_value: "false"
description: "Set to 'true' to publish images built by the hashrelease. Requires BUILD_CONTAINER_IMAGES to be 'true'."
name: PUBLISH_IMAGES
# Manual promotion for publishing a release.
- name: Publish official release
pipeline_file: release/release.yml
Expand Down
2 changes: 1 addition & 1 deletion release/internal/ci/semaphore.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func getPipelineResult(orgURL, pipelineID, token string) (*pipeline, error) {
}

func ImagePromotionsDone(repoRootDir, orgURL, pipelineID, token string) (bool, error) {
expectPromotionCountStr, err := command.Run("grep", []string{"-c", `"name: Push "`, fmt.Sprintf("%s/.semaphore/semaphore.yml.d/03-promotions.yml")})
expectPromotionCountStr, err := command.Run("grep", []string{"-c", `"name: Push "`, fmt.Sprintf("%s/.semaphore/semaphore.yml.d/03-promotions.yml", repoRootDir)})
if err != nil {
return false, fmt.Errorf("failed to get expected image promotions")
}
Expand Down

0 comments on commit 5d65004

Please sign in to comment.