From 7b73946c21553a474790f566b23838812f3939c0 Mon Sep 17 00:00:00 2001 From: Eric Willhoit Date: Wed, 2 Oct 2024 14:58:19 -0500 Subject: [PATCH] chore: allow skipping oclif promote --- .github/workflows/promote-nightly-to-rc.yml | 8 ++++++++ .github/workflows/promote-rc-to-latest.yml | 6 ++++++ .github/workflows/promote.yml | 10 +++++++++- package.json | 2 +- yarn.lock | 8 ++++---- 5 files changed, 28 insertions(+), 6 deletions(-) diff --git a/.github/workflows/promote-nightly-to-rc.yml b/.github/workflows/promote-nightly-to-rc.yml index c89df26a..902127a2 100644 --- a/.github/workflows/promote-nightly-to-rc.yml +++ b/.github/workflows/promote-nightly-to-rc.yml @@ -2,9 +2,16 @@ name: promote-nightly-to-rc on: workflow_dispatch: + inputs: + ignore-missing: + type: boolean + required: false + description: Ignore 'oclif promote' errors when a specific target is missing. workflow_run: workflows: - promote-rc-to-latest + # TODO: Is there a way to see if 'ignore-missing' was passed into 'promote-rc-to-latest' and can be passed along here? + # Maybe store state with upload-artifact and download-artifact? types: - completed @@ -17,6 +24,7 @@ jobs: with: old-channel: nightly new-channel: latest-rc + ignore-missing: ${{ inputs.ignore-missing }} promote-verify: runs-on: ubuntu-latest diff --git a/.github/workflows/promote-rc-to-latest.yml b/.github/workflows/promote-rc-to-latest.yml index 265b3a7c..4470736d 100644 --- a/.github/workflows/promote-rc-to-latest.yml +++ b/.github/workflows/promote-rc-to-latest.yml @@ -2,6 +2,11 @@ name: promote-rc-to-latest on: workflow_dispatch: + inputs: + ignore-missing: + type: boolean + required: false + description: Ignore 'oclif promote' errors when a specific target is missing. schedule: # Wednesdays 1pm central - cron: '0 18 * * 3' @@ -14,6 +19,7 @@ jobs: old-channel: latest-rc new-channel: latest use-ctc: true + ignore-missing: ${{ inputs.ignore-missing }} promote-verify: runs-on: ubuntu-latest diff --git a/.github/workflows/promote.yml b/.github/workflows/promote.yml index a292cfab..6c5d07af 100644 --- a/.github/workflows/promote.yml +++ b/.github/workflows/promote.yml @@ -17,6 +17,10 @@ on: type: boolean required: false description: Open a change case for this promotion. Only needed for promotions to latest. + ignore-missing: + type: boolean + required: false + description: Ignore 'oclif promote' errors when a specific target is missing. workflow_dispatch: inputs: version: @@ -33,6 +37,10 @@ on: type: boolean required: false description: Open a change case for this promotion. Only needed for promotions to latest. + ignore-missing: + type: boolean + required: false + description: Ignore 'oclif promote' errors when a specific target is missing. jobs: validate-inputs: @@ -180,7 +188,7 @@ jobs: - uses: salesforcecli/github-workflows/.github/actions/yarnInstallWithRetries@main - name: Promote with oclif - run: yarn promote --version "$NEEDS_GET_PACKAGE_INFO_VERSION" --sha "$NEEDS_GET_PACKAGE_INFO_SHA" --channel "$NEEDS_BUILD_S3_CHANNEL_S3_NEW_CHANNEL" --max-age 300 --macos --win --indexes --xz + run: yarn promote --version "$NEEDS_GET_PACKAGE_INFO_VERSION" --sha "$NEEDS_GET_PACKAGE_INFO_SHA" --channel "$NEEDS_BUILD_S3_CHANNEL_S3_NEW_CHANNEL" --max-age 300 --macos --win --indexes --xz ${{ inputs.ignore-missing && '--ignore-missing' || '' }} env: NEEDS_GET_PACKAGE_INFO_VERSION: ${{ needs.get-package-info.outputs.version }} NEEDS_GET_PACKAGE_INFO_SHA: ${{ needs.get-package-info.outputs.sha }} diff --git a/package.json b/package.json index 25693a5c..14c9fb7e 100644 --- a/package.json +++ b/package.json @@ -256,7 +256,7 @@ "@salesforce/ts-sinon": "^1.4.27", "@salesforce/ts-types": "^2.0.10", "aws-sdk": "^2.1691.0", - "oclif": "^4.15.0", + "oclif": "^4.15.1", "ts-node": "^10.9.2", "typescript": "^5.6.2" }, diff --git a/yarn.lock b/yarn.lock index d1643334..43956069 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8585,10 +8585,10 @@ obliterator@^2.0.1, obliterator@^2.0.2: resolved "https://registry.npmjs.org/obliterator/-/obliterator-2.0.4.tgz" integrity sha512-lgHwxlxV1qIg1Eap7LgIeoBWIMFibOjbrYPIPJZcI1mmGAI2m3lNYpK12Y+GBdPQ0U1hRwSord7GIaawz962qQ== -oclif@^4.15.0: - version "4.15.0" - resolved "https://registry.yarnpkg.com/oclif/-/oclif-4.15.0.tgz#3f7df05a2060c5de92c4b0fd74a9290a60941c9e" - integrity sha512-o0gq69z5DrKl7KD5Ib/0csB92ewCougttbXfSoyFOvAD2GbR+RVZUptqCDry5xVM0vq49syOT5EWczJsfj5r2w== +oclif@^4.15.1: + version "4.15.1" + resolved "https://registry.yarnpkg.com/oclif/-/oclif-4.15.1.tgz#0dfa13e9506a8d3374a180aff768df23b60a5372" + integrity sha512-YCElE3iM7MUDIS62UNcjH0kHWJ+VIrujgkJAFeeNQMWmpN+rdSkE0UWdKfsaHHpYKLEYrEJfHMSQm/YrekCOMQ== dependencies: "@aws-sdk/client-cloudfront" "^3.645.0" "@aws-sdk/client-s3" "^3.651.1"