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

Ability to select SDK languages #1063

Merged
merged 4 commits into from
Sep 10, 2024
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Sometimes, you want those changes NOW rather than having to wait for a GitHub PR
This example command will generate workflows for pulumi-datadog, and place them in the specified `--out` directory.
Adjust for your provider and filesystem.

```
```bash
./bin/provider-ci generate --name pulumi/pulumi-datadog --template bridged-provider --config ./providers/datadog/config.yaml --out ../../pulumi-dtadog
```

Expand Down
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
ringods marked this conversation as resolved.
Show resolved Hide resolved
- 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 }}
ringods marked this conversation as resolved.
Show resolved Hide resolved
- 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 @@ -84,7 +84,7 @@ jobs:
- name: Setup tools
uses: ./.github/actions/setup-tools
with:
tools: pulumictl, pulumicli, go, node, dotnet, python, java
tools: pulumictl, pulumicli, #{{ range $index, $element := .Config.languages }}##{{if $index}}#, #{{end}}##{{ $element }}##{{end}}#
- name: Download bin
uses: ./.github/actions/download-bin
- run: dotnet nuget add source ${{ github.workspace }}/nuget
Expand Down 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 @@ -67,7 +67,7 @@ jobs:
shell: bash
run: |
# Get latest stable release. Return only first column from result (tag).
LAST_VERSION=$(gh release view --repo pulumi/pulumi-#{{ .Config.provider }}# --json tagName -q .tagName || echo "No stable release" )
LAST_VERSION=$(gh release view --repo #{{ .Config.organization }}#/pulumi-#{{ .Config.provider }}# --json tagName -q .tagName || echo "No stable release" )
{
echo 'summary<<EOF'
if [[ "$LAST_VERSION" != "No stable release" ]]; then
Expand Down Expand Up @@ -105,7 +105,7 @@ jobs:
- name: Setup tools
uses: ./.github/actions/setup-tools
with:
tools: pulumictl, pulumicli, go, node, dotnet, python, java
tools: pulumictl, pulumicli, #{{ range $index, $element := .Config.languages }}##{{if $index}}#, #{{end}}##{{ $element }}##{{end}}#
- name: Publish SDKs
uses: pulumi/[email protected]
with:
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
2 changes: 1 addition & 1 deletion provider-ci/internal/pkg/templates/provider/.golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ linters-settings:
- blank # Blank section: contains all blank imports.
- default # Default section: contains all imports that could not be matched to another section type.
- prefix(github.com/pulumi/) # Custom section: groups all imports with the github.com/pulumi/ prefix.
- prefix(github.com/pulumi/pulumi-#{{ .Config.provider }}#) # Custom section: local imports
- prefix(github.com/#{{ .Config.organization }}#/pulumi-#{{ .Config.provider }}#) # Custom section: local imports
custom-order: true
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
4 changes: 3 additions & 1 deletion provider-ci/test-providers/aws/.github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,17 +149,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 @@ -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, nodejs, python, dotnet, go, java
- 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 @@ -119,7 +119,7 @@ jobs:
- name: Setup tools
uses: ./.github/actions/setup-tools
with:
tools: pulumictl, pulumicli, go, node, dotnet, python, java
tools: pulumictl, pulumicli, nodejs, python, dotnet, go, java
- name: Publish SDKs
uses: pulumi/[email protected]
with:
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
Loading
Loading