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

feat: add terraform provider as submodule and configure upstream script #24

Merged
merged 9 commits into from
Nov 6, 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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/community-moderation.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# WARNING: This file was build based on https://github.com/pulumi/ci-mgmt
# but it is currently not in sync. Any updates may be done manually
# but it is currently not in sync. Any update must be done manually

name: warn-codegen
on:
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# WARNING: This file was build based on https://github.com/pulumi/ci-mgmt
# but it is currently not in sync. Any updates may be done manually
# but it is currently not in sync. Any update must be done manually

name: lint
on:
Expand Down Expand Up @@ -32,14 +32,13 @@ jobs:
continue-on-error: true # this fails if there are no go:embed directives
run: |
git grep -l 'go:embed' -- provider | xargs sed -i 's/go:embed/ goembed/g'
# TODO add upstream
# - name: prepare upstream
# continue-on-error: true
# run: make upstream
- name: prepare upstream
continue-on-error: true
run: make upstream
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.54.1
version: v1.55.2
working-directory: provider
- if: failure() && github.event_name == 'push'
name: Notify Slack
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/run-acceptance-tests.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# WARNING: This file was build based on https://github.com/pulumi/ci-mgmt
# but it is currently not in sync. Any updates may be done manually
# but it is currently not in sync. Any update must be done manually

name: run-acceptance-tests
on:
Expand Down Expand Up @@ -316,7 +316,7 @@ jobs:
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-version: "7.4.1"
gradle-version: "7.6"
- name: Download provider + tfgen binaries
uses: actions/download-artifact@v2
with:
Expand Down Expand Up @@ -350,6 +350,8 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: v2.4.0
- name: Make upstream
run: make upstream
- name: Run tests
run: cd examples && go test -v -json -count=1 -cover -timeout 2h -tags=${{
matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt
Expand Down
85 changes: 85 additions & 0 deletions .github/workflows/upgrade-bridge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# WARNING: This file was build based on https://github.com/pulumi/ci-mgmt
# but it is currently not in sync. Any update must be done manually

name: Upgrade bridge
on:
repository_dispatch:
types:
- upgrade-bridge
workflow_dispatch:
inputs:
target-bridge-version:
description: pulumi-terraform-bridge version or hash reference
required: false
type: string
default: "latest"
pr-reviewers:
description: Reviewers to assign to the auto-opened pull request
required: false
type: string
default: ""
pr-description:
description: Extra description to add to the auto-opened pull request
required: false
type: string
default: ""
automerge:
description: Mark created PR for auto-merging?
required: false
type: boolean
default: false
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
upgrade_provider:
name: upgrade-provider
runs-on: ubuntu-latest
steps:
- name: Call upgrade provider action
if: github.event_name == 'workflow_dispatch'
uses: pulumi/[email protected]
with:
kind: bridge
email: [email protected]
username: GitHub
automerge: ${{ inputs.automerge }}
target-bridge-version: ${{ inputs.target-bridge-version }}
pr-reviewers: ${{ inputs.pr-reviewers }}
pr-description: ${{ inputs.pr-description }}
- name: Call upgrade provider action
if: github.event_name == 'repository_dispatch'
uses: pulumi/[email protected]
with:
kind: bridge
email: [email protected]
username: GitHub
automerge: ${{ github.event.client_payload.automerge }}
target-bridge-version: ${{ github.event.client_payload.target-bridge-version }}
pr-reviewers: ${{ github.event.client_payload.pr-reviewers }}
pr-description: ${{ github.event.client_payload.pr-description }}
## TODO
# - env:
# SLACK_CHANNEL: provider-upgrade-publish-status
# SLACK_COLOR: "#7CFC00"
# SLACK_ICON_EMOJI: ":taco:"
# SLACK_MESSAGE: >-
# Upgrade succeeded :heart_decoration:

# PR opened at github.com/pulumi/${{ github.event.repository.name }}/pulls
# SLACK_TITLE: ${{ github.event.repository.name }} upgrade result
# SLACK_USERNAME: provider-bot
# SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
# name: Send Upgrade Success To Slack
# uses: rtCamp/action-slack-notify@v2
# - env:
# SLACK_CHANNEL: provider-upgrade-publish-status
# SLACK_COLOR: "#FF0000"
# SLACK_ICON_EMOJI: ":taco:"
# SLACK_MESSAGE: " Upgrade failed :x:"
# SLACK_TITLE: ${{ github.event.repository.name }} upgrade result
# SLACK_USERNAME: provider-bot
# SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
# if: failure()
# name: Send Upgrade Failure To Slack
# uses: rtCamp/action-slack-notify@v2
49 changes: 49 additions & 0 deletions .github/workflows/upgrade-provider.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# WARNING: This file was build based on https://github.com/pulumi/ci-mgmt
# but it is currently not in sync. Any update must be done manually

name: Upgrade provider
on:
issues:
types:
- opened
workflow_dispatch: {}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
upgrade_provider:
if: ${{ contains(github.event.issue.title, 'Upgrade terraform-provider-') || github.event_name == 'workflow_dispatch' }}
name: upgrade-provider
runs-on: ubuntu-latest
steps:
- name: Call upgrade provider action
uses: pulumi/[email protected]
with:
kind: all
email: [email protected]
username: GitHub
## TODO
# - env:
# SLACK_CHANNEL: provider-upgrade-publish-status
# SLACK_COLOR: "#7CFC00"
# SLACK_ICON_EMOJI: ":taco:"
# SLACK_MESSAGE: >-
# Upgrade succeeded :heart_decoration:

# PR opened at github.com/pulumi/${{ github.event.repository.name }}/pulls
# SLACK_TITLE: ${{ github.event.repository.name }} upgrade result
# SLACK_USERNAME: provider-bot
# SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
# name: Send Upgrade Success To Slack
# uses: rtCamp/action-slack-notify@v2
# - env:
# SLACK_CHANNEL: provider-upgrade-publish-status
# SLACK_COLOR: "#FF0000"
# SLACK_ICON_EMOJI: ":taco:"
# SLACK_MESSAGE: " Upgrade failed :x:"
# SLACK_TITLE: ${{ github.event.repository.name }} upgrade result
# SLACK_USERNAME: provider-bot
# SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
# if: failure()
# name: Send Upgrade Failure To Slack
# uses: rtCamp/action-slack-notify@v2
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "upstream"]
path = upstream
url = https://github.com/equinix/terraform-provider-equinix.git
ignore = dirty
1 change: 1 addition & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ builds:
ldflags:
# The line below MUST align with the module in current provider/go.mod
- -X github.com/equinix/pulumi-equinix/provider/pkg/version.Version={{.Tag }}
- -X github.com/equinix/terraform-provider-equinix/version.ProviderVersion|={{.Tag}}
main: ./cmd/pulumi-resource-equinix/
changelog:
skip: true
Expand Down
8 changes: 8 additions & 0 deletions .upgrade-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# WARNING: This file was build based on https://github.com/pulumi/ci-mgmt
# but it is currently not in sync. Any update must be done manually

---
upstream-provider-name: terraform-provider-equinix
remove-plugins: true
pr-reviewers: equinix/governor-devrel-engineering
javaVersion: "v0.9.8"
Loading