Skip to content

Commit 1fbd525

Browse files
authored
Merge pull request #172 from salesforcecli/ph/W-23936476-configurable-promotion-checks
fix: configure VS Code promotion gates
2 parents 72b6c61 + 818b135 commit 1fbd525

3 files changed

Lines changed: 37 additions & 5 deletions

File tree

‎.github/workflows/vscode-promote-prerelease.yml‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ name: Promote Nightly to Pre-release
1111
# min-tag-age-days: '7'
1212
# vsix-name-pattern: 'apex-language-server-extension-*.vsix' # optional, default: *.vsix
1313
# exclude-web-vsix: 'true' # optional, default: false
14+
# required-ci-checks: '["CI Complete"]'
1415
# dry-run: 'false'
1516
# secrets: inherit
1617
#
@@ -45,6 +46,11 @@ on:
4546
required: false
4647
default: "false"
4748
type: string
49+
required-ci-checks:
50+
description: "JSON array of CI check names required before promotion"
51+
required: false
52+
default: '["CI Complete"]'
53+
type: string
4854
dry-run:
4955
description: "Run in dry-run mode (no actual publishing or tagging)"
5056
required: false
@@ -79,6 +85,11 @@ on:
7985
options:
8086
- "false"
8187
- "true"
88+
required-ci-checks:
89+
description: "JSON array of CI check names required before promotion"
90+
required: false
91+
default: '["CI Complete"]'
92+
type: string
8293
dry-run:
8394
description: "Run in dry-run mode (no actual publishing or tagging)"
8495
required: false
@@ -188,6 +199,9 @@ jobs:
188199
with:
189200
commit-sha: ${{ needs.find-nightly-candidate.outputs.commit-sha }}
190201
token: ${{ secrets.IDEE_GH_TOKEN }}
202+
# `CI Complete` is the aggregate release gate emitted by vscode-ci-template.
203+
# Callers can override it for their repository's release-worthy checks.
204+
required-checks: ${{ inputs.required-ci-checks }}
191205

192206
publish:
193207
needs: [find-nightly-candidate, quality-gate]

‎.github/workflows/vscode-promote-stable.yml‎

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,15 @@ name: Promote Pre-release to Stable
1111
# vsix-name-pattern: 'apex-language-server-extension-*.vsix'
1212
# exclude-web-vsix: 'true'
1313
# extensions-root: 'packages'
14+
# required-ci-checks: '["CI Complete"]'
1415
# dry-run: 'false'
1516
# secrets: inherit
1617
#
1718
# Requirements - calling repository must have:
1819
# - marketplace-prerelease-* tracking tags
1920
# - Nightly tags matching v{version}-nightly.* pattern
2021
# - GitHub releases for each nightly tag with VSIX file(s) attached
21-
# - Passing CI checks (gate, tag-published)
22+
# - Passing CI checks on the nightly candidate commit
2223
# - Secrets: IDEE_GH_TOKEN, VSCE_PERSONAL_ACCESS_TOKEN, IDEE_OVSX_PAT
2324
# - The shared actions in this repository are resolved from the workflow branch.
2425
# - The package manager and lockfile inputs must match the caller repository.
@@ -52,6 +53,11 @@ on:
5253
required: false
5354
default: 'packages'
5455
type: string
56+
required-ci-checks:
57+
description: 'JSON array of CI check names required before promotion'
58+
required: false
59+
default: '["CI Complete"]'
60+
type: string
5561
dry-run:
5662
description: 'Run in dry-run mode (no actual publishing or tagging)'
5763
required: false
@@ -111,6 +117,11 @@ on:
111117
required: false
112118
default: 'packages'
113119
type: string
120+
required-ci-checks:
121+
description: 'JSON array of CI check names required before promotion'
122+
required: false
123+
default: '["CI Complete"]'
124+
type: string
114125
dry-run:
115126
description: 'Run in dry-run mode (no actual publishing or tagging)'
116127
required: false
@@ -261,13 +272,14 @@ jobs:
261272
with:
262273
commit-sha: ${{ needs.find-prerelease-candidate.outputs.commit-sha }}
263274
token: ${{ secrets.IDEE_GH_TOKEN }}
264-
# Validate only the publish-pipeline checks that gate the candidate's quality.
275+
# Validate only checks produced on the nightly candidate commit.
265276
# Without this, the action validates every check-run on the commit — including
266277
# this workflow's own `quality-gate` job, whose superseded historical runs can
267278
# carry a stale `failure` conclusion and block all future promotions.
268-
# `gate` is the Manual Publish aggregate gate; `tag-published` confirms the
269-
# nightly/pre-release artifact was successfully published for this commit.
270-
required-checks: '["gate","tag-published"]'
279+
# `CI Complete` is the aggregate release gate emitted by vscode-ci-template.
280+
# The marketplace-prerelease tracking tag found above proves prerelease publication.
281+
# Callers can override the CI check names for their repository.
282+
required-checks: ${{ inputs.required-ci-checks }}
271283

272284
repackage:
273285
needs: [find-prerelease-candidate, quality-gate]

‎README.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -685,6 +685,7 @@ jobs:
685685
min-tag-age-days: '7' # Nightly must be at least 7 days old
686686
vsix-name-pattern: 'my-extension-*.vsix' # Pattern to match VSIX files
687687
exclude-web-vsix: 'true' # Exclude *-web-* VSIX files
688+
required-ci-checks: '["CI Complete"]'
688689
dry-run: 'false'
689690
secrets: inherit
690691
```
@@ -695,6 +696,8 @@ jobs:
695696
- GitHub releases for each nightly tag with VSIX files attached
696697
- Passing CI checks on nightly commits
697698

699+
`required-ci-checks` is a JSON array of check-run names that must pass on the nightly commit. It defaults to `["CI Complete"]`, the aggregate release gate emitted by `vscode-ci-template.yml`; set it to the matching checks from the calling repository's CI workflow.
700+
698701
**How it works:**
699702

700703
1. Finds oldest nightly tag ≥ min-tag-age-days that hasn't been promoted
@@ -718,6 +721,7 @@ jobs:
718721
vsix-name-pattern: 'my-extension-*.vsix'
719722
exclude-web-vsix: 'true'
720723
extensions-root: 'packages'
724+
required-ci-checks: '["CI Complete"]'
721725
dry-run: 'false'
722726
secrets: inherit
723727
```
@@ -727,6 +731,8 @@ jobs:
727731
- `marketplace-prerelease-*` tracking tags from previous promotions
728732
- Local actions in calling repository (see Prerequisites section above)
729733

734+
`required-ci-checks` is a JSON array of check-run names that must pass on the nightly candidate commit. It defaults to `["CI Complete"]`, the aggregate release gate emitted by `vscode-ci-template.yml`; set it to the matching CI checks from the calling repository. The required `marketplace-prerelease-*` tracking tag is separate evidence that the prerelease marketplace publication completed.
735+
730736
**Note:** This workflow requires local actions. For a fully self-contained alternative, use `vscode-promote-prerelease.yml`.
731737

732738
### vscode-manual-publish

0 commit comments

Comments
 (0)