Skip to content

Commit

Permalink
Remove defaultable provider-ci arguments (#1144)
Browse files Browse the repository at this point in the history
I noticed while testing #1143 that
[the generated
PR](https://github.com/pulumi/pulumi-tf-provider-boilerplate/pull/138/files)
ignored the repo's configured template and changed it.

- Use values from the config instead of hard coding them
- `--name` defaults to `{config.repository}` or
`{config.organization}/pulumi-{config.provider}`
- `--template` defaults to `{config.template}` or otherwise
"bridged-provider"
- `--config` defaults to `.ci-mgmt.yaml` so only specify in the
update-workflows job where it's checked out into a different directory
- `--out` defaults to `.` so only specify in the update-workflows job
where it's checked out into a different directory
  • Loading branch information
danielrbradley authored Nov 14, 2024
1 parent cf23176 commit 99470b7
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 27 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/update-workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ jobs:
if: inputs.bridged
run: |
cd ci-mgmt/provider-ci && go run ./... generate \
--name pulumi/pulumi-${{ inputs.provider_name }} \
--template bridged-provider \
--config ../../pulumi-${{ inputs.provider_name }}/.ci-mgmt.yaml \
--out ../../pulumi-${{ inputs.provider_name }}
- name: Copy files from ci-mgmt to pulumi-${{ inputs.provider_name }}
Expand Down
6 changes: 1 addition & 5 deletions provider-ci/internal/pkg/templates/bridged-provider/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -214,11 +214,7 @@ bin/pulumi-java-gen: .pulumi-java-gen.version
# - Run make ci-mgmt to apply the change locally.
#
ci-mgmt: .ci-mgmt.yaml
go run github.com/pulumi/ci-mgmt/provider-ci@master generate \
--name $(ORG)/pulumi-$(PACK) \
--out . \
--template #{{ .Config.template }}# \
--config $<
go run github.com/pulumi/ci-mgmt/provider-ci@master generate

# Because some codegen depends on the version of the CLI used, we install a local CLI
# version pinned to the same version as `provider/go.mod`.
Expand Down
6 changes: 1 addition & 5 deletions provider-ci/test-providers/acme/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,7 @@ bin/pulumi-java-gen: .pulumi-java-gen.version
# - Run make ci-mgmt to apply the change locally.
#
ci-mgmt: .ci-mgmt.yaml
go run github.com/pulumi/ci-mgmt/provider-ci@master generate \
--name $(ORG)/pulumi-$(PACK) \
--out . \
--template external-bridged-provider \
--config $<
go run github.com/pulumi/ci-mgmt/provider-ci@master generate

# Because some codegen depends on the version of the CLI used, we install a local CLI
# version pinned to the same version as `provider/go.mod`.
Expand Down
6 changes: 1 addition & 5 deletions provider-ci/test-providers/aws/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,7 @@ bin/pulumi-java-gen: .pulumi-java-gen.version
# - Run make ci-mgmt to apply the change locally.
#
ci-mgmt: .ci-mgmt.yaml
go run github.com/pulumi/ci-mgmt/provider-ci@master generate \
--name $(ORG)/pulumi-$(PACK) \
--out . \
--template bridged-provider \
--config $<
go run github.com/pulumi/ci-mgmt/provider-ci@master generate

# Because some codegen depends on the version of the CLI used, we install a local CLI
# version pinned to the same version as `provider/go.mod`.
Expand Down
6 changes: 1 addition & 5 deletions provider-ci/test-providers/cloudflare/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,7 @@ bin/pulumi-java-gen: .pulumi-java-gen.version
# - Run make ci-mgmt to apply the change locally.
#
ci-mgmt: .ci-mgmt.yaml
go run github.com/pulumi/ci-mgmt/provider-ci@master generate \
--name $(ORG)/pulumi-$(PACK) \
--out . \
--template bridged-provider \
--config $<
go run github.com/pulumi/ci-mgmt/provider-ci@master generate

# Because some codegen depends on the version of the CLI used, we install a local CLI
# version pinned to the same version as `provider/go.mod`.
Expand Down
6 changes: 1 addition & 5 deletions provider-ci/test-providers/docker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,7 @@ bin/pulumi-java-gen: .pulumi-java-gen.version
# - Run make ci-mgmt to apply the change locally.
#
ci-mgmt: .ci-mgmt.yaml
go run github.com/pulumi/ci-mgmt/provider-ci@master generate \
--name $(ORG)/pulumi-$(PACK) \
--out . \
--template bridged-provider \
--config $<
go run github.com/pulumi/ci-mgmt/provider-ci@master generate

# Because some codegen depends on the version of the CLI used, we install a local CLI
# version pinned to the same version as `provider/go.mod`.
Expand Down

0 comments on commit 99470b7

Please sign in to comment.