-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Downstream check replacement (#1442)
Implements a replacement for downstream checks. The intention is to allow bridge maintainers to "try out" a change on existing real-world providers. In contrast to how downstream checks used to work, this mechanism runs full build+test cycle on each provider under test. Specifically, a new workflow, upgrade-providers-test.yml is added that can be triggered on-demand through the Actions tab, selecting a desired bridge branch or reference. This workflow takes a dozen of real providers and upgrades them to the desired bridge reference, creating new PRs in these providers' repositories. The PRs cross-link back to the bridge PR. The workflow needs to be used sparingly at the moment as it is expensive in consuming CI runner time.
- Loading branch information
Showing
2 changed files
with
59 additions
and
49 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }} | ||
|
||
name: Pull Request & Downstream Testing | ||
name: Pull Request | ||
|
||
on: [pull_request] | ||
|
||
|
@@ -52,51 +52,3 @@ jobs: | |
uses: codecov/codecov-action@v3 | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
downstream-test: | ||
name: Test ${{ matrix.provider }} Downstream | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
provider: [ "azuread", "random", ] | ||
steps: | ||
- name: Install Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '14.x' | ||
- name: Install Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.9.x | ||
- name: Install Pulumi CLI | ||
uses: pulumi/[email protected] | ||
- name: Install pulumictl | ||
uses: jaxxstorm/[email protected] | ||
with: | ||
repo: pulumi/pulumictl | ||
|
||
- name: Check out source code | ||
uses: actions/checkout@master | ||
- name: Install Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.21.x | ||
cache-dependency-path: | | ||
**/go.sum | ||
# Required to pin Gradle < 8.0 until downstram tests upgrade to compatible pulumi-java release. | ||
- name: Setup Gradle | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
gradle-version: "7.6" | ||
- name: Test Downstream | ||
uses: pulumi/action-test-provider-downstream@releases/v7 | ||
env: | ||
GOPROXY: "https://proxy.golang.org" | ||
with: | ||
downstream-name: pulumi-${{ matrix.provider }} | ||
downstream-url: https://github.com/pulumi/pulumi-${{ matrix.provider }} | ||
pulumi-bot-token: ${{ secrets.PULUMI_BOT_TOKEN }} | ||
github-actions-token: ${{ secrets.GITHUB_TOKEN }} | ||
use-provider-dir: true | ||
replacements: github.com/pulumi/pulumi-terraform-bridge/v3=pulumi-terraform-bridge,github.com/pulumi/pulumi-terraform-bridge/x/muxer=pulumi-terraform-bridge/x/muxer,github.com/pulumi/pulumi-terraform-bridge/pf=pulumi-terraform-bridge/pf |
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,58 @@ | ||
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: {} | ||
|
||
# # 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: | ||
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@v2 | ||
with: | ||
token: ${{ secrets.PULUMI_BOT_TOKEN }} | ||
repository: pulumi/${{ matrix.provider }} | ||
event-type: upgrade-bridge | ||
client-payload: |- | ||
{ | ||
"target-bridge-version": ${{ toJSON(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/${{github.sha}}\n\nDO NOT MERGE.", | ||
"automerge": false | ||
} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
provider: | ||
- pulumi-aiven | ||
- pulumi-auth0 | ||
- pulumi-aws | ||
- pulumi-azure | ||
- pulumi-azuread | ||
- pulumi-cloudflare | ||
- pulumi-datadog | ||
- pulumi-digitalocean | ||
- pulumi-docker | ||
- pulumi-fastly | ||
- pulumi-gcp | ||
- pulumi-github | ||
- pulumi-hcloud | ||
- pulumi-okta | ||
- pulumi-random | ||
- pulumi-tls |