Skip to content

Commit

Permalink
Embed SDK version (#1232)
Browse files Browse the repository at this point in the history
Related to pulumi/ci-mgmt#915

- Rework how we calculate versions
- In the makefile, take an input of PROVIDER_VERSION instead of calling
`pulumictl get version`.
- In CI, use the version action in the prerequisites then set the
PROVIDER_VERSION env in other jobs.
  - Remove unshallow clone for tags.
- Replace the git status check with the dedicated action and allow
specific files that contain the version number to be changed during the
build.
- Switch to the publish Go SDK action rather than tagging in-place.

Master branch CI run:
https://github.com/pulumi/pulumi-eks/actions/runs/9870116213
  • Loading branch information
danielrbradley authored Jul 10, 2024
2 parents dbc9824 + f61e18f commit e00ec0c
Show file tree
Hide file tree
Showing 16 changed files with 521 additions and 555 deletions.
79 changes: 38 additions & 41 deletions .github/workflows/cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ jobs:
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Unshallow clone for tags
run: git fetch --prune --unshallow --tags
- name: Install pulumictl
uses: jaxxstorm/[email protected]
with:
Expand Down Expand Up @@ -63,16 +61,15 @@ jobs:
prerequisites:
name: prerequisites
runs-on: ubuntu-latest
outputs:
version: ${{ steps.provider-version.outputs.version }}
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Checkout Scripts Repo
uses: actions/checkout@v2
- uses: pulumi/provider-version-action@v1
id: provider-version
with:
path: ci-scripts
repository: pulumi/scripts
- name: Unshallow clone for tags
run: git fetch --prune --unshallow --tags
set-env: "PROVIDER_VERSION"
- name: Install Go
uses: actions/setup-go@v2
with:
Expand All @@ -86,7 +83,14 @@ jobs:
- name: Build provider binary + schema
run: make schema 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: Tar provider binaries
run:
tar -zcf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ github.workspace
Expand All @@ -109,16 +113,11 @@ jobs:
name: build_sdk
runs-on: ubuntu-latest
needs: prerequisites
env:
PROVIDER_VERSION: ${{ needs.prerequisites.outputs.version }}
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Checkout Scripts Repo
uses: actions/checkout@v2
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@v2
with:
Expand Down Expand Up @@ -161,7 +160,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 NodeJS SDK folder
if: matrix.language == 'nodejs'
run: tar -zcf ${{ matrix.language }}.tar.gz -C ${{ matrix.language }}/ .
Expand Down Expand Up @@ -190,18 +196,15 @@ jobs:
- java
test-nodejs:
name: Run NodeJS Tests
needs: build_sdk
needs:
- prerequisites
- build_sdk
runs-on: ubuntu-latest
env:
PROVIDER_VERSION: ${{ needs.prerequisites.outputs.version }}
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Checkout Scripts Repo
uses: actions/checkout@v2
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@v2
with:
Expand Down Expand Up @@ -305,18 +308,15 @@ jobs:
- VpcSubnetTags
test-python:
name: Run Python Tests
needs: build_sdk
needs:
- prerequisites
- build_sdk
runs-on: ubuntu-latest
env:
PROVIDER_VERSION: ${{ needs.prerequisites.outputs.version }}
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Checkout Scripts Repo
uses: actions/checkout@v2
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@v2
with:
Expand Down Expand Up @@ -415,18 +415,15 @@ jobs:
- ManagedNodeGroupPy
test-dotnet:
name: Run DotNet Tests
needs: build_sdk
needs:
- prerequisites
- build_sdk
runs-on: ubuntu-latest
env:
PROVIDER_VERSION: ${{ needs.prerequisites.outputs.version }}
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Checkout Scripts Repo
uses: actions/checkout@v2
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@v2
with:
Expand Down
Loading

0 comments on commit e00ec0c

Please sign in to comment.