Support external bridged provider by reducing Pulumi Corp targeted workflows #1084
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains a set of changes to better support external bridged providers. Such external providers need less of the workflows used by the Pulumi Corp engineering team.
Single set of default configuration values.
The current setup uses a default config file based on the template name:
bridged-provider
template name maps toprovider-ci/internal/pkg/templates/bridged-provider.config.json
. The template name then points to a set of folders containing the actual template files:ci-mgmt/provider-ci/internal/pkg/generate.go
Lines 70 to 72 in 52751c4
These template files use templating based on the configuration options to tweak the generated content for each provider.
If we want to reuse most of these templates for another template name, we must prevent duplicating the config options in a second file. After discussing this with @danielrbradley, the idea was to not have a default config file per template name, but a single default config file applicable to all templates.
Default repository name calculation.
The CLI arguments to
provider-ci generate
has the following currently documented:However, nowhere in the code is a default of "pulumi/pulumi-{config.provider}" calculated. One of the commits in this PR resolves this and improves on it to take the
organization
config option into account.By calculating this value based on the
provider
andorganization
config values, we can runprovider-ci generate
now without the--name
CLI argument. Inmake test-providers
, it fixes that theacme
provider is no longer assumed to be in thepulumi
org, but correctly configured to be in thepulumiverse
organization as specified by its.ci-mgmt.yml
file.Moved some specific into a Pulumi (Corp) folder
Some of the workflows & issue templates have been moved to a dedicated Pulumi folder. This folder is added to the default
bridged-provider
template, but not used forexternal-bridged-provider
. This reduces the amount and complexity of the workflows for an external provider. An external provider doesn't have a bot running and doesn't require (for now) a few of the repository dispatch scenarios.