Skip to content

Commit

Permalink
Adding in support for kind config
Browse files Browse the repository at this point in the history
  • Loading branch information
rshade committed Jan 7, 2025
1 parent 2a2f867 commit 6951dda
Show file tree
Hide file tree
Showing 22 changed files with 53 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,7 @@ jobs:
with:
cluster_name: kind-integration-tests-${{ matrix.language }}
node_image: kindest/node:v1.29.2
config: ""
- name: Run tests
run: >-
set -euo pipefail
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@ jobs:
with:
cluster_name: kind-integration-tests-${{ matrix.language }}
node_image: kindest/node:v1.29.2
config: ""
- name: Run tests
run: >-
set -euo pipefail
Expand Down Expand Up @@ -629,6 +630,7 @@ jobs:
runs-on: ubuntu-latest
name: publish-go-sdk
needs: publish_sdk
if: false
steps:
- name: Checkout Repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@ jobs:
with:
cluster_name: kind-integration-tests-${{ matrix.language }}
node_image: kindest/node:v1.29.2
config: ""
- name: Run tests
run: >-
set -euo pipefail
Expand Down Expand Up @@ -629,6 +630,7 @@ jobs:
runs-on: ubuntu-latest
name: publish-go-sdk
needs: publish_sdk
if: false
steps:
- name: Checkout Repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,7 @@ jobs:
with:
cluster_name: kind-integration-tests-${{ matrix.language }}
node_image: kindest/node:v1.29.2
config: ""
- name: Run tests
run: >-
set -euo pipefail
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ builds:
- -s
- -w
- -X
github.com/pulumi/pulumi-kubernetes-cert-manager/provider/pkg/version.Version={{.Tag}}
github.com/pulumi/pulumi-kubernetes-cert-manager/pkg/version.Version={{.Tag}}
binary: pulumi-resource-kubernetes-cert-manager
archives:
- name_template: "{{ .Binary }}-{{ .Tag }}-{{ .Os }}-{{ .Arch }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ builds:
- -s
- -w
- -X
github.com/pulumi/pulumi-kubernetes-cert-manager/provider/pkg/version.Version={{.Tag}}
github.com/pulumi/pulumi-kubernetes-cert-manager/pkg/version.Version={{.Tag}}
binary: pulumi-resource-kubernetes-cert-manager
archives:
- name_template: "{{ .Binary }}-{{ .Tag }}-{{ .Os }}-{{ .Arch }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,7 @@ jobs:
with:
cluster_name: kind-integration-tests-${{ matrix.language }}
node_image: kindest/node:v1.29.2
config: ""
- name: Run tests
run: >-
set -euo pipefail
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@ jobs:
with:
cluster_name: kind-integration-tests-${{ matrix.language }}
node_image: kindest/node:v1.29.2
config: ""
- name: Run tests
run: >-
set -euo pipefail
Expand Down Expand Up @@ -629,6 +630,7 @@ jobs:
runs-on: ubuntu-latest
name: publish-go-sdk
needs: publish_sdk
if: false
steps:
- name: Checkout Repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@ jobs:
with:
cluster_name: kind-integration-tests-${{ matrix.language }}
node_image: kindest/node:v1.29.2
config: ""
- name: Run tests
run: >-
set -euo pipefail
Expand Down Expand Up @@ -629,6 +630,7 @@ jobs:
runs-on: ubuntu-latest
name: publish-go-sdk
needs: publish_sdk
if: false
steps:
- name: Checkout Repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,7 @@ jobs:
with:
cluster_name: kind-integration-tests-${{ matrix.language }}
node_image: kindest/node:v1.29.2
config: ""
- name: Run tests
run: >-
set -euo pipefail
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ builds:
- -s
- -w
- -X
github.com/pulumi/pulumi-kubernetes-coredns/provider/pkg/version.Version={{.Tag}}
github.com/pulumi/pulumi-kubernetes-coredns/pkg/version.Version={{.Tag}}
binary: pulumi-resource-kubernetes-coredns
archives:
- name_template: "{{ .Binary }}-{{ .Tag }}-{{ .Os }}-{{ .Arch }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ builds:
- -s
- -w
- -X
github.com/pulumi/pulumi-kubernetes-coredns/provider/pkg/version.Version={{.Tag}}
github.com/pulumi/pulumi-kubernetes-coredns/pkg/version.Version={{.Tag}}
binary: pulumi-resource-kubernetes-coredns
archives:
- name_template: "{{ .Binary }}-{{ .Tag }}-{{ .Os }}-{{ .Arch }}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
provider: kubernetes-ingress-nginx
pulumiVersionFile: .pulumi.version
major-version: 0
sdkModuleDir: .
env:
AWS_REGION: us-west-2
PULUMI_TEST_OWNER: moolumi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,7 @@ jobs:
with:
cluster_name: kind-integration-tests-${{ matrix.language }}
node_image: kindest/node:v1.29.2
config: kind.config.yml
- name: Run tests
run: >-
set -euo pipefail
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@ jobs:
with:
cluster_name: kind-integration-tests-${{ matrix.language }}
node_image: kindest/node:v1.29.2
config: kind.config.yml
- name: Run tests
run: >-
set -euo pipefail
Expand Down Expand Up @@ -629,6 +630,7 @@ jobs:
runs-on: ubuntu-latest
name: publish-go-sdk
needs: publish_sdk
if: false
steps:
- name: Checkout Repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand All @@ -652,8 +654,11 @@ jobs:
with:
repository: ${{ github.repository }}
base-ref: ${{ github.sha }}
source: .
path: .
source: sdk
path: sdk
version: ${{ steps.version.outputs.version }}
additive: false
files: "**"
files: |-
go.*
go/**
!*.tar.gz
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@ jobs:
with:
cluster_name: kind-integration-tests-${{ matrix.language }}
node_image: kindest/node:v1.29.2
config: kind.config.yml
- name: Run tests
run: >-
set -euo pipefail
Expand Down Expand Up @@ -629,6 +630,7 @@ jobs:
runs-on: ubuntu-latest
name: publish-go-sdk
needs: publish_sdk
if: false
steps:
- name: Checkout Repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand All @@ -652,11 +654,14 @@ jobs:
with:
repository: ${{ github.repository }}
base-ref: ${{ github.sha }}
source: .
path: .
source: sdk
path: sdk
version: ${{ steps.version.outputs.version }}
additive: false
files: "**"
files: |-
go.*
go/**
!*.tar.gz
dispatch_docs_build:
runs-on: ubuntu-latest
needs: publish_go_sdk
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,7 @@ jobs:
with:
cluster_name: kind-integration-tests-${{ matrix.language }}
node_image: kindest/node:v1.29.2
config: kind.config.yml
- name: Run tests
run: >-
set -euo pipefail
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ builds:
- -s
- -w
- -X
github.com/pulumi/pulumi-kubernetes-ingress-nginx/provider/pkg/version.Version={{.Tag}}
github.com/pulumi/pulumi-kubernetes-ingress-nginx/pkg/version.Version={{.Tag}}
binary: pulumi-resource-kubernetes-ingress-nginx
archives:
- name_template: "{{ .Binary }}-{{ .Tag }}-{{ .Os }}-{{ .Arch }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ builds:
- -s
- -w
- -X
github.com/pulumi/pulumi-kubernetes-ingress-nginx/provider/pkg/version.Version={{.Tag}}
github.com/pulumi/pulumi-kubernetes-ingress-nginx/pkg/version.Version={{.Tag}}
binary: pulumi-resource-kubernetes-ingress-nginx
archives:
- name_template: "{{ .Binary }}-{{ .Tag }}-{{ .Os }}-{{ .Arch }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,7 @@ jobs:
with:
cluster_name: kind-integration-tests-${{ matrix.language }}
node_image: kindest/node:v1.29.2
config: ""
- name: Run tests
run: cd tests/sdk/${{ matrix.language }} && go test -v -count=1 -cover -timeout
2h -parallel 4 -short ./...
Expand Down
4 changes: 4 additions & 0 deletions native-provider-ci/src/steps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1325,15 +1325,19 @@ export function CreateKindCluster(provider: string, name: string): Step {
with: {
cluster_name: "kind-integration-tests-${{ matrix.language }}",
node_image: "kindest/node:v1.29.2",
config: "",
},
};

switch (provider) {
case "kubernetes":
return name === "run-acceptance-tests" ? step : {};
case "kubernetes-cert-manager":
return step;
case "kubernetes-coredns":
return step;
case "kubernetes-ingress-nginx":
step.with.config = "kind.config.yml";
return step;
}

Expand Down
12 changes: 12 additions & 0 deletions native-provider-ci/src/workflows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -859,8 +859,20 @@ export class PublishGoSdkJob implements NormalJob {
name = "publish-go-sdk";
needs = "publish_sdk";
steps: NormalJob["steps"];
if?: string | undefined;

constructor(opts: WorkflowOpts) {
switch (opts.provider) {
case "kubernetes-cert-manager":
this.if = "false";
break;
case "kubernetes-coredns":
this.if = "false";
break;
case "kubernetes-ingress-nginx":
this.if = "false";
break;
}
this.steps = [
steps.CheckoutRepoStep(),
steps.SetProviderVersionStep(),
Expand Down

0 comments on commit 6951dda

Please sign in to comment.