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

Embed version in SDKs #410

Merged
merged 3 commits into from
May 9, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 12 additions & 0 deletions .ci-mgmt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,15 @@ plugins:
- name: terraform
version: "1.0.16"
kind: converter

# These files are updated with the real version number
worktreeAllowedChanges: |-
sdk/**/pulumi-plugin.json
sdk/dotnet/Pulumi.*.csproj
danielrbradley marked this conversation as resolved.
Show resolved Hide resolved
sdk/go/*/internal/pulumiUtilities.go
sdk/nodejs/package.json
sdk/python/pyproject.toml

publish:
goSdk:
usePush: true
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
continue-on-error: true
run: make upstream
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
uses: golangci/golangci-lint-action@v6
with:
version: v1.58.0
working-directory: provider
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,13 @@ jobs:
run: make build_${{ matrix.language }}
- name: Check worktree clean
uses: pulumi/git-status-check-action@v1
with:
allowed-changes: |
sdk/**/pulumi-plugin.json
sdk/dotnet/Pulumi.*.csproj
sdk/go/*/internal/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 }} .
- name: Upload artifacts
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,13 @@ jobs:
run: make build_${{ matrix.language }}
- name: Check worktree clean
uses: pulumi/git-status-check-action@v1
with:
allowed-changes: |
sdk/**/pulumi-plugin.json
sdk/dotnet/Pulumi.*.csproj
sdk/go/*/internal/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 }} .
- name: Upload artifacts
Expand Down
18 changes: 15 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,13 @@ jobs:
run: make build_${{ matrix.language }}
- name: Check worktree clean
uses: pulumi/git-status-check-action@v1
with:
allowed-changes: |
sdk/**/pulumi-plugin.json
sdk/dotnet/Pulumi.*.csproj
sdk/go/*/internal/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 }} .
- name: Upload artifacts
Expand Down Expand Up @@ -359,9 +366,14 @@ jobs:
repo: pulumi/pulumictl
- id: version
uses: pulumi/provider-version-action@v1
- name: Add SDK version tag
run: git tag "sdk/v${{ steps.version.outputs.version }}" && git push origin
"sdk/v${{ steps.version.outputs.version }}"
- uses: pulumi/publish-go-sdk-action@v1
with:
repository: ${{ github.repository }}
base-ref: ${{ github.sha }}
source: sdk
path: sdk
version: ${{ steps.version.outputs.version }}
additive: false

clean_up_release_labels:
name: Clean up release labels
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/run-acceptance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,13 @@ jobs:
run: make build_${{ matrix.language }}
- name: Check worktree clean
uses: pulumi/git-status-check-action@v1
with:
allowed-changes: |
sdk/**/pulumi-plugin.json
sdk/dotnet/Pulumi.*.csproj
sdk/go/*/internal/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 }} .
- name: Upload artifacts
Expand Down
17 changes: 7 additions & 10 deletions provider/cmd/pulumi-resource-kafka/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,32 +20,29 @@
"namespaces": {
"kafka": "Kafka"
},
"compatibility": "tfbridge20"
"compatibility": "tfbridge20",
"respectSchemaVersion": true
},
"go": {
"importBasePath": "github.com/pulumi/pulumi-kafka/sdk/v3/go/kafka",
"generateResourceContainerTypes": true,
"generateExtraInputTypes": true
"generateExtraInputTypes": true,
"respectSchemaVersion": true
},
"nodejs": {
"packageDescription": "A Pulumi package for creating and managing Kafka.",
"readme": "\u003e This provider is a derived work of the [Terraform Provider](https://github.com/Mongey/terraform-provider-kafka)\n\u003e distributed under [MIT](https://mit-license.org/). If you encounter a bug or missing feature,\n\u003e first check the [`pulumi-kafka` repo](https://github.com/pulumi/pulumi-kafka/issues); however, if that doesn't turn up anything,\n\u003e please consult the source [`terraform-provider-kafka` repo](https://github.com/Mongey/terraform-provider-kafka/issues).",
"dependencies": {
"@pulumi/pulumi": "^3.0.0"
},
"devDependencies": {
"@types/mime": "^2.0.0",
"@types/node": "^10.0.0"
},
"compatibility": "tfbridge20",
"disableUnionOutputTypes": true
"disableUnionOutputTypes": true,
"respectSchemaVersion": true
},
"python": {
"requires": {
"pulumi": "\u003e=3.0.0,\u003c4.0.0"
},
"readme": "\u003e This provider is a derived work of the [Terraform Provider](https://github.com/Mongey/terraform-provider-kafka)\n\u003e distributed under [MIT](https://mit-license.org/). If you encounter a bug or missing feature,\n\u003e first check the [`pulumi-kafka` repo](https://github.com/pulumi/pulumi-kafka/issues); however, if that doesn't turn up anything,\n\u003e please consult the source [`terraform-provider-kafka` repo](https://github.com/Mongey/terraform-provider-kafka/issues).",
"compatibility": "tfbridge20",
"respectSchemaVersion": true,
"pyproject": {
"enabled": true
}
Expand Down
14 changes: 6 additions & 8 deletions provider/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,19 +103,15 @@ func Provider() tfbridge.ProviderInfo {
"kafka_topic": {Docs: noDocs},
},
JavaScript: &tfbridge.JavaScriptInfo{
Dependencies: map[string]string{
"@pulumi/pulumi": "^3.0.0",
},
DevDependencies: map[string]string{
"@types/node": "^10.0.0", // so we can access strongly typed node definitions.
"@types/mime": "^2.0.0",
},
RespectSchemaVersion: true,
},
Python: (func() *tfbridge.PythonInfo {
i := &tfbridge.PythonInfo{
RespectSchemaVersion: true,
Requires: map[string]string{
"pulumi": ">=3.0.0,<4.0.0",
}}
},
}
i.PyProject.Enabled = true
return i
})(),
Expand All @@ -128,8 +124,10 @@ func Provider() tfbridge.ProviderInfo {
mainPkg,
),
GenerateResourceContainerTypes: true,
RespectSchemaVersion: true,
},
CSharp: &tfbridge.CSharpInfo{
RespectSchemaVersion: true,
PackageReferences: map[string]string{
"Pulumi": "3.*",
},
Expand Down
1 change: 1 addition & 0 deletions sdk/dotnet/Pulumi.Kafka.csproj

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion sdk/dotnet/pulumi-plugin.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions sdk/go/kafka/internal/pulumiUtilities.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion sdk/go/kafka/pulumi-plugin.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions sdk/nodejs/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion sdk/python/pulumi_kafka/pulumi-plugin.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sdk/python/pyproject.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.