Skip to content

Commit

Permalink
Make the GH organization configurable (#1056)
Browse files Browse the repository at this point in the history
A first small change to the GH workflow generation in an attempt to
bring `ci-mgmt` slowly closer to third party package maintainers.

---------

Co-authored-by: Guinevere Saenger <guinevere@pulumi.com>
  • Loading branch information
ringods and guineveresaenger authored Aug 20, 2024
1 parent cb25dbd commit 9b5b5e6
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 9 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ To add a new provider:
```
`ci-mgmt` will read your provider's `.ci-mgmt.yaml` and generate the standard set of CI files from templates.
You can override every one of the [default values](./provider-ci/internal/pkg/templates/bridged-provider.config.yaml)
in your `.ci-mgmt.yaml` file.

1. Add your provider to `provider-ci/providers.json` in alphabetical order. This ensures your provider receives regular
updates and maintenance.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
# This MUST be set in every provider
#provider: xyz

# organization is the name of the Github organization the repository lives in. Defaults to 'pulumi'
organization: pulumi

# major version of the current provider - used in make files and goreleaser
# This should always be set by all providers as this is key to go module paths.
major-version: 2
Expand Down
6 changes: 3 additions & 3 deletions provider-ci/internal/pkg/templates/bridged-provider/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# WARNING: This file is autogenerated - changes will be overwritten if not made via https://github.com/pulumi/ci-mgmt

PACK := #{{ .Config.provider }}#
ORG := pulumi
ORG := #{{ .Config.organization }}#
PROJECT := github.com/$(ORG)/pulumi-$(PACK)
#{{- if ge (index .Config "major-version") 2 }}#
PROVIDER_PATH := provider/v#{{ index .Config "major-version" }}#
Expand Down Expand Up @@ -208,9 +208,9 @@ bin/pulumi-java-gen: .pulumi-java-gen.version
# - Run make ci-mgmt to apply the change locally.
#
ci-mgmt: .ci-mgmt.yaml
rm .github/workflows/*.yml # Copied from update-workflows.yml
rm -f .github/workflows/*.yml # Copied from update-workflows.yml
go run github.com/pulumi/ci-mgmt/provider-ci@master generate \
--name pulumi/pulumi-$(PACK) \
--name $(ORG)/pulumi-$(PACK) \
--out . \
--template bridged-provider \
--config $<
Expand Down
4 changes: 2 additions & 2 deletions provider-ci/test-providers/aws/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,9 @@ bin/pulumi-java-gen: .pulumi-java-gen.version
# - Run make ci-mgmt to apply the change locally.
#
ci-mgmt: .ci-mgmt.yaml
rm .github/workflows/*.yml # Copied from update-workflows.yml
rm -f .github/workflows/*.yml # Copied from update-workflows.yml
go run github.com/pulumi/ci-mgmt/provider-ci@master generate \
--name pulumi/pulumi-$(PACK) \
--name $(ORG)/pulumi-$(PACK) \
--out . \
--template bridged-provider \
--config $<
Expand Down
4 changes: 2 additions & 2 deletions provider-ci/test-providers/cloudflare/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,9 @@ bin/pulumi-java-gen: .pulumi-java-gen.version
# - Run make ci-mgmt to apply the change locally.
#
ci-mgmt: .ci-mgmt.yaml
rm .github/workflows/*.yml # Copied from update-workflows.yml
rm -f .github/workflows/*.yml # Copied from update-workflows.yml
go run github.com/pulumi/ci-mgmt/provider-ci@master generate \
--name pulumi/pulumi-$(PACK) \
--name $(ORG)/pulumi-$(PACK) \
--out . \
--template bridged-provider \
--config $<
Expand Down
4 changes: 2 additions & 2 deletions provider-ci/test-providers/docker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,9 @@ bin/pulumi-java-gen: .pulumi-java-gen.version
# - Run make ci-mgmt to apply the change locally.
#
ci-mgmt: .ci-mgmt.yaml
rm .github/workflows/*.yml # Copied from update-workflows.yml
rm -f .github/workflows/*.yml # Copied from update-workflows.yml
go run github.com/pulumi/ci-mgmt/provider-ci@master generate \
--name pulumi/pulumi-$(PACK) \
--name $(ORG)/pulumi-$(PACK) \
--out . \
--template bridged-provider \
--config $<
Expand Down

0 comments on commit 9b5b5e6

Please sign in to comment.