-
Notifications
You must be signed in to change notification settings - Fork 53
CHANGE: @W-18097146@ Updates for GA #1771
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,17 @@ | ||
| name: create-release-branch | ||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. However, I also thought it prudent to add in the manual option back in case we need to re-run (for whatever reason)
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, we definitely need this now. |
||
| # When the workflow is executed manually, the user can select whether the branch should correspond to a major, | ||
| # minor, or patch release. | ||
| release-type: | ||
| type: choice | ||
| description: What kind of release? | ||
| options: | ||
| - major | ||
| - minor | ||
| - patch | ||
| required: true | ||
|
|
||
| jobs: | ||
| create-release-branch: | ||
|
|
@@ -24,7 +35,15 @@ jobs: | |
| # Increment the version as desired locally, without actually committing anything. | ||
| - name: Locally increment version | ||
| run: | | ||
| npm --no-git-tag-version version prerelease --preid beta | ||
| # A workflow dispatch event lets the user specify what release type they want. | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I found this on dev-4 👀
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, this makes it so the automated monthly execution defaults to |
||
| if [[ "${{ github.event_name }}" = "workflow_dispatch" ]]; then | ||
| RELEASE_TYPE=${{ github.event.inputs.release-type }} | ||
| # The regularly scheduled releases are always minor. | ||
| else | ||
| RELEASE_TYPE=minor | ||
| fi | ||
| # Increment the version as needed. | ||
| npm --no-git-tag-version version $RELEASE_TYPE | ||
| # The branch protection rule for `release-x.y.z` branches prevents pushing commits directly. To work around this, | ||
| # we create an interim branch that we _can_ push commits to, and we'll do our version bookkeeping in that branch | ||
| # instead. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| #TODO: remove v4 with April Release | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @stephen-carter-at-sf I opted to keep this separate for easy deletion. I'm not quite sure why we need the script to invoke the tests, but I updated daily-smoke-tests to just work off of
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What exactly were you confused about? I'm not quite sure I understand.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. cron based jobs can only run from dev. So from dev we dispatch the actual v4 script from the dev-4 branch. What you have here is correct. |
||
| name: daily-smoke-tests-v4 | ||
| on: | ||
| workflow_dispatch: # As per documentation, the colon is necessary even though no config is required. | ||
| schedule: | ||
| # Cron syntax is "minute[0-59] hour[0-23] date[1-31] month[1-12] day[0-6]". '*' is 'any value,' and multiple values | ||
| # can be specified with comma-separated lists. All times are UTC. | ||
| # So this expression means "run at 13:30 UTC every day". This time was chosen because it corresponds to | ||
| # 8:30AM CDT, meaning that any issues will be surfaced before the start of business. | ||
| - cron: "30 13 * * *" | ||
| jobs: | ||
| smoke-test: | ||
| uses: ./.github/workflows/run-tests.yml | ||
| with: | ||
| node-matrix: "[{version: 'lts/*', artifact: 'lts'}, {version: 'latest', artifact: 'latest'}]" | ||
| v4-smoke-test: | ||
| runs-on: macos-latest | ||
| steps: | ||
| - name: Invoke v4 smoke tests | ||
| uses: actions/github-script@v6 | ||
| with: | ||
| github-token: ${{ secrets.SVC_CLI_BOT_GITHUB_TOKEN }} | ||
| script: | | ||
| await github.rest.actions.createWorkflowDispatch({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| workflow_id: 'daily-smoke-tests.yml', | ||
| ref: 'dev-4' | ||
| }); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| name: daily-smoke-tests | ||
| on: | ||
| workflow_dispatch: # As per documentation, the colon is necessary even though no config is required. | ||
| workflow_dispatch: | ||
| schedule: | ||
| # Cron syntax is "minute[0-59] hour[0-23] date[1-31] month[1-12] day[0-6]". '*' is 'any value,' and multiple values | ||
| # can be specified with comma-separated lists. All times are UTC. | ||
|
|
@@ -9,20 +9,8 @@ on: | |
| - cron: "30 13 * * *" | ||
| jobs: | ||
| smoke-test: | ||
| # We run the daily smoke tests against 'dev' to validate that the code currently in development is still valid | ||
| uses: ./.github/workflows/run-tests.yml | ||
| with: | ||
| node-matrix: "[{version: 'lts/*', artifact: 'lts'}, {version: 'latest', artifact: 'latest'}]" | ||
| v4-smoke-test: | ||
| runs-on: macos-latest | ||
| steps: | ||
| - name: Invoke v4 smoke tests | ||
| uses: actions/github-script@v6 | ||
| with: | ||
| github-token: ${{ secrets.SVC_CLI_BOT_GITHUB_TOKEN }} | ||
| script: | | ||
| await github.rest.actions.createWorkflowDispatch({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| workflow_id: 'daily-smoke-tests.yml', | ||
| ref: 'dev-4' | ||
| }); | ||
| branch: dev | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Request: Could you add a comment covering the explanation I gave the other day? i.e., or something like that?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good point to clarify! |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -115,7 +115,7 @@ jobs: | |
| shell: bash | ||
| run: | | ||
| # We need to determine the Tarball's name first. | ||
| TARBALL_NAME=$(ls ~/downloads/tarball | grep salesforce-plugin-code-analyzer-5\\.0\\.0-beta\\.[0-9]*\\.tgz) | ||
| TARBALL_NAME=$(ls ~/downloads/tarball | grep salesforce-plugin-code-analyzer-.*\\.tgz) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I recommend
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This one I realized we'll need to wait until after we go GA, but we can clean that up then if you'd like 👍 |
||
| # We need to determine the Tarball's location in an installable way. | ||
| # Get the path to the download folder. Swap out backslashes for forward slashes to ensure Windows compatibility. | ||
| RAW_TARBALL_PATH=`echo '${{ steps.download.outputs.download-path }}' | tr '\\' '/'` | ||
|
|
@@ -130,4 +130,3 @@ jobs: | |
| with: | ||
| name: smoke-test-results-${{ runner.os }}-node-${{ matrix.node.artifact }} | ||
| path: smoke-test-results | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,6 +6,7 @@ on: | |
| jobs: | ||
| # We want to prevent cross-contamination between the 4.x and 5.x pipelines. So we should prevent PRs | ||
| # based on this flow to merge into `dev-4` or `main-4`. | ||
| # TODO: Remove this after the April release, since we won't care after that to maintain v4 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note: You'll also need to remove this job as a Required job for the branch protection rule. |
||
| verify_target_branch: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,3 @@ | ||
| # label.command-state | ||
|
|
||
| Beta | ||
|
|
||
| # warning.command-state | ||
|
|
||
| This command is in %s. | ||
|
|
||
| # log.give-us-feedback | ||
|
|
||
| We're continually improving Salesforce Code Analyzer. Tell us what you think! Give feedback at http://sfdc.co/CodeAnalyzerFeedback. |
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When running this locally, using "patch" as the version helped update the package.json version correctly for me:

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey this is great news! We'll do this instead of manually creating it then for this month. Great find.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, for this month we want to run it as
patch. Good call.