Skip to content

Commit

Permalink
Automated provider upgrade (#20)
Browse files Browse the repository at this point in the history
* fix: 1) Add getOrgs & defaultOidcSettings 2) Upgrade provider & SDK 3) Fix CVEs (#16)

* fix: Add missing getOrgs & defaultOidcSettings mappings

* Migrate to provider v1.0.3

* Upgrade to go 1.21

* Upgrade SDK

* Fix build

* Fix build

* Upgrade dotnet version

* ci: Automate upstream provider upgrade (#13)

* ci: Automate upstream provider upgrade

* Add upgrade config

* Add pr trigger

* Fix build

* Fix build

* Fix build

* Fix kind

* Upgrade only provider

* Tyr getting releases

* Add gh token

* Run release

* Fix auth

* Add permissions

* Add write permission

* Switch back to shared action

* Switch back

* Add GH token

* Try top level

* Try to create PR

* Fix CI

* Fix repo

* Fix CI

* Fix branch script

* Return back upgrade-provider

* remove old_version

* Add GH TOKEN

* Switch to shared action

* Move back to push trigger

* upgrade to latest go

* Upgrade provider only

* Upgrade all

* Upgrade to go 1.21

* Bump Go SDK version

* Try to fix go tidy

* Switch back to provider only

* Switch to old provider version

* Fix build

* Fix build

* Try out next version

* Add cron

* Rebuild

* Retarget CI to master

* Activate upgrade provider CI

* Fix branch name

* Fix build

* feat: Upgrade provider to 1.0.4

* chore: 1) Switch to latest VTL action 2) Disable update-provider

* Fix trigger

* Get rid of master ci
  • Loading branch information
vavsab authored Dec 1, 2023
1 parent 12a3895 commit 7b94b9f
Show file tree
Hide file tree
Showing 347 changed files with 17,540 additions and 4,508 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RUN apt-get update && \
# See README.md

# Install go
ARG GO_VERSION=1.18.3
ARG GO_VERSION=1.21.1
RUN rm -rf /usr/local/go && \
wget -O ${GO_VERSION}.tar.gz https://golang.org/dl/go${GO_VERSION}.linux-amd64.tar.gz && \
tar -C /usr/local -xzf ${GO_VERSION}.tar.gz && \
Expand Down
13 changes: 10 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,18 @@ on:

jobs:
prerequisites:
uses: pulumiverse/infra/.github/workflows/[email protected]
permissions:
pull-requests: write
uses: pulumiverse/infra/.github/workflows/[email protected]
with:
provider: zitadel
goversion: 1.21.x
build:
needs: prerequisites
uses: pulumiverse/infra/.github/workflows/[email protected].1
uses: pulumiverse/infra/.github/workflows/[email protected].4
with:
provider: zitadel
provider: zitadel
goversion: 1.21.x
dotnetversion: 6.0.300
nodeversion: 14.x
pythonversion: 3.9
17 changes: 12 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: release
on:
push:
tags:
- v*.*.*
branches:
- main
env:
# THIS GITHUB_TOKEN IS A REQUIREMENT TO BE ABLE TO WRITE TO GH RELEASES
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -36,6 +36,13 @@ jobs:
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Bump version
uses: mapped/action-vtl@latest
with:
baseVersion: 0.0.17
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
# No need to create VERSION file
versionFile: ""
- name: Unshallow clone for tags
run: git fetch --prune --unshallow --tags
- name: Install Go
Expand All @@ -57,7 +64,7 @@ jobs:
fail-fast: true
matrix:
goversion:
- 1.18.x
- 1.21.x
publish_sdk:
name: Publish SDKs
runs-on: ubuntu-latest
Expand Down Expand Up @@ -125,9 +132,9 @@ jobs:
fail-fast: true
matrix:
dotnetversion:
- 3.1.301
- 6.0.300
goversion:
- 1.18.x
- 1.21.x
language:
- nodejs
- python
Expand Down
61 changes: 61 additions & 0 deletions .github/workflows/upgrade-provider.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Upgrade provider
on:
workflow_dispatch:

schedule:
- cron: "0 5 * * *"

env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
# TODO: Switch to shared CI like here
# https://github.com/pulumiverse/pulumi-vercel/blob/main/.github/workflows/upgrade-provider.yml
# after this issue is fixed
# https://github.com/pulumi/upgrade-provider/issues/179
# or when have time to fix failing go mod tidy in "all" mode.
upgrade_provider:
name: upgrade-provider
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
issues: write
steps:
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.21.x
- name: Install pulumictl
uses: jaxxstorm/[email protected]
with:
repo: pulumi/pulumictl
- name: Install Pulumi CLI
uses: pulumi/actions@v4
- name: Checkout repo
uses: actions/checkout@v3
with:
# TODO: Return back when permissions are fixed
# https://pulumi-community.slack.com/archives/C037PV12W6L/p1698447153384709?thread_ts=1697543021.775809&cid=C037PV12W6L
ref: master
# ref: ${{ github.ref_name }}

- name: Unshallow clone for tags
run: git fetch --prune --unshallow --tags
shell: bash
- name: Install upgrade-provider
run: go install github.com/pulumi/upgrade-provider@176a45cf2471d5fccd6235c385ba1ec17b74a37f
shell: bash
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-version: "7.6"
- name: "Set up git identity: name"
run: git config --global user.name 'vavsab'
shell: bash
- name: Run upgrade-provider
run: |
upgrade-provider "$REPO" --kind="provider" --pr-reviewers="vavsab"
shell: bash
env:
GH_TOKEN: ${{ env.GH_TOKEN }}
REPO: ${{ github.repository }}
2 changes: 2 additions & 0 deletions .upgrade-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
upstream-provider-name: terraform-provider-zitadel
pr-assign: vavsab
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ build_nodejs:: install_plugins tfgen # build the node sdk
cd sdk/nodejs/ && \
yarn install && \
yarn run tsc && \
cp -R scripts/ bin && \
cp ../../README.md ../../LICENSE package.json yarn.lock ./bin/ && \
sed -i.bak -e "s/\$${VERSION}/$(VERSION)/g" ./bin/package.json

Expand Down
2 changes: 1 addition & 1 deletion examples/go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/pulumiverse/pulumi-zitadel/examples

go 1.16
go 1.21
659 changes: 465 additions & 194 deletions provider/cmd/pulumi-resource-zitadel/schema.json

Large diffs are not rendered by default.

Loading

0 comments on commit 7b94b9f

Please sign in to comment.