Skip to content

Commit

Permalink
Ability to configure the set of language SDKs
Browse files Browse the repository at this point in the history
Changing `node` to `nodejs` in tool installation task
This brings consistency with the name of the language used in the GHA `language` build matrix
  • Loading branch information
ringods committed Sep 9, 2024
1 parent 06d7162 commit 9f270e3
Show file tree
Hide file tree
Showing 29 changed files with 60 additions and 71 deletions.
10 changes: 9 additions & 1 deletion provider-ci/internal/pkg/templates/bridged-provider.config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,18 @@ toolVersions:
go: "1.21.x"
java: "11"
gradle: "7.6"
node: "20.x"
nodejs: "20.x"
pulumi: "dev"
python: "3.11.8"

# Control which language SDKs get built and published.
languages:
- nodejs
- python
- dotnet
- go
- java

# env contains an assortment of properties for different purposes.
# Additional entries are added by individual providers for different reasons.
# All jobs currently get the same env for all steps but values might only be used for very specific purposes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,7 @@ jobs:
fail-fast: true
matrix:
language:
- nodejs
- python
- dotnet
- go
- java
#{{ .Config.languages | toYaml | indent 8 }}#
steps:
#{{- if .Config.freeDiskSpaceBeforeSdkBuild }}#
# Run as first step so we don't delete things that have just been installed
Expand All @@ -48,7 +44,7 @@ jobs:
- name: Setup tools
uses: ./.github/actions/setup-tools
with:
tools: pulumictl, pulumicli, go, node, dotnet, python, java
tools: pulumictl, pulumicli, ${{ matrix.language }}
- name: Download bin
uses: ./.github/actions/download-bin
- name: Install plugins
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,17 +143,19 @@ jobs:
- name: Setup tools
uses: ./.github/actions/setup-tools
with:
tools: pulumictl, pulumicli, go, node, dotnet, python, java
tools: pulumictl, pulumicli, ${{ matrix.language }}
- name: Download bin
uses: ./.github/actions/download-bin
- run: dotnet nuget add source ${{ github.workspace }}/nuget
if: matrix.language == 'dotnet'
- name: Download SDK
uses: ./.github/actions/download-sdk
with:
language: ${{ matrix.language }}
- name: Update path
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
- name: Install Python deps
if: matrix.language == 'python'
run: |-
pip3 install virtualenv==20.0.23
pip3 install pipenv
Expand Down Expand Up @@ -225,11 +227,7 @@ jobs:
fail-fast: false
matrix:
language:
- nodejs
- python
- dotnet
- go
- java
#{{ .Config.languages | toYaml | indent 8 }}#
#{{- if .Config.extraTests }}#
#{{ .Config.extraTests | toYaml | indent 2 }}#
#{{ end }}#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
- name: Setup tools
uses: ./.github/actions/setup-tools
with:
tools: pulumictl, pulumicli, go, node, dotnet, python, java
tools: pulumictl, pulumicli, ${{ matrix.language}}
- name: Download bin
uses: ./.github/actions/download-bin
- run: dotnet nuget add source ${{ github.workspace }}/nuget
Expand Down Expand Up @@ -140,11 +140,7 @@ jobs:
fail-fast: false
matrix:
language:
- nodejs
- python
- dotnet
- go
- java
#{{ .Config.languages | toYaml | indent 10 }}#
name: cron
on:
schedule:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,7 @@ jobs:
fail-fast: false
matrix:
language:
- nodejs
- python
- dotnet
- go
- java
#{{ .Config.languages | toYaml | indent 8 }}#
#{{- if .Config.extraTests }}#
#{{ .Config.extraTests | toYaml | indent 2 }}#
#{{ end }}#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:
- name: Setup tools
uses: ./.github/actions/setup-tools
with:
tools: pulumictl, pulumicli, go, node, dotnet, python, java
tools: pulumictl, pulumicli, ${{ matrix.language }}
- name: Download bin
uses: ./.github/actions/download-bin
- run: dotnet nuget add source ${{ github.workspace }}/nuget
Expand Down Expand Up @@ -174,11 +174,7 @@ jobs:
fail-fast: false
matrix:
language:
- nodejs
- python
- dotnet
- go
- java
#{{ .Config.languages | toYaml | indent 8 }}#
#{{- if .Config.extraTests }}#
#{{ .Config.extraTests | toYaml | indent 2 }}#
#{{ end }}#
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ jobs:
- name: Setup tools
uses: ./.github/actions/setup-tools
with:
tools: pulumictl, pulumicli, go, node, dotnet, python, java
tools: pulumictl, pulumicli, ${{ matrix.language }}
- name: Download bin
uses: ./.github/actions/download-bin
- run: dotnet nuget add source ${{ github.workspace }}/nuget
Expand Down Expand Up @@ -214,11 +214,7 @@ jobs:
fail-fast: false
matrix:
language:
- nodejs
- python
- dotnet
- go
- java
#{{ .Config.languages | toYaml | indent 8 }}#
#{{- if .Config.testPulumiExamples }}#
testTarget: [local, pulumiExamples]
#{{- else }}#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ development: install_plugins provider build_sdks install_sdks

build: install_plugins provider build_sdks install_sdks

build_sdks: build_nodejs build_python build_go build_dotnet build_java
build_sdks: #{{ range .Config.languages }}#build_#{{ . }}# #{{ end }}#

install_go_sdk:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"yarn@latest",
"pulumictl@latest",
"go@#{{ trimAll "x" .Config.toolVersions.go }}#",
"nodejs@#{{ trimAll "x" .Config.toolVersions.node }}#",
"nodejs@#{{ trimAll "x" .Config.toolVersions.nodejs }}#",
"python3@#{{ trimAll "x" .Config.toolVersions.python }}#",
"dotnet-sdk@#{{ trimAll "x" .Config.toolVersions.dotnet }}#",
"gradle_7@#{{ trimAll "x" .Config.toolVersions.gradle }}#",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ inputs:
pulumicli
pulumictl
schema-tools
node
nodejs
python
dotnet
java
Expand Down Expand Up @@ -48,10 +48,10 @@ runs:
repo: pulumi/schema-tools

- name: Setup Node
if: inputs.tools == 'all' || contains(inputs.tools, 'node')
if: inputs.tools == 'all' || contains(inputs.tools, 'nodejs')
uses: actions/setup-node@v4
with:
node-version: #{{ .Config.toolVersions.node }}#
node-version: #{{ .Config.toolVersions.nodejs }}#
registry-url: https://registry.npmjs.org

- name: Setup DotNet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ inputs:
pulumicli
pulumictl
schema-tools
node
nodejs
python
dotnet
java
Expand Down Expand Up @@ -48,7 +48,7 @@ runs:
repo: pulumi/schema-tools

- name: Setup Node
if: inputs.tools == 'all' || contains(inputs.tools, 'node')
if: inputs.tools == 'all' || contains(inputs.tools, 'nodejs')
uses: actions/setup-node@v4
with:
node-version: 20.x
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
- name: Setup tools
uses: ./.github/actions/setup-tools
with:
tools: pulumictl, pulumicli, go, node, dotnet, python, java
tools: pulumictl, pulumicli, ${{ matrix.language }}
- name: Download bin
uses: ./.github/actions/download-bin
- name: Install plugins
Expand Down
5 changes: 3 additions & 2 deletions provider-ci/test-providers/aws/.github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ jobs:
name: License Check
uses: ./.github/workflows/license.yml
secrets: inherit

publish:
name: publish
needs:
Expand Down Expand Up @@ -149,17 +148,19 @@ jobs:
- name: Setup tools
uses: ./.github/actions/setup-tools
with:
tools: pulumictl, pulumicli, go, node, dotnet, python, java
tools: pulumictl, pulumicli, ${{ matrix.language }}
- name: Download bin
uses: ./.github/actions/download-bin
- run: dotnet nuget add source ${{ github.workspace }}/nuget
if: matrix.language == 'dotnet'
- name: Download SDK
uses: ./.github/actions/download-sdk
with:
language: ${{ matrix.language }}
- name: Update path
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
- name: Install Python deps
if: matrix.language == 'python'
run: |-
pip3 install virtualenv==20.0.23
pip3 install pipenv
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
- name: Setup tools
uses: ./.github/actions/setup-tools
with:
tools: pulumictl, pulumicli, go, node, dotnet, python, java
tools: pulumictl, pulumicli, ${{ matrix.language}}
- name: Download bin
uses: ./.github/actions/download-bin
- run: dotnet nuget add source ${{ github.workspace }}/nuget
Expand Down Expand Up @@ -108,11 +108,11 @@ jobs:
fail-fast: false
matrix:
language:
- nodejs
- python
- dotnet
- go
- java
- nodejs
- python
- dotnet
- go
- java
name: cron
on:
schedule:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
- name: Setup tools
uses: ./.github/actions/setup-tools
with:
tools: pulumictl, pulumicli, go, node, dotnet, python, java
tools: pulumictl, pulumicli, ${{ matrix.language }}
- name: Download bin
uses: ./.github/actions/download-bin
- run: dotnet nuget add source ${{ github.workspace }}/nuget
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ jobs:
- name: Setup tools
uses: ./.github/actions/setup-tools
with:
tools: pulumictl, pulumicli, go, node, dotnet, python, java
tools: pulumictl, pulumicli, ${{ matrix.language }}
- name: Download bin
uses: ./.github/actions/download-bin
- run: dotnet nuget add source ${{ github.workspace }}/nuget
Expand Down
2 changes: 1 addition & 1 deletion provider-ci/test-providers/aws/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ development: install_plugins provider build_sdks install_sdks

build: install_plugins provider build_sdks install_sdks

build_sdks: build_nodejs build_python build_go build_dotnet build_java
build_sdks: build_nodejs build_python build_dotnet build_go build_java

install_go_sdk:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ inputs:
pulumicli
pulumictl
schema-tools
node
nodejs
python
dotnet
java
Expand Down Expand Up @@ -48,7 +48,7 @@ runs:
repo: pulumi/schema-tools

- name: Setup Node
if: inputs.tools == 'all' || contains(inputs.tools, 'node')
if: inputs.tools == 'all' || contains(inputs.tools, 'nodejs')
uses: actions/setup-node@v4
with:
node-version: 20.x
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
- name: Setup tools
uses: ./.github/actions/setup-tools
with:
tools: pulumictl, pulumicli, go, node, dotnet, python, java
tools: pulumictl, pulumicli, ${{ matrix.language }}
- name: Download bin
uses: ./.github/actions/download-bin
- name: Install plugins
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ jobs:
name: License Check
uses: ./.github/workflows/license.yml
secrets: inherit

publish:
name: publish
needs:
Expand Down Expand Up @@ -138,17 +137,19 @@ jobs:
- name: Setup tools
uses: ./.github/actions/setup-tools
with:
tools: pulumictl, pulumicli, go, node, dotnet, python, java
tools: pulumictl, pulumicli, ${{ matrix.language }}
- name: Download bin
uses: ./.github/actions/download-bin
- run: dotnet nuget add source ${{ github.workspace }}/nuget
if: matrix.language == 'dotnet'
- name: Download SDK
uses: ./.github/actions/download-sdk
with:
language: ${{ matrix.language }}
- name: Update path
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
- name: Install Python deps
if: matrix.language == 'python'
run: |-
pip3 install virtualenv==20.0.23
pip3 install pipenv
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ jobs:
- name: Setup tools
uses: ./.github/actions/setup-tools
with:
tools: pulumictl, pulumicli, go, node, dotnet, python, java
tools: pulumictl, pulumicli, ${{ matrix.language }}
- name: Download bin
uses: ./.github/actions/download-bin
- run: dotnet nuget add source ${{ github.workspace }}/nuget
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ jobs:
- name: Setup tools
uses: ./.github/actions/setup-tools
with:
tools: pulumictl, pulumicli, go, node, dotnet, python, java
tools: pulumictl, pulumicli, ${{ matrix.language }}
- name: Download bin
uses: ./.github/actions/download-bin
- run: dotnet nuget add source ${{ github.workspace }}/nuget
Expand Down
2 changes: 1 addition & 1 deletion provider-ci/test-providers/cloudflare/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ development: install_plugins provider build_sdks install_sdks

build: install_plugins provider build_sdks install_sdks

build_sdks: build_nodejs build_python build_go build_dotnet build_java
build_sdks: build_nodejs build_python build_dotnet build_go build_java

install_go_sdk:

Expand Down
Loading

0 comments on commit 9f270e3

Please sign in to comment.