Test the bridge by previewing provider bridge upgrades #110
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
name: Test the bridge by previewing provider bridge upgrades | |
on: | |
# These checks can be triggerred manually from the Actions tab, which already lets you specify | |
# which branch of the bridge to use for testing. | |
workflow_dispatch: | |
inputs: | |
pulumiVersion: | |
description: pulumi/pulumi version to use | |
type: string | |
default: "" | |
required: false | |
bridgeVersion: | |
description: 'Version of Bridge to upgrade to; defaults to current sha' | |
type: string | |
default: "" | |
required: false | |
# # Alternatively, they can be triggered by opening a feature-* branch. Not having these enabled on | |
# # normal branches and PRs is intentional as the checks consume a lot of resources. | |
# push: | |
# branches: | |
# - feature-** | |
# paths-ignore: | |
# - CHANGELOG.md | |
# tags-ignore: | |
# - "*" | |
# - "**" | |
jobs: | |
generate-providers-list: | |
runs-on: ubuntu-latest | |
steps: | |
- id: get-providers | |
run: echo "providers=$(jq . <(curl https://raw.githubusercontent.com/pulumi/ci-mgmt/master/provider-ci/providers.json) --compact-output)" >> "$GITHUB_OUTPUT" | |
outputs: | |
providers: ${{ steps.get-providers.outputs.providers }} | |
build: | |
runs-on: ubuntu-latest | |
name: Test upgrading ${{ matrix.provider }} to pulumi-terraform-bridge ${{ github.sha }} | |
steps: | |
- name: Trigger upgrade | |
uses: peter-evans/repository-dispatch@v3 | |
with: | |
token: ${{ secrets.PULUMI_BOT_TOKEN }} | |
repository: pulumi/pulumi-${{ matrix.provider }} | |
event-type: upgrade-bridge-test | |
client-payload: |- | |
{ | |
"target-pulumi-version": ${{ toJSON(github.event.inputs.pulumiVersion) }}, | |
"target-bridge-version": ${{ toJSON(github.event.inputs.bridgeVersion != '' && github.event.inputs.bridgeVersion || github.sha) }}, | |
"pr-reviewers": ${{ toJSON( github.triggering_actor || 't0yv0' ) }}, | |
"pr-description": "This PR was created to test a pulumi/pulumi-terraform-bridge feature.\n\n- pulumi/pulumi-terraform-bridge#${{ github.event.number }}\n\n- https://github.com/pulumi/pulumi-terraform-bridge/commit/${{github.sha}}\n\nDO NOT MERGE.", | |
"automerge": false, | |
"pr-title-prefix": "[DOWNSTREAM TEST][BRIDGE]" | |
} | |
needs: generate-providers-list | |
strategy: | |
# GitHub recommends only issuing 1 API request per second, and never | |
# concurrently. For more information, see: | |
# https://docs.github.com/en/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits | |
max-parallel: 1 | |
matrix: | |
provider: ${{ fromJson(needs.generate-providers-list.outputs.providers ) }} | |
fail-fast: false |