-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Part of pulumi/ci-mgmt#915 Bring workflows in line with the approach used in other providers. 1. Use action for checking for unexpected changes - and allow files with the version embedded to change once we've enabled `respectSchemaVersion`. 2. Fix how we calculate the version we're building. Stop relying on the local git checkout to contain all tags. Use a placeholder locally and override the placeholder in CI with the version calculated from our action. - Remove fetching all tags. 3. (Pending) enable `respectSchemaVersion`.
- Loading branch information
1 parent
1e5fee9
commit c94dc01
Showing
17 changed files
with
301 additions
and
194 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 |
---|---|---|
|
@@ -25,20 +25,19 @@ env: | |
NODEVERSION: "18.x" | ||
JAVAVERSION: "11" | ||
jobs: | ||
version: | ||
uses: ./.github/workflows/version.yml | ||
secrets: inherit | ||
lint: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
continue-on-error: true | ||
needs: version | ||
env: | ||
PROVIDER_VERSION: ${{ needs.version.outputs.version }} | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v4 | ||
- name: Checkout Scripts Repo | ||
uses: actions/checkout@v4 | ||
with: | ||
path: ci-scripts | ||
repository: pulumi/scripts | ||
- name: Unshallow clone for tags | ||
run: git fetch --prune --unshallow --tags | ||
- name: Install pulumictl | ||
uses: jaxxstorm/[email protected] | ||
with: | ||
|
@@ -59,17 +58,22 @@ jobs: | |
- name: Lint classic AWSX Code | ||
run: make lint_classic | ||
- name: Check worktree clean | ||
run: ./ci-scripts/ci/check-worktree-is-clean | ||
uses: pulumi/git-status-check-action@v1 | ||
with: | ||
allowed-changes: | | ||
sdk/**/pulumi-plugin.json | ||
sdk/dotnet/Pulumi.*.csproj | ||
sdk/go/**/pulumiUtilities.go | ||
sdk/nodejs/package.json | ||
sdk/python/pyproject.toml | ||
build-provider: | ||
runs-on: ubuntu-latest | ||
needs: version | ||
env: | ||
PROVIDER_VERSION: ${{ needs.version.outputs.version }} | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v4 | ||
- name: Checkout Scripts Repo | ||
uses: actions/checkout@v4 | ||
with: | ||
path: ci-scripts | ||
repository: pulumi/scripts | ||
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v3 | ||
with: | ||
|
@@ -79,8 +83,6 @@ jobs: | |
role-duration-seconds: 3600 | ||
role-session-name: ${{ env.PROVIDER }}@githubActions | ||
role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }} | ||
- name: Unshallow clone for tags | ||
run: git fetch --prune --unshallow --tags | ||
- name: Install Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
|
@@ -107,7 +109,14 @@ jobs: | |
- name: Test provider | ||
run: make test_provider | ||
- name: Check worktree clean | ||
run: ./ci-scripts/ci/check-worktree-is-clean | ||
uses: pulumi/git-status-check-action@v1 | ||
with: | ||
allowed-changes: | | ||
sdk/**/pulumi-plugin.json | ||
sdk/dotnet/Pulumi.*.csproj | ||
sdk/go/**/pulumiUtilities.go | ||
sdk/nodejs/package.json | ||
sdk/python/pyproject.toml | ||
- name: Upload bin | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
|
@@ -128,8 +137,12 @@ jobs: | |
fields: repo,commit,author,action | ||
status: ${{ job.status }} | ||
acceptance-test: | ||
needs: build-provider | ||
runs-on: ubuntu-latest | ||
needs: | ||
- build-provider | ||
- version | ||
env: | ||
PROVIDER_VERSION: ${{ needs.version.outputs.version }} | ||
steps: | ||
- name: Free Disk Space (Ubuntu) | ||
uses: jlumbroso/[email protected] | ||
|
@@ -138,13 +151,6 @@ jobs: | |
swap-storage: false | ||
- name: Checkout Repo | ||
uses: actions/checkout@v4 | ||
- name: Checkout Scripts Repo | ||
uses: actions/checkout@v4 | ||
with: | ||
path: ci-scripts | ||
repository: pulumi/scripts | ||
- name: Unshallow clone for tags | ||
run: git fetch --prune --unshallow --tags | ||
- name: Install pulumictl | ||
uses: jaxxstorm/[email protected] | ||
with: | ||
|
@@ -167,7 +173,14 @@ jobs: | |
- name: Build SDK | ||
run: make build_${{ matrix.language }} | ||
- name: Check worktree clean | ||
run: ./ci-scripts/ci/check-worktree-is-clean | ||
uses: pulumi/git-status-check-action@v1 | ||
with: | ||
allowed-changes: | | ||
sdk/**/pulumi-plugin.json | ||
sdk/dotnet/Pulumi.*.csproj | ||
sdk/go/**/pulumiUtilities.go | ||
sdk/nodejs/package.json | ||
sdk/python/pyproject.toml | ||
- name: Compress SDK folder | ||
run: tar -zcf sdk/${{ matrix.language }}.tar.gz -C sdk/${{ matrix.language }} | ||
. | ||
|
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 |
---|---|---|
|
@@ -25,20 +25,19 @@ env: | |
NODEVERSION: "18.x" | ||
JAVAVERSION: "11" | ||
jobs: | ||
version: | ||
uses: ./.github/workflows/version.yml | ||
secrets: inherit | ||
lint: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
continue-on-error: true | ||
needs: version | ||
env: | ||
PROVIDER_VERSION: ${{ needs.version.outputs.version }} | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v4 | ||
- name: Checkout Scripts Repo | ||
uses: actions/checkout@v4 | ||
with: | ||
path: ci-scripts | ||
repository: pulumi/scripts | ||
- name: Unshallow clone for tags | ||
run: git fetch --prune --unshallow --tags | ||
- name: Install pulumictl | ||
uses: jaxxstorm/[email protected] | ||
with: | ||
|
@@ -59,9 +58,19 @@ jobs: | |
- name: Lint classic AWSX Code | ||
run: make lint_classic | ||
- name: Check worktree clean | ||
run: ./ci-scripts/ci/check-worktree-is-clean | ||
uses: pulumi/git-status-check-action@v1 | ||
with: | ||
allowed-changes: | | ||
sdk/**/pulumi-plugin.json | ||
sdk/dotnet/Pulumi.*.csproj | ||
sdk/go/**/pulumiUtilities.go | ||
sdk/nodejs/package.json | ||
sdk/python/pyproject.toml | ||
build-provider: | ||
runs-on: ubuntu-latest | ||
needs: version | ||
env: | ||
PROVIDER_VERSION: ${{ needs.version.outputs.version }} | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v4 | ||
|
@@ -74,13 +83,6 @@ jobs: | |
role-duration-seconds: 3600 | ||
role-session-name: ${{ env.PROVIDER }}@githubActions | ||
role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }} | ||
- name: Checkout Scripts Repo | ||
uses: actions/checkout@v4 | ||
with: | ||
path: ci-scripts | ||
repository: pulumi/scripts | ||
- name: Unshallow clone for tags | ||
run: git fetch --prune --unshallow --tags | ||
- name: Install Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
|
@@ -107,7 +109,14 @@ jobs: | |
- name: Test provider | ||
run: make test_provider | ||
- name: Check worktree clean | ||
run: ./ci-scripts/ci/check-worktree-is-clean | ||
uses: pulumi/git-status-check-action@v1 | ||
with: | ||
allowed-changes: | | ||
sdk/**/pulumi-plugin.json | ||
sdk/dotnet/Pulumi.*.csproj | ||
sdk/go/**/pulumiUtilities.go | ||
sdk/nodejs/package.json | ||
sdk/python/pyproject.toml | ||
- name: Upload bin | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
|
@@ -128,8 +137,12 @@ jobs: | |
fields: repo,commit,author,action | ||
status: ${{ job.status }} | ||
acceptance-test: | ||
needs: build-provider | ||
runs-on: ubuntu-latest | ||
needs: | ||
- build-provider | ||
- version | ||
env: | ||
PROVIDER_VERSION: ${{ needs.version.outputs.version }} | ||
steps: | ||
- name: Free Disk Space (Ubuntu) | ||
uses: jlumbroso/[email protected] | ||
|
@@ -138,13 +151,6 @@ jobs: | |
swap-storage: false | ||
- name: Checkout Repo | ||
uses: actions/checkout@v4 | ||
- name: Checkout Scripts Repo | ||
uses: actions/checkout@v4 | ||
with: | ||
path: ci-scripts | ||
repository: pulumi/scripts | ||
- name: Unshallow clone for tags | ||
run: git fetch --prune --unshallow --tags | ||
- name: Install pulumictl | ||
uses: jaxxstorm/[email protected] | ||
with: | ||
|
@@ -171,7 +177,14 @@ jobs: | |
- name: Build SDK | ||
run: make build_${{ matrix.language }} | ||
- name: Check worktree clean | ||
run: ./ci-scripts/ci/check-worktree-is-clean | ||
uses: pulumi/git-status-check-action@v1 | ||
with: | ||
allowed-changes: | | ||
sdk/**/pulumi-plugin.json | ||
sdk/dotnet/Pulumi.*.csproj | ||
sdk/go/**/pulumiUtilities.go | ||
sdk/nodejs/package.json | ||
sdk/python/pyproject.toml | ||
- name: Compress SDK folder | ||
run: tar -zcf sdk/${{ matrix.language }}.tar.gz -C sdk/${{ matrix.language }} | ||
. | ||
|
@@ -203,13 +216,15 @@ jobs: | |
- java | ||
publish: | ||
name: publish | ||
needs: acceptance-test | ||
runs-on: ubuntu-latest | ||
needs: | ||
- acceptance-test | ||
- version | ||
env: | ||
PROVIDER_VERSION: ${{ needs.version.outputs.version }} | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v4 | ||
- name: Unshallow clone for tags | ||
run: git fetch --prune --unshallow --tags | ||
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v3 | ||
with: | ||
|
@@ -248,18 +263,15 @@ jobs: | |
run: aws s3 cp dist s3://get.pulumi.com/releases/plugins/ --recursive | ||
publish_sdk: | ||
name: publish_sdk | ||
needs: publish | ||
runs-on: ubuntu-latest | ||
needs: | ||
- publish | ||
- version | ||
env: | ||
PROVIDER_VERSION: ${{ needs.version.outputs.version }} | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v4 | ||
- name: Checkout Scripts Repo | ||
uses: actions/checkout@v4 | ||
with: | ||
path: ci-scripts | ||
repository: pulumi/scripts | ||
- name: Unshallow clone for tags | ||
run: git fetch --prune --unshallow --tags | ||
- name: Install pulumictl | ||
uses: jaxxstorm/[email protected] | ||
with: | ||
|
Oops, something went wrong.