From 9892c9d44d26baa41432535610a782eb05987352 Mon Sep 17 00:00:00 2001 From: Ringo De Smet Date: Mon, 2 Dec 2024 14:05:36 +0100 Subject: [PATCH] Remove resync-build workflow (#1186) The `resync-build` workflow copies a set of generated files from `ci-mgmt` into the respective provider repo. https://github.com/pulumi/ci-mgmt/blob/5c4c4b9781e6baeba99ed540065bcc4c2be763c9/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/resync-build.yml#L34 These files are no longer available in `ci-mgmt`, which makes this workflow deprecated. Cleaning up as a result. --- provider-ci/internal/pkg/generate.go | 2 + .../.github/workflows/resync-build.yml | 77 ------------- .../acme/.github/workflows/resync-build.yml | 89 --------------- .../aws/.github/workflows/resync-build.yml | 93 ---------------- .../.github/workflows/resync-build.yml | 91 --------------- .../docker/.github/workflows/resync-build.yml | 104 ------------------ 6 files changed, 2 insertions(+), 454 deletions(-) delete mode 100644 provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/resync-build.yml delete mode 100644 provider-ci/test-providers/acme/.github/workflows/resync-build.yml delete mode 100644 provider-ci/test-providers/aws/.github/workflows/resync-build.yml delete mode 100644 provider-ci/test-providers/cloudflare/.github/workflows/resync-build.yml delete mode 100644 provider-ci/test-providers/docker/.github/workflows/resync-build.yml diff --git a/provider-ci/internal/pkg/generate.go b/provider-ci/internal/pkg/generate.go index a2d76c9b2..8211e7df9 100644 --- a/provider-ci/internal/pkg/generate.go +++ b/provider-ci/internal/pkg/generate.go @@ -112,12 +112,14 @@ func getDeletedFiles(templateName string) []string { case "bridged-provider": return []string{ ".github/workflows/check-upstream-upgrade.yml", + ".github/workflows/resync-build.yml", "scripts/upstream.sh", ".goreleaser.yml", ".goreleaser.prerelease.yml", } case "external-bridged-provider": return []string{ + ".github/workflows/resync-build.yml", "scripts/upstream.sh", ".goreleaser.yml", ".goreleaser.prerelease.yml", diff --git a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/resync-build.yml b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/resync-build.yml deleted file mode 100644 index e89d94500..000000000 --- a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/resync-build.yml +++ /dev/null @@ -1,77 +0,0 @@ -# WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi/ci-mgmt - -env: - PULUMI_EXTRA_MAPPING_ERROR: #{{ .Config.FailOnExtraMapping }}# - PULUMI_MISSING_MAPPING_ERROR: #{{ .Config.FailOnMissingMapping }}# -#{{ .Config.Env | toYaml | indent 2 }}# -jobs: - resync_build: - name: resync-build - runs-on: #{{ .Config.Runner.Default }}# - steps: - - name: Checkout Repo - uses: #{{ .Config.ActionVersions.Checkout }}# - with: - #{{- if .Config.CheckoutSubmodules }}# - submodules: #{{ .Config.CheckoutSubmodules }}# - #{{- end }}# - # Persist credentials so we can push a new branch. - persist-credentials: true - - name: Checkout repo - uses: #{{ .Config.ActionVersions.Checkout }}# - with: - path: ci-mgmt - repository: pulumi/ci-mgmt - persist-credentials: false - - id: run-url - name: Create URL to the run output - run: echo "run-url=https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" >> "$GITHUB_OUTPUT" - - name: Setup tools - uses: ./.github/actions/setup-tools - with: - tools: pulumictl, pulumicli, go, nodejs, dotnet, python - - name: Sync with ci-mgmt - run: cp -r "ci-mgmt/provider-ci/providers/$PROVIDER/repo/." . - - name: Remove ci-mgmt directory - run: rm -rf ci-mgmt - - name: Required entries for gitignore - run: |- - cat <<- EOF > "$RUNNER_TEMP/gitignore" - sdk/java/build - sdk/java/.gradle - sdk/java/gradle - sdk/java/gradlew - sdk/java/gradlew.bat - EOF - shell: bash - - name: Adding missing lines to .gitignore - run: | - comm -23 <(sort "$RUNNER_TEMP/gitignore") <(sort .gitignore) >> .gitignore.temp - cat .gitignore.temp >> .gitignore - rm .gitignore.temp - shell: bash - - name: Build - run: make build - - name: Create PR (no linked issue) - uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5 - with: - author: pulumi-bot - base: #{{ .Config.ProviderDefaultBranch }}# - body: This pull request was generated automatically by the resync-build workflow - in this repository. - branch: pulumi-bot/resync-${{ github.run_id}} - commit-message: Resync build for pulumi-#{{ .Config.Provider }}# - committer: pulumi-bot - labels: impact/no-changelog-required - team-reviewers: platform-integrations - title: Fix up build for pulumi-#{{ .Config.Provider }}# - token: ${{ secrets.PULUMI_BOT_TOKEN }} -name: Resync build -on: - workflow_dispatch: - inputs: - automerge: - default: false - description: Mark created PR for auto-merging? - required: true - type: boolean diff --git a/provider-ci/test-providers/acme/.github/workflows/resync-build.yml b/provider-ci/test-providers/acme/.github/workflows/resync-build.yml deleted file mode 100644 index e60043fab..000000000 --- a/provider-ci/test-providers/acme/.github/workflows/resync-build.yml +++ /dev/null @@ -1,89 +0,0 @@ -# WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi/ci-mgmt - -env: - PULUMI_EXTRA_MAPPING_ERROR: true - PULUMI_MISSING_MAPPING_ERROR: true - 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 - 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 }} - TF_APPEND_USER_AGENT: pulumi -jobs: - resync_build: - name: resync-build - runs-on: ubuntu-latest - steps: - - name: Checkout Repo - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - with: - # Persist credentials so we can push a new branch. - persist-credentials: true - - name: Checkout repo - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - with: - path: ci-mgmt - repository: pulumi/ci-mgmt - persist-credentials: false - - id: run-url - name: Create URL to the run output - run: echo "run-url=https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" >> "$GITHUB_OUTPUT" - - name: Setup tools - uses: ./.github/actions/setup-tools - with: - tools: pulumictl, pulumicli, go, nodejs, dotnet, python - - name: Sync with ci-mgmt - run: cp -r "ci-mgmt/provider-ci/providers/$PROVIDER/repo/." . - - name: Remove ci-mgmt directory - run: rm -rf ci-mgmt - - name: Required entries for gitignore - run: |- - cat <<- EOF > "$RUNNER_TEMP/gitignore" - sdk/java/build - sdk/java/.gradle - sdk/java/gradle - sdk/java/gradlew - sdk/java/gradlew.bat - EOF - shell: bash - - name: Adding missing lines to .gitignore - run: | - comm -23 <(sort "$RUNNER_TEMP/gitignore") <(sort .gitignore) >> .gitignore.temp - cat .gitignore.temp >> .gitignore - rm .gitignore.temp - shell: bash - - name: Build - run: make build - - name: Create PR (no linked issue) - uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5 - with: - author: pulumi-bot - base: main - body: This pull request was generated automatically by the resync-build workflow - in this repository. - branch: pulumi-bot/resync-${{ github.run_id}} - commit-message: Resync build for pulumi-acme - committer: pulumi-bot - labels: impact/no-changelog-required - team-reviewers: platform-integrations - title: Fix up build for pulumi-acme - token: ${{ secrets.PULUMI_BOT_TOKEN }} -name: Resync build -on: - workflow_dispatch: - inputs: - automerge: - default: false - description: Mark created PR for auto-merging? - required: true - type: boolean diff --git a/provider-ci/test-providers/aws/.github/workflows/resync-build.yml b/provider-ci/test-providers/aws/.github/workflows/resync-build.yml deleted file mode 100644 index eeefa4fe4..000000000 --- a/provider-ci/test-providers/aws/.github/workflows/resync-build.yml +++ /dev/null @@ -1,93 +0,0 @@ -# WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi/ci-mgmt - -env: - PULUMI_EXTRA_MAPPING_ERROR: true - PULUMI_MISSING_MAPPING_ERROR: true - 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 }} - OIDC_ROLE_ARN: ${{ secrets.OIDC_ROLE_ARN }} - 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 }} - TF_APPEND_USER_AGENT: pulumi -jobs: - resync_build: - name: resync-build - runs-on: ubuntu-latest - steps: - - name: Checkout Repo - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - with: - submodules: true - # Persist credentials so we can push a new branch. - persist-credentials: true - - name: Checkout repo - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - with: - path: ci-mgmt - repository: pulumi/ci-mgmt - persist-credentials: false - - id: run-url - name: Create URL to the run output - run: echo "run-url=https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" >> "$GITHUB_OUTPUT" - - name: Setup tools - uses: ./.github/actions/setup-tools - with: - tools: pulumictl, pulumicli, go, nodejs, dotnet, python - - name: Sync with ci-mgmt - run: cp -r "ci-mgmt/provider-ci/providers/$PROVIDER/repo/." . - - name: Remove ci-mgmt directory - run: rm -rf ci-mgmt - - name: Required entries for gitignore - run: |- - cat <<- EOF > "$RUNNER_TEMP/gitignore" - sdk/java/build - sdk/java/.gradle - sdk/java/gradle - sdk/java/gradlew - sdk/java/gradlew.bat - EOF - shell: bash - - name: Adding missing lines to .gitignore - run: | - comm -23 <(sort "$RUNNER_TEMP/gitignore") <(sort .gitignore) >> .gitignore.temp - cat .gitignore.temp >> .gitignore - rm .gitignore.temp - shell: bash - - name: Build - run: make build - - name: Create PR (no linked issue) - uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5 - with: - author: pulumi-bot - base: master - body: This pull request was generated automatically by the resync-build workflow - in this repository. - branch: pulumi-bot/resync-${{ github.run_id}} - commit-message: Resync build for pulumi-aws - committer: pulumi-bot - labels: impact/no-changelog-required - team-reviewers: platform-integrations - title: Fix up build for pulumi-aws - token: ${{ secrets.PULUMI_BOT_TOKEN }} -name: Resync build -on: - workflow_dispatch: - inputs: - automerge: - default: false - description: Mark created PR for auto-merging? - required: true - type: boolean diff --git a/provider-ci/test-providers/cloudflare/.github/workflows/resync-build.yml b/provider-ci/test-providers/cloudflare/.github/workflows/resync-build.yml deleted file mode 100644 index c35e3d6cf..000000000 --- a/provider-ci/test-providers/cloudflare/.github/workflows/resync-build.yml +++ /dev/null @@ -1,91 +0,0 @@ -# WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi/ci-mgmt - -env: - PULUMI_EXTRA_MAPPING_ERROR: true - PULUMI_MISSING_MAPPING_ERROR: true - CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} - CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} - 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 - 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 }} - TF_APPEND_USER_AGENT: pulumi -jobs: - resync_build: - name: resync-build - runs-on: ubuntu-latest - steps: - - name: Checkout Repo - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - with: - # Persist credentials so we can push a new branch. - persist-credentials: true - - name: Checkout repo - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - with: - path: ci-mgmt - repository: pulumi/ci-mgmt - persist-credentials: false - - id: run-url - name: Create URL to the run output - run: echo "run-url=https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" >> "$GITHUB_OUTPUT" - - name: Setup tools - uses: ./.github/actions/setup-tools - with: - tools: pulumictl, pulumicli, go, nodejs, dotnet, python - - name: Sync with ci-mgmt - run: cp -r "ci-mgmt/provider-ci/providers/$PROVIDER/repo/." . - - name: Remove ci-mgmt directory - run: rm -rf ci-mgmt - - name: Required entries for gitignore - run: |- - cat <<- EOF > "$RUNNER_TEMP/gitignore" - sdk/java/build - sdk/java/.gradle - sdk/java/gradle - sdk/java/gradlew - sdk/java/gradlew.bat - EOF - shell: bash - - name: Adding missing lines to .gitignore - run: | - comm -23 <(sort "$RUNNER_TEMP/gitignore") <(sort .gitignore) >> .gitignore.temp - cat .gitignore.temp >> .gitignore - rm .gitignore.temp - shell: bash - - name: Build - run: make build - - name: Create PR (no linked issue) - uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5 - with: - author: pulumi-bot - base: master - body: This pull request was generated automatically by the resync-build workflow - in this repository. - branch: pulumi-bot/resync-${{ github.run_id}} - commit-message: Resync build for pulumi-cloudflare - committer: pulumi-bot - labels: impact/no-changelog-required - team-reviewers: platform-integrations - title: Fix up build for pulumi-cloudflare - token: ${{ secrets.PULUMI_BOT_TOKEN }} -name: Resync build -on: - workflow_dispatch: - inputs: - automerge: - default: false - description: Mark created PR for auto-merging? - required: true - type: boolean diff --git a/provider-ci/test-providers/docker/.github/workflows/resync-build.yml b/provider-ci/test-providers/docker/.github/workflows/resync-build.yml deleted file mode 100644 index 67861fb0e..000000000 --- a/provider-ci/test-providers/docker/.github/workflows/resync-build.yml +++ /dev/null @@ -1,104 +0,0 @@ -# WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi/ci-mgmt - -env: - PULUMI_EXTRA_MAPPING_ERROR: true - PULUMI_MISSING_MAPPING_ERROR: true - ARM_CLIENT_ID: 30e520fa-12b4-4e21-b473-9426c5ac2e1e - ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }} - ARM_SUBSCRIPTION_ID: 0282681f-7a9e-424b-80b2-96babd57a8a1 - ARM_TENANT_ID: 706143bc-e1d4-4593-aee2-c9dc60ab9be7 - AWS_REGION: us-west-2 - AZURE_LOCATION: westus - DIGITALOCEAN_TOKEN: ${{ secrets.DIGITALOCEAN_TOKEN }} - DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GOOGLE_CI_SERVICE_ACCOUNT_EMAIL: pulumi-ci@pulumi-ci-gcp-provider.iam.gserviceaccount.com - GOOGLE_CI_WORKLOAD_IDENTITY_POOL: pulumi-ci - GOOGLE_CI_WORKLOAD_IDENTITY_PROVIDER: pulumi-ci - GOOGLE_PROJECT: pulumi-ci-gcp-provider - GOOGLE_PROJECT_NUMBER: "895284651812" - GOOGLE_REGION: us-central1 - GOOGLE_ZONE: us-central1-a - 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 - 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 }} - TF_APPEND_USER_AGENT: pulumi -jobs: - resync_build: - name: resync-build - runs-on: ubuntu-latest - steps: - - name: Checkout Repo - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - with: - # Persist credentials so we can push a new branch. - persist-credentials: true - - name: Checkout repo - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - with: - path: ci-mgmt - repository: pulumi/ci-mgmt - persist-credentials: false - - id: run-url - name: Create URL to the run output - run: echo "run-url=https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" >> "$GITHUB_OUTPUT" - - name: Setup tools - uses: ./.github/actions/setup-tools - with: - tools: pulumictl, pulumicli, go, nodejs, dotnet, python - - name: Sync with ci-mgmt - run: cp -r "ci-mgmt/provider-ci/providers/$PROVIDER/repo/." . - - name: Remove ci-mgmt directory - run: rm -rf ci-mgmt - - name: Required entries for gitignore - run: |- - cat <<- EOF > "$RUNNER_TEMP/gitignore" - sdk/java/build - sdk/java/.gradle - sdk/java/gradle - sdk/java/gradlew - sdk/java/gradlew.bat - EOF - shell: bash - - name: Adding missing lines to .gitignore - run: | - comm -23 <(sort "$RUNNER_TEMP/gitignore") <(sort .gitignore) >> .gitignore.temp - cat .gitignore.temp >> .gitignore - rm .gitignore.temp - shell: bash - - name: Build - run: make build - - name: Create PR (no linked issue) - uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5 - with: - author: pulumi-bot - base: master - body: This pull request was generated automatically by the resync-build workflow - in this repository. - branch: pulumi-bot/resync-${{ github.run_id}} - commit-message: Resync build for pulumi-docker - committer: pulumi-bot - labels: impact/no-changelog-required - team-reviewers: platform-integrations - title: Fix up build for pulumi-docker - token: ${{ secrets.PULUMI_BOT_TOKEN }} -name: Resync build -on: - workflow_dispatch: - inputs: - automerge: - default: false - description: Mark created PR for auto-merging? - required: true - type: boolean