Skip to content
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

Fix release automation #1471

Merged
merged 7 commits into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/update-providers-auto.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Update Providers with new bridge version upon release
on:
push:
tags:
# Typically pf* module is tagged after the main module, so this is a good time to fire off
# automatic downstream upgrades.
- 'pf/**'

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

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: Upgrade ${{ matrix.provider }} to pulumi-terraform-bridge to the latest version automatically
steps:
- name: Trigger upgrade
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.PULUMI_BOT_TOKEN }}
repository: pulumi/pulumi-${{ matrix.provider }}
event-type: upgrade-bridge
# Not specifying target-bridge-version in the payload will make it upgrade to the latest.
client-payload: |-
{
"pr-reviewers": "t0yv0",
"automerge": true
}
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
11 changes: 0 additions & 11 deletions .github/workflows/update-providers-ci-mgmt.yml

This file was deleted.

89 changes: 32 additions & 57 deletions .github/workflows/update-providers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,72 +5,47 @@ on:
bridgeVersion:
description: 'Version of Bridge to upgrade to'
required: true
automerge:
description: 'Whether to automerge the PRs'
type: boolean
default: false
required: false

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

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: Upgrade ${{ matrix.provider }} to pulumi-terraform-bridge ${{ github.event.inputs.bridgeVersion }}
steps:
- name: Install pulumictl
uses: jaxxstorm/[email protected]
- name: Trigger upgrade
uses: peter-evans/repository-dispatch@v2
with:
repo: pulumi/pulumictl
- name: Trigger Update
run: pulumictl dispatch -r pulumi/${{ matrix.provider }} -c update-bridge ${{ github.event.inputs.bridgeVersion }}
env:
GITHUB_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN}}
token: ${{ secrets.PULUMI_BOT_TOKEN }}
repository: pulumi/pulumi-${{ matrix.provider }}
event-type: upgrade-bridge
client-payload: |-
{
"target-bridge-version": ${{ toJSON(github.event.inputs.bridgeVersion) }},
"pr-reviewers": ${{ toJSON( github.triggering_actor || 't0yv0' ) }},
"automerge": ${{ toJSON(github.event.inputs.automerge) }}
}
needs: generate-providers-list
strategy:
fail-fast: false
# 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:
- pulumi-aiven
- pulumi-akamai
- pulumi-alicloud
- pulumi-auth0
- pulumi-aws
- pulumi-azure
- pulumi-azuread
- pulumi-azuredevops
- pulumi-civo
- pulumi-cloudamqp
- pulumi-cloudflare
- pulumi-cloudinit
- pulumi-consul
- pulumi-datadog
- pulumi-digitalocean
- pulumi-dnsimple
- pulumi-docker
- pulumi-equinix-metal
- pulumi-f5bigip
- pulumi-fastly
- pulumi-gcp
- pulumi-github
- pulumi-gitlab
- pulumi-hcloud
- pulumi-kafka
- pulumi-keycloak
- pulumi-kong
- pulumi-linode
- pulumi-mailgun
- pulumi-mongodbatlas
- pulumi-mysql
- pulumi-newrelic
- pulumi-ns1
- pulumi-okta
- pulumi-openstack
- pulumi-pagerduty
- pulumi-postgresql
- pulumi-rabbitmq
- pulumi-rancher2
- pulumi-random
- pulumi-signalfx
- pulumi-splunk
- pulumi-spotinst
- pulumi-tls
- pulumi-vault
- pulumi-venafi
- pulumi-vsphere
- pulumi-wavefront
provider: ${{ fromJson(needs.generate-providers-list.outputs.providers ) }}
fail-fast: false