Skip to content

Commit

Permalink
fix: extra params and notification to prelease jobs (#167)
Browse files Browse the repository at this point in the history
* fix: extra params and notification to prelease jobs

* update tests
  • Loading branch information
yj-yan authored May 20, 2024
1 parent eb52e7a commit 7188e12
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 3 deletions.
18 changes: 16 additions & 2 deletions templates/.circleci/config.yml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ version: 2.1
{{- $prereleaseBranch := stencil.Arg "releaseOptions.prereleasesBranch" }}
{{- $testNodeClient := and (or (not (stencil.Arg "service")) (has "grpc" (stencil.Arg "serviceActivities"))) (has "node" (stencil.Arg "grpcClients")) }}
{{- $defaultBranch := .Git.DefaultBranch | default "main" }}
{{- $releaseFailureSlackChannel := stencil.Arg "notifications.slackChannel" }}
orbs:
shared: getoutreach/shared@{{ stencil.Arg "versions.devbase" | default (stencil.ApplyTemplate "devbase.orb_version") }}
queue: eddiewebb/queue@2.2.1
Expand Down Expand Up @@ -140,6 +141,12 @@ workflows:
jobs:
- shared/trigger_rc_release:
context: *contexts
{{- if $releaseFailureSlackChannel }}
release_failure_slack_channel: "{{ $releaseFailureSlackChannel }}"
{{- end }}
## <<Stencil::Block(circleAutoTriggerRCExtra)>>
{{ file.Block "circleAutoTriggerRCExtra" }}
## <</Stencil::Block>>
{{- end }}

{{- if stencil.Arg "releaseOptions.enablePrereleases" }}
Expand All @@ -149,6 +156,12 @@ workflows:
jobs:
- shared/trigger_rc_release:
context: *contexts
{{- if $releaseFailureSlackChannel }}
release_failure_slack_channel: "{{ $releaseFailureSlackChannel }}"
{{- end }}
## <<Stencil::Block(circleManualTriggerRCExtra)>>
{{ file.Block "circleManualTriggerRCExtra" }}
## <</Stencil::Block>>
{{- end }}

release:
Expand Down Expand Up @@ -187,7 +200,6 @@ workflows:
node_client: true
{{- end }}
context: *contexts
{{- $releaseFailureSlackChannel := stencil.Arg "notifications.slackChannel" }}
{{- if $releaseFailureSlackChannel }}
release_failure_slack_channel: "{{ $releaseFailureSlackChannel }}"
{{- end }}
Expand All @@ -210,7 +222,9 @@ workflows:
- shared/pre-release: &pre-release
dryrun: false
context: *contexts
release_failure_slack_channel: {{ $releaseFailureSlackChannel }}
{{- if $releaseFailureSlackChannel }}
release_failure_slack_channel: "{{ $releaseFailureSlackChannel }}"
{{- end }}
## <<Stencil::Block(circlePreReleaseExtra)>>
{{ file.Block "circlePreReleaseExtra" }}
## <</Stencil::Block>>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,18 @@ workflows:
jobs:
- shared/trigger_rc_release:
context: *contexts
## <<Stencil::Block(circleAutoTriggerRCExtra)>>

## <</Stencil::Block>>

manual-release-rc:
when: << pipeline.parameters.release_rc>>
jobs:
- shared/trigger_rc_release:
context: *contexts
## <<Stencil::Block(circleManualTriggerRCExtra)>>

## <</Stencil::Block>>

release:
when:
Expand Down Expand Up @@ -130,7 +136,6 @@ workflows:
- shared/pre-release: &pre-release
dryrun: false
context: *contexts
release_failure_slack_channel:
## <<Stencil::Block(circlePreReleaseExtra)>>

## <</Stencil::Block>>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ workflows:
jobs:
- shared/trigger_rc_release:
context: *contexts
## <<Stencil::Block(circleManualTriggerRCExtra)>>

## <</Stencil::Block>>

release:
when:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ workflows:
jobs:
- shared/trigger_rc_release:
context: *contexts
## <<Stencil::Block(circleManualTriggerRCExtra)>>

## <</Stencil::Block>>

release:
when:
Expand Down

0 comments on commit 7188e12

Please sign in to comment.