-
Notifications
You must be signed in to change notification settings - Fork 6
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
Verify release action #977
Merged
Merged
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
0fc36ca
Verify release action
danielrbradley d43c16f
Don't verify releases on MacOS by default
danielrbradley 03a93b5
Verify stable releases
danielrbradley 8d5bd3d
Print warnings for missing release verification config
danielrbradley 8ec82a7
Fix provider version input passing
danielrbradley 2531b94
Include env in verify-release
danielrbradley 10c1d98
Skip verify-release if not implemented
danielrbradley File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
93 changes: 93 additions & 0 deletions
93
provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/verify-release.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
name: "Verify Release" | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
providerVersion: | ||
description: "The version of the provider to verify" | ||
required: true | ||
type: string | ||
enableMacRunner: | ||
description: "Enable the MacOS runner in addition to Linux and Windows. Defaults to 'false'." | ||
required: false | ||
type: boolean | ||
workflow_call: | ||
inputs: | ||
providerVersion: | ||
description: "The version of the provider to verify" | ||
required: true | ||
type: string | ||
enableMacosRunner: | ||
description: "Enable the macos-latest runner in addition to ubuntu-latest and windows-latest. Defaults to 'false'." | ||
required: false | ||
type: boolean | ||
default: false | ||
|
||
env: | ||
#{{ .Config.env | toYaml | indent 2 }}# | ||
|
||
jobs: | ||
verify-release: | ||
name: verify-release | ||
strategy: | ||
matrix: | ||
#{{- if .Config.releaseVerification }}# | ||
# We always run on Linux and Windows, and optionally on MacOS. This is because MacOS runners have limited availability. | ||
# Expression expands to ["ubuntu-latest","windows-latest"] or ["ubuntu-latest","windows-latest","macos-latest"] | ||
# GitHub expressions don't have 'if' statements, so we use a ternary operator to conditionally include the MacOS runner suffix. | ||
# See the docs for a similar example to this: https://docs.github.com/en/actions/learn-github-actions/expressions#fromjson | ||
runner: ${{ fromJSON(format('["ubuntu-latest","windows-latest"{0}]', github.event.inputs.enableMacRunner == 'true' && ',"macos-latest"' || '')) }} | ||
#{{- else }}# | ||
# We don't have any release verification configurations, so we only run on Linux to print warnings to help users configure the release verification. | ||
runner: ["ubuntu-latest"] | ||
#{{- end }}# | ||
runs-on: ${{ matrix.runner }} | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v4 | ||
- name: Setup tools | ||
uses: ./.github/actions/setup-tools | ||
#{{- if .Config.releaseVerification.nodejs }}# | ||
- name: Verify nodejs release | ||
uses: pulumi/verify-provider-release@v1 | ||
with: | ||
runtime: nodejs | ||
directory: #{{ .Config.releaseVerification.nodejs }}# | ||
provider: #{{ .Config.provider }}# | ||
providerVersion: ${{ inputs.providerVersion }} | ||
#{{- else }}# | ||
- run: echo "::warning file=.ci-mgmt.yaml,title=Node.js release verification missing::Add the key releaseVerification.nodejs to .ci-mgmt.yaml pointing to the directory containing a Pulumi nodejs project to preview." | ||
#{{- end }}# | ||
#{{- if .Config.releaseVerification.python }}# | ||
- name: Verify python release | ||
uses: pulumi/verify-provider-release@v1 | ||
with: | ||
runtime: python | ||
directory: #{{ .Config.releaseVerification.python }}# | ||
provider: #{{ .Config.provider }}# | ||
providerVersion: ${{ inputs.providerVersion }} | ||
#{{- else }}# | ||
- run: echo "::warning file=.ci-mgmt.yaml,title=Python release verification missing::Add the key releaseVerification.python to .ci-mgmt.yaml pointing to the directory containing a Pulumi python project to preview." | ||
#{{- end }}# | ||
#{{- if .Config.releaseVerification.dotnet }}# | ||
- name: Verify dotnet release | ||
uses: pulumi/verify-provider-release@v1 | ||
with: | ||
runtime: dotnet | ||
directory: #{{ .Config.releaseVerification.dotnet }}# | ||
provider: #{{ .Config.provider }}# | ||
providerVersion: ${{ inputs.providerVersion }} | ||
#{{- else }}# | ||
- run: echo "::warning file=.ci-mgmt.yaml,title=Dotnet release verification missing::Add the key releaseVerification.dotnet to .ci-mgmt.yaml pointing to the directory containing a Pulumi dotnet project to preview." | ||
#{{- end }}# | ||
#{{- if .Config.releaseVerification.go }}# | ||
- name: Verify go release | ||
uses: pulumi/verify-provider-release@v1 | ||
with: | ||
runtime: go | ||
directory: #{{ .Config.releaseVerification.go }}# | ||
provider: #{{ .Config.provider }}# | ||
providerVersion: ${{ inputs.providerVersion }} | ||
#{{- else }}# | ||
- run: echo "::warning file=.ci-mgmt.yaml,title=Go release verification missing::Add the key releaseVerification.python to .ci-mgmt.yaml pointing to the directory containing a Pulumi go project to preview." | ||
#{{- end }}# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
provider-ci/test-workflows/aws/.github/workflows/verify-release.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: "Verify Release" | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
providerVersion: | ||
description: "The version of the provider to verify" | ||
required: true | ||
type: string | ||
enableMacRunner: | ||
description: "Enable the MacOS runner in addition to Linux and Windows. Defaults to 'false'." | ||
required: false | ||
type: boolean | ||
workflow_call: | ||
inputs: | ||
providerVersion: | ||
description: "The version of the provider to verify" | ||
required: true | ||
type: string | ||
enableMacosRunner: | ||
description: "Enable the macos-latest runner in addition to ubuntu-latest and windows-latest. Defaults to 'false'." | ||
required: false | ||
type: boolean | ||
default: false | ||
|
||
env: | ||
AWS_REGION: us-west-2 | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }} | ||
PUBLISH_REPO_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} | ||
PUBLISH_REPO_USERNAME: ${{ secrets.OSSRH_USERNAME }} | ||
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} | ||
PULUMI_API: https://api.pulumi-staging.io | ||
PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/.. | ||
PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget | ||
PULUMI_MISSING_DOCS_ERROR: true | ||
PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | ||
PYPI_USERNAME: __token__ | ||
SIGNING_KEY: ${{ secrets.JAVA_SIGNING_KEY }} | ||
SIGNING_KEY_ID: ${{ secrets.JAVA_SIGNING_KEY_ID }} | ||
SIGNING_PASSWORD: ${{ secrets.JAVA_SIGNING_PASSWORD }} | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
TF_APPEND_USER_AGENT: pulumi | ||
|
||
jobs: | ||
verify-release: | ||
name: verify-release | ||
strategy: | ||
matrix: | ||
# We don't have any release verification configurations, so we only run on Linux to print warnings to help users configure the release verification. | ||
runner: ["ubuntu-latest"] | ||
runs-on: ${{ matrix.runner }} | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v4 | ||
- name: Setup tools | ||
uses: ./.github/actions/setup-tools | ||
- run: echo "::warning file=.ci-mgmt.yaml,title=Node.js release verification missing::Add the key releaseVerification.nodejs to .ci-mgmt.yaml pointing to the directory containing a Pulumi nodejs project to preview." | ||
- run: echo "::warning file=.ci-mgmt.yaml,title=Python release verification missing::Add the key releaseVerification.python to .ci-mgmt.yaml pointing to the directory containing a Pulumi python project to preview." | ||
- run: echo "::warning file=.ci-mgmt.yaml,title=Dotnet release verification missing::Add the key releaseVerification.dotnet to .ci-mgmt.yaml pointing to the directory containing a Pulumi dotnet project to preview." | ||
- run: echo "::warning file=.ci-mgmt.yaml,title=Go release verification missing::Add the key releaseVerification.python to .ci-mgmt.yaml pointing to the directory containing a Pulumi go project to preview." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
It feels like we could expand this matrix to also include language. That would give us parallelism and reduce repeated code.
You might need to build a simple lookup table to map
#{{ .Config.releaseVerification.nodejs }}#
tonodejs
, perhaps using GH action outputs.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.
I had considered putting the runtime in the matrix, but given we're only doing a preview, this is a very fast run - most of the time is spent just installing dependencies. We could tweak the way it runs so we still report all the tests even if earlier steps fail if we like.