From a5996559cf1d69a82bd281f4b2f7da0c7ba74338 Mon Sep 17 00:00:00 2001 From: Bryce Lampe Date: Fri, 15 Nov 2024 13:00:36 -0800 Subject: [PATCH] Typed provider configuration (#1126) This adds strong typing around our CI configuration options. Currently our config is just a bag of values, which has led to repos specifying options which have no effect on CI (e.g. `parallel:`, `makeTemplate:` etc.). This adds types for all of our available options and will fail if `ci-mgmt.yml` specifies an unrecognized option. For backwards compatibility we continue to allow existing no-op params in order to not break existing providers. --- provider-ci/go.mod | 2 +- provider-ci/internal/cmd/generate.go | 25 +- provider-ci/internal/pkg/config.go | 386 +++++++++++++++++- provider-ci/internal/pkg/generate.go | 6 +- .../.github/actions/download-bin/action.yml | 6 +- .../.github/actions/upload-bin/action.yml | 6 +- .../.github/workflows/build_provider.yml | 22 +- .../.github/workflows/build_sdk.yml | 16 +- .../.github/workflows/main.yml | 76 ++-- .../.github/workflows/nightly-test.yml | 48 +-- .../.github/workflows/prerelease.yml | 60 +-- .../.github/workflows/prerequisites.yml | 30 +- .../.github/workflows/publish.yml | 52 +-- .../.github/workflows/release.yml | 58 +-- .../.github/workflows/resync-build.yml | 22 +- .../workflows/run-acceptance-tests.yml | 66 +-- .../.github/workflows/upgrade-bridge.yml | 22 +- .../.github/workflows/upgrade-provider.yml | 18 +- .../pkg/templates/bridged-provider/Makefile | 42 +- .../pkg/templates/defaults.config.yaml | 20 +- .../pkg/templates/dev-container/devbox.json | 13 +- .../.github/actions/download-sdk/action.yml | 2 +- .../.github/actions/setup-tools/action.yml | 14 +- .../.github/actions/upload-sdk/action.yml | 2 +- .../provider/.github/workflows/license.yml | 8 +- .../provider/.github/workflows/lint.yml | 10 +- .../.github/workflows/pull-request.yml | 12 +- .../.github/workflows/verify-release.yml | 36 +- .../pkg/templates/provider/.golangci.yml | 2 +- .../.github/workflows/command-dispatch.yml | 10 +- .../workflows/community-moderation.yml | 16 +- .../.github/workflows/release_command.yml | 2 +- .../pulumi-provider/.upgrade-config.yml | 14 +- provider-ci/test-providers/acme/.ci-mgmt.yaml | 1 - provider-ci/test-providers/aws/.ci-mgmt.yaml | 2 +- .../aws/.github/workflows/build_sdk.yml | 2 +- .../.github/workflows/command-dispatch.yml | 2 +- .../aws/.github/workflows/license.yml | 2 +- .../aws/.github/workflows/lint.yml | 2 +- .../aws/.github/workflows/master.yml | 2 +- .../aws/.github/workflows/nightly-test.yml | 2 +- .../aws/.github/workflows/prerelease.yml | 2 +- .../aws/.github/workflows/prerequisites.yml | 2 +- .../aws/.github/workflows/publish.yml | 2 +- .../aws/.github/workflows/pull-request.yml | 2 +- .../aws/.github/workflows/release.yml | 2 +- .../aws/.github/workflows/resync-build.yml | 2 +- .../workflows/run-acceptance-tests.yml | 2 +- .../aws/.github/workflows/verify-release.yml | 2 +- .../test-providers/cloudflare/.ci-mgmt.yaml | 4 +- .../test-providers/docker/.ci-mgmt.yaml | 2 +- .../docker/.github/workflows/build_sdk.yml | 2 +- .../.github/workflows/command-dispatch.yml | 2 +- .../docker/.github/workflows/license.yml | 2 +- .../docker/.github/workflows/lint.yml | 2 +- .../docker/.github/workflows/master.yml | 2 +- .../docker/.github/workflows/prerelease.yml | 2 +- .../.github/workflows/prerequisites.yml | 2 +- .../docker/.github/workflows/publish.yml | 2 +- .../docker/.github/workflows/pull-request.yml | 2 +- .../docker/.github/workflows/release.yml | 2 +- .../docker/.github/workflows/resync-build.yml | 2 +- .../workflows/run-acceptance-tests.yml | 2 +- .../.github/workflows/verify-release.yml | 2 +- 64 files changed, 758 insertions(+), 429 deletions(-) diff --git a/provider-ci/go.mod b/provider-ci/go.mod index 60e37e943e..36f95bd13a 100644 --- a/provider-ci/go.mod +++ b/provider-ci/go.mod @@ -4,7 +4,6 @@ go 1.21 require ( github.com/Masterminds/sprig v2.22.0+incompatible - github.com/imdario/mergo v0.3.16 github.com/spf13/cobra v1.7.0 gopkg.in/yaml.v3 v3.0.1 ) @@ -15,6 +14,7 @@ require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/google/uuid v1.3.0 // indirect github.com/huandu/xstrings v1.4.0 // indirect + github.com/imdario/mergo v0.3.16 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/kr/pretty v0.1.0 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect diff --git a/provider-ci/internal/cmd/generate.go b/provider-ci/internal/cmd/generate.go index 0db0a87181..2e6d728dbb 100644 --- a/provider-ci/internal/cmd/generate.go +++ b/provider-ci/internal/cmd/generate.go @@ -21,33 +21,26 @@ var generateCmd = &cobra.Command{ Use: "generate", Short: "Generate repository files.", RunE: func(cmd *cobra.Command, args []string) error { - localConfig, err := pkg.LoadLocalConfig(generateArgs.ConfigPath) - if err != nil { - return err - } - // Merge local config with template defaults - mergedConfig, err := localConfig.WithTemplateDefaults() + config, err := pkg.LoadLocalConfig(generateArgs.ConfigPath) if err != nil { return err } // Template name priority: CLI flag > config file if generateArgs.TemplateName == "" { - if templateName, ok := mergedConfig["template"].(string); ok { - generateArgs.TemplateName = templateName + if config.Template != "" { + generateArgs.TemplateName = config.Template } } // Name priority: CLI flag > config file ("repository", then "name" field) if generateArgs.RepositoryName == "" { - if repositoryName, ok := mergedConfig["repository"].(string); ok { - generateArgs.RepositoryName = repositoryName - } else if name, ok := mergedConfig["name"].(string); ok { - generateArgs.RepositoryName = name + if config.Repository != "" { + generateArgs.RepositoryName = config.Repository } else { - providerName, providerOk := mergedConfig["provider"].(string) - organizationName, organizationOk := mergedConfig["organization"].(string) - if providerOk && organizationOk { + providerName := config.Provider + organizationName := config.Organization + if providerName != "" && organizationName != "" { generateArgs.RepositoryName = fmt.Sprintf("%s/pulumi-%s", organizationName, providerName) } } @@ -61,7 +54,7 @@ var generateCmd = &cobra.Command{ RepositoryName: generateArgs.RepositoryName, OutDir: generateArgs.OutDir, TemplateName: generateArgs.TemplateName, - Config: mergedConfig, + Config: config, }) return err }, diff --git a/provider-ci/internal/pkg/config.go b/provider-ci/internal/pkg/config.go index 690e11e825..2a8e3c3aef 100644 --- a/provider-ci/internal/pkg/config.go +++ b/provider-ci/internal/pkg/config.go @@ -1,52 +1,396 @@ package pkg import ( + "bytes" "fmt" "os" "path/filepath" + "time" - "github.com/imdario/mergo" "gopkg.in/yaml.v3" ) -type Config map[string]any +// Config describes the shape of .ci-mgmt.yaml files. +type Config struct { + // Provider is required and is the name of the provider without the "pulumi-" prefix. + Provider string `yaml:"provider"` + // Repository is the optional repository of the provider. + Repository string `yaml:"repository"` + + // Template names can be found in the getTemplateDirs function in provider-ci/internal/pkg/generate.go. + Template string `yaml:"template"` + + // Organization is the name of the Github organization the repository lives + // in. Defaults to 'pulumi'. + Organization string `yaml:"organization"` + + // MajorVersion of the current provider used in Makefiles. This should + // always be set by all providers as this is key to go module paths. + MajorVersion int `yaml:"major-version"` + + // Plugins to install in the "install_plugins" make target. Should be set + // for all bridged providers: + // https://github.com/search?q=org%3Apulumi+path%3A.ci-mgmt.yaml+%22plugins%3A%22&type=code + Plugins []plugin `yaml:"plugins"` + + // JavaGenVersion ensures a specific javaGen version is used during + // upgrades if set. Set for 2 providers: + // https://github.com/search?q=org%3Apulumi+path%3A.ci-mgmt.yaml+%22javaGenVersion%3A%22&type=code + JavaGenVersion string `yaml:"javaGenVersion"` + + // UpstreamProviderOrg is optional and used in the bridge upgrade config. + // Only set for 4 providers: + // https://github.com/search?q=org%3Apulumi+path%3A.ci-mgmt.yaml+%22upstreamProviderOrg%3A%22&type=code + UpstreamProviderOrg string `yaml:"upstreamProviderOrg"` + + // UpstreamProviderRepo is used in the bridge upgrade config. Only set for + // 5 providers: + // https://github.com/search?q=org%3Apulumi+path%3A.ci-mgmt.yaml+%22upstream-provider-repo%22&type=code + UpstreamProviderRepo string `yaml:"upstream-provider-repo"` + + // Lint includes an extra lint job in workflows if enabled (default). Can + // be explicitly set to false. This is false in around 8 provider repos: + // https://github.com/search?q=org%3Apulumi+path%3A.ci-mgmt.yaml+%22lint%3A+false%22&type=code + Lint bool `yaml:"lint,omitempty"` + + // ProviderDefaultBranch is used to customise the default branch when + // needed. Currently set in around 17 repos: + // https://github.com/search?q=org%3Apulumi+path%3A.ci-mgmt.yaml+%22providerDefaultBranch%3A%22&type=code + ProviderDefaultBranch string `yaml:"providerDefaultBranch"` + + // FailOnMissingMapping sets PULUMI_MISSING_MAPPING_ERROR in the + // resync-build workflow. Used in alicloud only: + // https://github.com/search?q=org%3Apulumi+path%3A.ci-mgmt.yaml+%22fail-on-missing-mapping%3A%22&type=code + FailOnMissingMapping bool `yaml:"fail-on-missing-mapping"` + + // FailOnExtraMapping sets PULUMI_EXTRA_MAPPING_ERROR in resync-build and + // defaults to true. It is not used: + // https://github.com/search?q=org%3Apulumi+path%3A.ci-mgmt.yaml+%22fail-on-extra-mapping%3A%22&type=code + FailOnExtraMapping bool `yaml:"fail-on-extra-mapping"` + + // PublishRegistry decides if create_docs_build happens during release This + // can be overridden to false to not publish updates. This is disabled in 5 + // repos: + // https://github.com/search?q=org%3Apulumi+path%3A.ci-mgmt.yaml+%22publishRegistry%3A%22&type=code + PublishRegistry bool `yaml:"publishRegistry"` + + // CheckoutSubmodules is used for all checkouts during CI. Defaults to + // false. Only 3 providers use submodules: + // https://github.com/search?q=org%3Apulumi+path%3A.ci-mgmt.yaml+%22checkoutSubmodules%3A%22&type=code + CheckoutSubmodules bool `yaml:"checkoutSubmodules"` + + // TestMasterAndReleaseWorkflows runs the master and release workflows on + // every pull request. This option is currently never set to true: + // https://github.com/search?q=org%3Apulumi+path%3A.ci-mgmt.yaml+%22testMasterAndReleaseWorkflows%3A%22&type=code + TestMasterAndReleaseWorkflows bool `yaml:"testMasterAndReleaseWorkflows"` + + // FreeDiskSpaceBeforeBuild when true will clear disk space before running + // prerequisites workflow. This is used for larger providers which + // sometimes run out of disk space during builds. + FreeDiskSpaceBeforeBuild bool `yaml:"freeDiskSpaceBeforeBuild"` + + // FreeDiskSpaceBeforeSdkBuild when true will clear disk space before + // running test jobs. + FreeDiskSpaceBeforeSdkBuild bool `yaml:"freeDiskSpaceBeforeSdkBuild"` + + // FreeDiskSpaceBeforeTest when true will clear disk space before running + // sdk build jobs. + FreeDiskSpaceBeforeTest bool `yaml:"freeDiskSpaceBeforeTest"` + + // Used for centrally managing tool versions. This is not currently + // overridden by any providers, but ideally the provider's repository + // should pin its own tooling: + // https://github.com/search?q=org%3Apulumi+path%3A.ci-mgmt.yaml+%22toolVersions%22&type=code + ToolVersions toolVersions `yaml:"toolVersions"` + + // Languages controls which language SDKs get built and published. + Languages []string `yaml:"languages"` + + // Env contains an assortment of properties for different purposes. + // Additional entries are added by individual providers for different + // reasons. All jobs currently get the same env for all steps but values + // might only be used for very specific purposes. + Env map[string]string `yaml:"env"` + + // Actions can contain preBuild and preTest additional steps to be spliced + // into workflows. The use of these hooks vary - quite a few just build + // upstream and run provider tests. Usage: + // https://github.com/search?q=org%3Apulumi+path%3A.ci-mgmt.yaml+%22actions%3A%22&type=code + Actions actions `yaml:"actions"` + + // ExtraTests run as part of `run-acceptance-tests.yml`, `master.yml`, + // `main.yml`, `prerelease.yml` and `release.yml`. Only used for aws: + // https://github.com/search?q=org%3Apulumi+path%3A.ci-mgmt.yaml+%22extraTests%3A%22&type=code + ExtraTests map[string]any `yaml:"extraTests"` // Only used by AWS... + + // IntegrationTestProvider will run e2e tests in the provider as well as in + // the examples directory when set to true. Defaults to false. + IntegrationTestProvider bool `yaml:"integrationTestProvider"` + + // TestPulumiExamples runs e2e tests using the examples and test suite in + // the pulumi/examples repo when set to true. Defaults to false. This is + // unused but potentially useful for azure-native onboarding: + // https://github.com/search?q=org%3Apulumi+path%3A.ci-mgmt.yaml+%22testPulumiExamples%3A%22&type=code + TestPulumiExamples bool `yaml:"testPulumiExamples"` + + // Runner defines the runs-on property for various stages of the build + // These are not overridden by any providers: + // https://github.com/search?q=org%3Apulumi+path%3A.ci-mgmt.yaml+%22runner%3A%22&type=code + Runner struct { + Default string `yaml:"default"` + Prerequisites string `yaml:"prerequisites"` + BuildSDK string `yaml:"buildSdk"` + Publish string `yaml:"publish"` + } `yaml:"runner"` + + // actionVersions should be used wherever we use external actions to make + // upgrading easier. These are never overridden by providers: + // https://github.com/search?q=org%3Apulumi+path%3A.ci-mgmt.yaml+%22actionVersions%3A%22&type=code + ActionVersions actionVersions `yaml:"actionVersions"` + + // Publish contains multiple properties relating to the publish jobs. Used + // by 2 providers: + // https://github.com/search?q=org%3Apulumi+path%3A.ci-mgmt.yaml+%22publish%3A%22&type=code + Publish publish `yaml:"publish"` + + // RegistryDocs enables automatic registry index doc file generation. + // Intended for use with Tier 2/3 providers. + RegistryDocs bool `yaml:"registryDocs"` + + // CheckUpstreamUpgrade determines whether we run the upstream upgrade job + // for bridged providers. Set to false for providers that cannot be + // upgraded, e.g. because of archived upstream or a license conflict. + CheckUpstreamUpgrade bool `yaml:"checkUpstreamUpgrade"` + + // ReleaseVerification optionally enables running example tests during releases. + ReleaseVerification *releaseVerification `yaml:"releaseVerification,omitempty"` + + // ExtraLDFlags lists extra flags used by build targets. Only used by + // newrelic: + // https://github.com/search?q=org%3Apulumi+path%3A.ci-mgmt.yaml+%22extra-ld-flags%22&type=code + ExtraLDFlags []string `yaml:"extra-ld-flags"` + + // GoBuildParallelism sets PULUMI_PROVIDER_BUILD_PARALLELISM in the + // Makefile. Used in 5 providers and ideally should be configured by the provider: + // https://github.com/search?q=org%3Apulumi+path%3A.ci-mgmt.yaml+%22goBuildParallelism%22&type=code + GoBuildParallelism int `yaml:"goBuildParallelism"` + + // PulumiConvert sets PULUMI_CONVERT to 1 if truthy. PulumiConvert is set + // to "1" in 74 providers: + // https://github.com/search?q=org%3Apulumi+path%3A.ci-mgmt.yaml+%22pulumiConvert%22&type=code + PulumiConvert intOrBool `yaml:"pulumiConvert"` + + // DocsCmd adds a "docs" target in the makefile. Used only in + // pulumi-docker: + // https://github.com/search?q=org%3Apulumi+path%3A.ci-mgmt.yaml+%22docsCmd%3A%22&type=code + DocsCmd string `yaml:"docsCmd"` + + // XrunUpstreamTools adds extra steps for AWS's upstream make target. + // https://github.com/pulumi/pulumi-aws/issues/2757 + XrunUpstreamTools bool `yaml:"XrunUpstreamTools"` + + // AWS configures AWS credentials before running tests in CI job. Used in 4 + // providers: + // https://github.com/search?q=org%3Apulumi+path%3A.ci-mgmt.yaml+%22aws%3A%22&type=code + AWS bool `yaml:"aws"` + + // Docker runs testing/docker-compose.yml up before running tests in CI + // job. Used in 9 providers: + // https://github.com/search?q=org%3Apulumi+path%3A.ci-mgmt.yaml+%22docker%3A%22&type=code + Docker bool `yaml:"docker"` + + // SSHPrivateKey sets up SSH with specified private key before running + // tests in CI job. This should be provided from a secret. Used by the + // docker provider only: + // https://github.com/search?q=org%3Apulumi+path%3A.ci-mgmt.yaml+%22sshPrivateKey%3A%22&type=code + SSHPrivateKey string `yaml:"sshPrivateKey"` + + // GCP authenticates with GCP before running tests in CI job. Used in gcp + // and docker: + // https://github.com/search?q=org%3Apulumi+path%3A.ci-mgmt.yaml+%22gcp%3A%22&type=code + GCP bool `yaml:"gcp"` + + // GCPRegistry enables logging into the GCP registry before running tests + // in CI job. Only used for docker: + // https://github.com/search?q=org%3Apulumi+path%3A.ci-mgmt.yaml+%22gcpRegistry%3A%22&type=code + GCPRegistry bool `yaml:"gcpRegistry"` + + // SetupScript executes a script before running tests in CI job. Used in 3 + // providers: + // https://github.com/search?q=org%3Apulumi+path%3A.ci-mgmt.yaml+%22setup-script%3A%22&type=code + SetupScript string `yaml:"setup-script"` + + // GenerateNightlyTestWorkflow will include the nightly-test workflow. Used + // in 11 providers: + // https://github.com/search?q=org%3Apulumi+path%3A.ci-mgmt.yaml+%22generate-nightly-test-workflow%3A%22&type=code + GenerateNightlyTestWorkflow bool `yaml:"generate-nightly-test-workflow"` + + // License lists package paths to ignore when running the license check + License struct { + Ignore []string `yaml:"ignore"` + } `yaml:"license"` + + // CleanGithubWorkflows deletes existing files within the .github/workflows + // directory, except where the file begins with the name of the provider + // (e.g. `aws-*`) which are considered provider-specific workflows. + // Defaults to true but this will likely change to false in the future once + // we've made the process of cleaning up removed and renamed workflows more + // reliable. + CleanGithubWorkflows bool `yaml:"clean-github-workflows"` + + // ProviderVersion controls the path of the version LD flag. Only set for 3 + // providers: + // https://github.com/search?q=org%3Apulumi+path%3A.ci-mgmt.yaml+%22providerVersion%3A%22&type=code + ProviderVersion string `yaml:"providerVersion"` + + // EnableConfigurationCheck prints a warning on PRs if configuration + // options aren't documented in the README. Only used by civo. + // https://github.com/search?q=org%3Apulumi+path%3A.ci-mgmt.yaml+%22enableConfigurationCheck%3A%22&type=code + EnableConfigurationCheck bool `yaml:"enableConfigurationCheck"` + + // Deprecated configs + + // Parallel has no effect but is set by some providers. + // https://github.com/search?q=org%3Apulumi+path%3A.ci-mgmt.yaml+%22parallel%3A%22&type=code + Parallel int `yaml:"parallel"` + + // Hybrid has no effect but is set by the docker provider. + // https://github.com/search?q=org%3Apulumi+path%3A.ci-mgmt.yaml+%22hybrid%3A%22&type=code + Hybrid bool `yaml:"hybrid"` + + // Team has no effect but is set by some providers. + // https://github.com/search?q=org%3Apulumi+path%3A.ci-mgmt.yaml+%22team%3A%22&type=code + Team string `yaml:"team"` + + // Timeout has no effect but is set by some providers. It can be specified + // as an int (minutes) or a string duration. + // https://github.com/search?q=org%3Apulumi+path%3A.ci-mgmt.yaml+%22timeout%3A%22&type=code + Timeout intOrDuration `yaml:"timeout"` + + // MakeTemplate has no effect but is set by 78 providers. + // https://github.com/search?q=org%3Apulumi+path%3A.ci-mgmt.yaml+%22makeTemplate%3A%22&type=code + MakeTemplate string `yaml:"makeTemplate"` +} + +// LoadLocalConfig loads the provider configuration at the given path with +// defaults applied. func LoadLocalConfig(path string) (Config, error) { - localConfigBytes, err := os.ReadFile(path) + config, err := loadDefaultConfig() if err != nil { - return nil, fmt.Errorf("error reading config file %s: %w", path, err) + return Config{}, err } - var localConfig map[string]interface{} - err = yaml.Unmarshal(localConfigBytes, &localConfig) + localConfigBytes, err := os.ReadFile(path) if err != nil { - return nil, err + return Config{}, fmt.Errorf("error reading config file %s: %w", path, err) } - return localConfig, nil -} -func (c Config) WithTemplateDefaults() (Config, error) { - configForTemplate, err := loadDefaultConfig() - if err != nil { - return nil, err - } - err = mergo.Merge(&configForTemplate, &c, mergo.WithOverride) + dec := yaml.NewDecoder(bytes.NewReader(localConfigBytes)) + dec.KnownFields(true) + err = dec.Decode(&config) if err != nil { - return nil, err + return Config{}, err } - return configForTemplate, nil + return config, nil +} + +type plugin struct { + Name string `yaml:"name"` + Version string `yaml:"version"` + Kind string `yaml:"kind"` +} + +type actions struct { + PreTest any `yaml:"preTest"` + PreBuild any `yaml:"preBuild"` +} + +type actionVersions struct { + ConfigureAwsCredentials string `yaml:"configureAwsCredentials"` + SetupGcloud string `yaml:"setupGcloud"` + GoogleAuth string `yaml:"googleAuth"` + Checkout string `yaml:"checkout"` + DownloadArtifact string `yaml:"downloadArtifact"` + PathsFilter string `yaml:"pathsFilter"` + PrComment string `yaml:"prComment"` + UploadArtifact string `yaml:"uploadArtifact"` + UpgradeProviderAction string `yaml:"upgradeProviderAction"` + FreeDiskSpace string `yaml:"freeDiskSpace"` +} + +type toolVersions struct { + Dotnet string `yaml:"dotnet"` + Go string `yaml:"go"` + Java string `yaml:"java"` + Gradle string `yaml:"gradle"` + Nodejs string `yaml:"nodejs"` + Pulumi string `yaml:"pulumi"` + Python string `yaml:"python"` +} + +type releaseVerification struct { + Dotnet string `yaml:"dotnet"` + Go string `yaml:"go"` + Nodejs string `yaml:"nodejs"` + Python string `yaml:"python"` +} + +type publish struct { + PublisherAction string `yaml:"publisherAction"` + SDK string `yaml:"sdk"` + CDN bool `yaml:"cdn"` } func loadDefaultConfig() (Config, error) { - var config map[string]interface{} + var config Config configBytes, err := templateFS.ReadFile(filepath.Join("templates", "defaults.config.yaml")) if err != nil { - return nil, fmt.Errorf("error reading embedded defaults config file: %w", err) + return Config{}, fmt.Errorf("error reading embedded defaults config file: %w", err) } - err = yaml.Unmarshal(configBytes, &config) + + dec := yaml.NewDecoder(bytes.NewReader(configBytes)) + dec.KnownFields(true) + err = dec.Decode(&config) if err != nil { - return nil, fmt.Errorf("error parsing embedded defaults config file: %w", err) + return Config{}, fmt.Errorf("error parsing embedded defaults config file: %w", err) } return config, nil } + +type intOrBool bool + +func (x *intOrBool) UnmarshalYAML(unmarshal func(interface{}) error) error { + var b bool + if err := unmarshal(&b); err == nil { + *x = intOrBool(b) + return nil + } + + var i int + if err := unmarshal(&i); err != nil { + return fmt.Errorf("unmarshal int: %w", err) + } + + *x = intOrBool(i == 1) + return nil +} + +type intOrDuration time.Duration + +func (x *intOrDuration) UnmarshalYAML(unmarshal func(interface{}) error) error { + var d time.Duration + if err := unmarshal(&d); err == nil { + *x = intOrDuration(d) + return nil + } + + var i int64 + if err := unmarshal(&i); err != nil { + return fmt.Errorf("unmarshal int: %w", err) + } + + *x = intOrDuration(i * int64(time.Minute)) + return nil +} diff --git a/provider-ci/internal/pkg/generate.go b/provider-ci/internal/pkg/generate.go index 9bd61a2393..c73bd1c68d 100644 --- a/provider-ci/internal/pkg/generate.go +++ b/provider-ci/internal/pkg/generate.go @@ -44,12 +44,12 @@ func GeneratePackage(opts GenerateOpts) error { return fmt.Errorf("error getting template directories: %w", err) } // Clean up old workflows if requested - if clean, found := opts.Config["clean-github-workflows"]; found && clean.(bool) { + if opts.Config.CleanGithubWorkflows { workflows, err := os.ReadDir(filepath.Join(opts.OutDir, ".github", "workflows")) if err != nil { return fmt.Errorf("error reading .github/workflows directory: %w", err) } - providerName := opts.Config["provider"].(string) + providerName := opts.Config.Provider for _, workflow := range workflows { // Skip provider-specific workflows which are prefixed with the provider name if strings.HasPrefix(workflow.Name(), providerName+"-") { @@ -168,7 +168,7 @@ func renderTemplateDir(template string, opts GenerateOpts) error { outPath = filepath.Join(opts.OutDir, outPath) // Sub in the correct Workflow name by repo default branch if strings.Contains(inPath, "main.yml") { - branchName := fmt.Sprint(config["providerDefaultBranch"]) + branchName := config.ProviderDefaultBranch outPath = strings.ReplaceAll(outPath, "main", branchName) } tmpl, err := parseTemplate(templateFS, inPath) diff --git a/provider-ci/internal/pkg/templates/bridged-provider/.github/actions/download-bin/action.yml b/provider-ci/internal/pkg/templates/bridged-provider/.github/actions/download-bin/action.yml index 3f80e2b1e4..f925c04369 100644 --- a/provider-ci/internal/pkg/templates/bridged-provider/.github/actions/download-bin/action.yml +++ b/provider-ci/internal/pkg/templates/bridged-provider/.github/actions/download-bin/action.yml @@ -5,12 +5,12 @@ runs: using: "composite" steps: - name: Download provider + tfgen binaries - uses: #{{ .Config.actionVersions.downloadArtifact }}# + uses: #{{ .Config.ActionVersions.DownloadArtifact }}# with: - name: #{{ .Config.provider }}#-provider.tar.gz + name: #{{ .Config.Provider }}#-provider.tar.gz path: ${{ github.workspace }}/bin - name: Untar provider binaries shell: bash run: | tar -zxf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ github.workspace}}/bin - find ${{ github.workspace }} -name "pulumi-*-#{{ .Config.provider }}#" -print -exec chmod +x {} \; + find ${{ github.workspace }} -name "pulumi-*-#{{ .Config.Provider }}#" -print -exec chmod +x {} \; diff --git a/provider-ci/internal/pkg/templates/bridged-provider/.github/actions/upload-bin/action.yml b/provider-ci/internal/pkg/templates/bridged-provider/.github/actions/upload-bin/action.yml index 9d860c34e5..0eb4de272c 100644 --- a/provider-ci/internal/pkg/templates/bridged-provider/.github/actions/upload-bin/action.yml +++ b/provider-ci/internal/pkg/templates/bridged-provider/.github/actions/upload-bin/action.yml @@ -6,10 +6,10 @@ runs: steps: - name: Tar provider binaries shell: bash - run: tar -zcf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ github.workspace }}/bin/ pulumi-resource-#{{ .Config.provider }}# pulumi-tfgen-#{{ .Config.provider }}# + run: tar -zcf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ github.workspace }}/bin/ pulumi-resource-#{{ .Config.Provider }}# pulumi-tfgen-#{{ .Config.Provider }}# - name: Upload artifacts - uses: #{{ .Config.actionVersions.uploadArtifact }}# + uses: #{{ .Config.ActionVersions.UploadArtifact }}# with: - name: #{{ .Config.provider }}#-provider.tar.gz + name: #{{ .Config.Provider }}#-provider.tar.gz path: ${{ github.workspace }}/bin/provider.tar.gz retention-days: 30 diff --git a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/build_provider.yml b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/build_provider.yml index 4ce93fbb92..b02e5ceec2 100644 --- a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/build_provider.yml +++ b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/build_provider.yml @@ -11,7 +11,7 @@ on: jobs: build_provider: name: Build ${{ matrix.platform.os }}-${{ matrix.platform.arch }} - runs-on: #{{ if .Config.runner.buildSdk }}##{{- .Config.runner.buildSdk }}##{{ else }}##{{- .Config.runner.default }}##{{ end }}# + runs-on: #{{ if .Config.Runner.BuildSDK }}##{{- .Config.Runner.BuildSDK }}##{{ else }}##{{- .Config.Runner.Default }}##{{ end }}# env: PROVIDER_VERSION: ${{ inputs.version }} strategy: @@ -29,20 +29,20 @@ jobs: - os: windows arch: amd64 steps: - #{{- if .Config.freeDiskSpaceBeforeBuild }}# + #{{- if .Config.FreeDiskSpaceBeforeBuild }}# # Run as first step so we don't delete things that have just been installed - name: Free Disk Space (Ubuntu) - uses: #{{ .Config.actionVersions.freeDiskSpace }}# + uses: #{{ .Config.ActionVersions.FreeDiskSpace }}# with: tool-cache: false swap-storage: false dotnet: false #{{- end }}# - name: Checkout Repo - uses: #{{ .Config.actionVersions.checkout }}# + uses: #{{ .Config.ActionVersions.Checkout }}# with: - #{{- if .Config.checkoutSubmodules }}# - submodules: #{{ .Config.checkoutSubmodules }}# + #{{- if .Config.CheckoutSubmodules }}# + submodules: #{{ .Config.CheckoutSubmodules }}# #{{- end }}# persist-credentials: false - name: Setup tools @@ -50,21 +50,21 @@ jobs: with: tools: pulumictl, go - name: Download schema-embed.json - uses: #{{ .Config.actionVersions.downloadArtifact }}# + uses: #{{ .Config.ActionVersions.DownloadArtifact }}# with: # Use a pattern to avoid failing if the artifact doesn't exist pattern: schema-embed.* # Avoid creating directories for each artifact merge-multiple: true - path: provider/cmd/pulumi-resource-#{{ .Config.provider }}#/schema-embed.json + path: provider/cmd/pulumi-resource-#{{ .Config.Provider }}#/schema-embed.json - name: Prepare for build # This installs plugins and prepares upstream run: make upstream - name: Build & package provider run: make provider_dist-${{ matrix.platform.os }}-${{ matrix.platform.arch }} - name: Upload artifacts - uses: #{{ .Config.actionVersions.uploadArtifact }}# + uses: #{{ .Config.ActionVersions.UploadArtifact }}# with: - name: pulumi-resource-#{{ .Config.provider }}#-v${{ inputs.version }}-${{ matrix.platform.os }}-${{ matrix.platform.arch }}.tar.gz - path: bin/pulumi-resource-#{{ .Config.provider }}#-v${{ inputs.version }}-${{ matrix.platform.os }}-${{ matrix.platform.arch }}.tar.gz + name: pulumi-resource-#{{ .Config.Provider }}#-v${{ inputs.version }}-${{ matrix.platform.os }}-${{ matrix.platform.arch }}.tar.gz + path: bin/pulumi-resource-#{{ .Config.Provider }}#-v${{ inputs.version }}-${{ matrix.platform.os }}-${{ matrix.platform.arch }}.tar.gz retention-days: 30 diff --git a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/build_sdk.yml b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/build_sdk.yml index 8b23d826a2..5191f0430f 100644 --- a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/build_sdk.yml +++ b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/build_sdk.yml @@ -8,33 +8,33 @@ on: type: string env: -#{{ .Config.env | toYaml | indent 2 }}# +#{{ .Config.Env | toYaml | indent 2 }}# PROVIDER_VERSION: ${{ inputs.version }} jobs: build_sdk: name: build_sdk - runs-on: #{{ if .Config.runner.buildSdk }}##{{- .Config.runner.buildSdk }}##{{ else }}##{{- .Config.runner.default }}##{{ end }}# + runs-on: #{{ if .Config.Runner.BuildSDK }}##{{- .Config.Runner.BuildSDK }}##{{ else }}##{{- .Config.Runner.Default }}##{{ end }}# strategy: fail-fast: true matrix: language: -#{{ .Config.languages | toYaml | indent 8 }}# +#{{ .Config.Languages | toYaml | indent 8 }}# steps: - #{{- if .Config.freeDiskSpaceBeforeSdkBuild }}# + #{{- if .Config.FreeDiskSpaceBeforeSdkBuild }}# # Run as first step so we don't delete things that have just been installed - name: Free Disk Space (Ubuntu) - uses: #{{ .Config.actionVersions.freeDiskSpace }}# + uses: #{{ .Config.ActionVersions.FreeDiskSpace }}# with: tool-cache: false swap-storage: false dotnet: false #{{- end }}# - name: Checkout Repo - uses: #{{ .Config.actionVersions.checkout }}# + uses: #{{ .Config.ActionVersions.Checkout }}# with: - #{{- if .Config.checkoutSubmodules }}# - submodules: #{{ .Config.checkoutSubmodules }}# + #{{- if .Config.CheckoutSubmodules }}# + submodules: #{{ .Config.CheckoutSubmodules }}# #{{- end }}# persist-credentials: false - name: Cache examples generation diff --git a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/main.yml b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/main.yml index 08174488b4..4955fc311c 100644 --- a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/main.yml +++ b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/main.yml @@ -1,7 +1,7 @@ # WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi/ci-mgmt env: -#{{ .Config.env | toYaml | indent 2 }}# +#{{ .Config.Env | toYaml | indent 2 }}# jobs: prerequisites: uses: ./.github/workflows/prerequisites.yml @@ -32,7 +32,7 @@ jobs: COVERAGE_OUTPUT_DIR: ${{ secrets.COVERAGE_OUTPUT_DIR }} name: generate_coverage_data needs: prerequisites - runs-on: #{{ .Config.runner.default }}# + runs-on: #{{ .Config.Runner.Default }}# steps: - name: Free Disk Space (Ubuntu) uses: jlumbroso/free-disk-space@v1.3.1 @@ -40,14 +40,14 @@ jobs: tool-cache: false swap-storage: false - name: Checkout Repo - uses: #{{ .Config.actionVersions.checkout }}# + uses: #{{ .Config.ActionVersions.Checkout }}# with: - #{{- if .Config.checkoutSubmodules }}# - submodules: #{{ .Config.checkoutSubmodules }}# + #{{- if .Config.CheckoutSubmodules }}# + submodules: #{{ .Config.CheckoutSubmodules }}# #{{- end }}# persist-credentials: false - name: Configure AWS Credentials - uses: #{{ .Config.actionVersions.configureAwsCredentials }}# + uses: #{{ .Config.ActionVersions.ConfigureAwsCredentials }}# with: aws-access-key-id: ${{ secrets.AWS_CORP_S3_UPLOAD_ACCESS_KEY_ID }} aws-region: us-west-2 @@ -69,7 +69,7 @@ jobs: s3FullURI="s3://${{ secrets.S3_COVERAGE_BUCKET_NAME }}/summaries/${summaryName}" aws s3 cp "${{ env.COVERAGE_OUTPUT_DIR }}/summary.json" "${s3FullURI}" --acl bucket-owner-full-control - #{{ if .Config.lint -}}# + #{{ if .Config.Lint -}}# lint: name: lint uses: ./.github/workflows/lint.yml @@ -90,7 +90,7 @@ jobs: - build_provider - test - license_check - #{{- range $action, $_ := .Config.extraTests }}# + #{{- range $action, $_ := .Config.ExtraTests }}# - #{{ $action }}# #{{- end }}# uses: ./.github/workflows/publish.yml @@ -103,7 +103,7 @@ jobs: tag_release_if_labeled_needs_release: name: Tag release if labeled as needs-release needs: publish - runs-on: #{{ .Config.runner.default }}# + runs-on: #{{ .Config.Runner.Default }}# steps: - name: check if this commit needs release if: ${{ env.RELEASE_BOT_ENDPOINT != '' }} @@ -126,24 +126,24 @@ jobs: permissions: contents: read id-token: write - runs-on: #{{ if .Config.runner.buildSdk }}##{{- .Config.runner.buildSdk }}##{{ else }}##{{- .Config.runner.default }}##{{ end }}# + runs-on: #{{ if .Config.Runner.BuildSDK }}##{{- .Config.Runner.BuildSDK }}##{{ else }}##{{- .Config.Runner.Default }}##{{ end }}# env: PROVIDER_VERSION: ${{ needs.prerequisites.outputs.version }} steps: -#{{- if .Config.freeDiskSpaceBeforeTest }}# + #{{- if .Config.FreeDiskSpaceBeforeTest }}# # Run as first step so we don't delete things that have just been installed - name: Free Disk Space (Ubuntu) - uses: #{{ .Config.actionVersions.freeDiskSpace }}# + uses: #{{ .Config.ActionVersions.FreeDiskSpace }}# with: tool-cache: false swap-storage: false dotnet: false -#{{- end }}# + #{{- end }}# - name: Checkout Repo - uses: #{{ .Config.actionVersions.checkout }}# + uses: #{{ .Config.ActionVersions.Checkout }}# with: - #{{- if .Config.checkoutSubmodules }}# - submodules: #{{ .Config.checkoutSubmodules }}# + #{{- if .Config.CheckoutSubmodules }}# + submodules: #{{ .Config.CheckoutSubmodules }}# #{{- end }}# persist-credentials: false - name: Setup tools @@ -166,24 +166,24 @@ jobs: run: |- pip3 install virtualenv==20.0.23 pip3 install pipenv - #{{- if .Config.docker }}# + #{{- if .Config.Docker }}# - name: Run docker compose run: docker compose -f testing/docker-compose.yml up --build -d #{{- end }}# - #{{- if .Config.aws }}# + #{{- if .Config.AWS }}# - name: Configure AWS Credentials - uses: #{{ .Config.actionVersions.configureAwsCredentials }}# + uses: #{{ .Config.ActionVersions.ConfigureAwsCredentials }}# with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-region: ${{ env.AWS_REGION }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} role-duration-seconds: 7200 - role-session-name: #{{ .Config.provider }}#@githubActions + role-session-name: #{{ .Config.Provider }}#@githubActions role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }} #{{- end }}# - #{{- if .Config.gcp }}# + #{{- if .Config.GCP }}# - name: Authenticate to Google Cloud - uses: #{{ .Config.actionVersions.googleAuth }}# + uses: #{{ .Config.ActionVersions.GoogleAuth }}# with: service_account: ${{ env.GOOGLE_CI_SERVICE_ACCOUNT_EMAIL }} workload_identity_provider: projects/${{ env.GOOGLE_PROJECT_NUMBER @@ -191,27 +191,27 @@ jobs: env.GOOGLE_CI_WORKLOAD_IDENTITY_POOL }}/providers/${{ env.GOOGLE_CI_WORKLOAD_IDENTITY_PROVIDER }} - name: Setup gcloud auth - uses: #{{ .Config.actionVersions.setupGcloud }}# + uses: #{{ .Config.ActionVersions.SetupGcloud }}# with: install_components: gke-gcloud-auth-plugin #{{- end }}# - #{{- if .Config.gcpRegistry }}# + #{{- if .Config.GCPRegistry }}# - name: Login to Google Cloud Registry run: gcloud --quiet auth configure-docker #{{- end }}# - #{{- if .Config.sshPrivateKey }}# + #{{- if .Config.SSHPrivateKey }}# - name: Setup SSH key uses: webfactory/ssh-agent@v0.7.0 with: - ssh-private-key: #{{ .Config.sshPrivateKey }}# + ssh-private-key: #{{ .Config.SSHPrivateKey }}# #{{- end }}# - #{{- if .Config.integrationTestProvider }}# + #{{- if .Config.IntegrationTestProvider }}# - name: Prepare upstream code run: make upstream #{{- end }}# - #{{- if index .Config "setup-script" }}# + #{{- if index .Config.SetupScript }}# - name: Run setup script - run: #{{ index .Config "setup-script" }}# + run: #{{ index .Config.SetupScript }}# #{{- end }}# - name: Install dependencies run: make install_${{ matrix.language}}_sdk @@ -220,10 +220,10 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} version: v2.5.0 -#{{- if .Config.actions.preTest }}# -#{{ .Config.actions.preTest | toYaml | indent 4 }}# +#{{- if .Config.Actions.PreTest }}# +#{{ .Config.Actions.PreTest | toYaml | indent 4 }}# #{{- end }}# - #{{- if .Config.integrationTestProvider }}# +#{{- if .Config.IntegrationTestProvider }}# - name: Run provider tests working-directory: provider run: go test -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -parallel 4 @@ -234,22 +234,22 @@ jobs: fail-fast: false matrix: language: -#{{ .Config.languages | toYaml | indent 8 }}# -#{{- if .Config.extraTests }}# -#{{ .Config.extraTests | toYaml | indent 2 }}# +#{{ .Config.Languages | toYaml | indent 8 }}# +#{{- if .Config.ExtraTests }}# +#{{ .Config.ExtraTests | toYaml | indent 2 }}# #{{ end }}# -name: #{{ .Config.providerDefaultBranch }}# +name: #{{ .Config.ProviderDefaultBranch }}# on: workflow_dispatch: {} push: branches: - - #{{ .Config.providerDefaultBranch }}# + - #{{ .Config.ProviderDefaultBranch }}# paths-ignore: - "**.md" tags-ignore: - v* - sdk/* - "**" -#{{- if .Config.testMasterAndReleaseWorkflows }}# +#{{- if .Config.TestMasterAndReleaseWorkflows }}# pull_request: #{{ end }}# diff --git a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/nightly-test.yml b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/nightly-test.yml index f6dfcf20c6..8089b6ae6d 100644 --- a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/nightly-test.yml +++ b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/nightly-test.yml @@ -1,8 +1,8 @@ -#{{ if index .Config "generate-nightly-test-workflow" -}}# +#{{ if .Config.GenerateNightlyTestWorkflow -}}# # WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi/ci-mgmt env: -#{{ .Config.env | toYaml | indent 2 }}# +#{{ .Config.Env | toYaml | indent 2 }}# jobs: prerequisites: uses: ./.github/workflows/prerequisites.yml @@ -35,24 +35,24 @@ jobs: permissions: contents: read id-token: write - runs-on: #{{ if .Config.runner.buildSdk }}##{{- .Config.runner.buildSdk }}##{{ else }}##{{- .Config.runner.default }}##{{ end }}# + runs-on: #{{ if .Config.Runner.BuildSDK }}##{{- .Config.Runner.BuildSDK }}##{{ else }}##{{- .Config.Runner.Default }}##{{ end }}# env: PROVIDER_VERSION: ${{ needs.prerequisites.outputs.version }} steps: -#{{- if .Config.freeDiskSpaceBeforeTest }}# +#{{- if .Config.FreeDiskSpaceBeforeTest }}# # Run as first step so we don't delete things that have just been installed - name: Free Disk Space (Ubuntu) - uses: #{{ .Config.actionVersions.freeDiskSpace }}# + uses: #{{ .Config.ActionVersions.FreeDiskSpace }}# with: tool-cache: false swap-storage: false dotnet: false #{{- end }}# - name: Checkout Repo - uses: #{{ .Config.actionVersions.checkout }}# + uses: #{{ .Config.ActionVersions.Checkout }}# with: - #{{- if .Config.checkoutSubmodules }}# - submodules: #{{ .Config.checkoutSubmodules }}# + #{{- if .Config.CheckoutSubmodules }}# + submodules: #{{ .Config.CheckoutSubmodules }}# #{{- end }}# persist-credentials: false - name: Setup tools @@ -75,13 +75,13 @@ jobs: run: |- pip3 install virtualenv==20.0.23 pip3 install pipenv - #{{- if .Config.docker }}# + #{{- if .Config.Docker }}# - name: Run docker compose run: docker compose -f testing/docker-compose.yml up --build -d #{{- end }}# - #{{- if .Config.aws }}# + #{{- if .Config.AWS }}# - name: Configure AWS Credentials - uses: #{{ .Config.actionVersions.configureAwsCredentials }}# + uses: #{{ .Config.ActionVersions.ConfigureAwsCredentials }}# with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-region: ${{ env.AWS_REGION }} @@ -90,9 +90,9 @@ jobs: role-session-name: #{{ .Config.provider }}#@githubActions role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }} #{{- end }}# - #{{- if .Config.gcp }}# + #{{- if .Config.GCP }}# - name: Authenticate to Google Cloud - uses: #{{ .Config.actionVersions.googleAuth }}# + uses: #{{ .Config.ActionVersions.GoogleAuth }}# with: service_account: ${{ env.GOOGLE_CI_SERVICE_ACCOUNT_EMAIL }} workload_identity_provider: projects/${{ env.GOOGLE_PROJECT_NUMBER @@ -100,27 +100,27 @@ jobs: env.GOOGLE_CI_WORKLOAD_IDENTITY_POOL }}/providers/${{ env.GOOGLE_CI_WORKLOAD_IDENTITY_PROVIDER }} - name: Setup gcloud auth - uses: #{{ .Config.actionVersions.setupGcloud }}# + uses: #{{ .Config.ActionVersions.SetupGcloud }}# with: install_components: gke-gcloud-auth-plugin #{{- end }}# - #{{- if .Config.gcpRegistry }}# + #{{- if .Config.GCPRegistry }}# - name: Login to Google Cloud Registry run: gcloud --quiet auth configure-docker #{{- end }}# - #{{- if .Config.sshPrivateKey }}# + #{{- if .Config.SSHPrivateKey }}# - name: Setup SSH key uses: webfactory/ssh-agent@v0.7.0 with: - ssh-private-key: #{{ .Config.sshPrivateKey }}# + ssh-private-key: #{{ .Config.SSHPrivateKey }}# #{{- end }}# - #{{- if .Config.integrationTestProvider }}# + #{{- if .Config.IntegrationTestProvider }}# - name: Prepare upstream code run: make upstream #{{- end }}# - #{{- if index .Config "setup-script" }}# + #{{- if index .Config.SetupScript }}# - name: Run setup script - run: #{{ index .Config "setup-script" }}# + run: #{{ index .Config.SetupScript }}# #{{- end }}# - name: Install dependencies run: make install_${{ matrix.language}}_sdk @@ -129,10 +129,10 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} version: v2.5.0 -#{{- if .Config.actions.preTest }}# -#{{ .Config.actions.preTest | toYaml | indent 4 }}# +#{{- if .Config.Actions.PreTest }}# +#{{ .Config.Actions.PreTest | toYaml | indent 4 }}# #{{- end }}# - #{{- if .Config.integrationTestProvider }}# + #{{- if .Config.IntegrationTestProvider }}# - name: Run provider tests if: matrix.testTarget == 'local' working-directory: provider @@ -144,7 +144,7 @@ jobs: fail-fast: false matrix: language: -#{{ .Config.languages | toYaml | indent 10 }}# +#{{ .Config.Languages | toYaml | indent 10 }}# name: cron on: schedule: diff --git a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/prerelease.yml b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/prerelease.yml index 626b148758..121807a5c8 100644 --- a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/prerelease.yml +++ b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/prerelease.yml @@ -2,7 +2,7 @@ env: IS_PRERELEASE: true -#{{ .Config.env | toYaml | indent 2 }}# +#{{ .Config.Env | toYaml | indent 2 }}# jobs: prerequisites: uses: ./.github/workflows/prerequisites.yml @@ -27,7 +27,7 @@ jobs: with: version: ${{ needs.prerequisites.outputs.version }} - #{{ if .Config.lint -}}# + #{{ if .Config.Lint -}}# lint: name: lint uses: ./.github/workflows/lint.yml @@ -48,7 +48,7 @@ jobs: - build_provider - test - license_check - #{{- range $action, $_ := .Config.extraTests }}# + #{{- range $action, $_ := .Config.ExtraTests }}# - #{{ $action }}# #{{- end }}# uses: ./.github/workflows/publish.yml @@ -65,30 +65,30 @@ jobs: permissions: contents: read id-token: write - runs-on: #{{ if .Config.runner.buildSdk }}##{{- .Config.runner.buildSdk }}##{{ else }}##{{- .Config.runner.default }}##{{ end }}# + runs-on: #{{ if .Config.Runner.BuildSDK }}##{{- .Config.Runner.BuildSDK }}##{{ else }}##{{- .Config.Runner.Default }}##{{ end }}# env: PROVIDER_VERSION: ${{ needs.prerequisites.outputs.version }} steps: -#{{- if .Config.freeDiskSpaceBeforeTest }}# +#{{- if .Config.FreeDiskSpaceBeforeTest }}# # Run as first step so we don't delete things that have just been installed - name: Free Disk Space (Ubuntu) - uses: #{{ .Config.actionVersions.freeDiskSpace }}# + uses: #{{ .Config.ActionVersions.FreeDiskSpace }}# with: tool-cache: false swap-storage: false dotnet: false #{{- end }}# - name: Checkout Repo - uses: #{{ .Config.actionVersions.checkout }}# + uses: #{{ .Config.ActionVersions.Checkout }}# with: - #{{- if .Config.checkoutSubmodules }}# - submodules: #{{ .Config.checkoutSubmodules }}# + #{{- if .Config.CheckoutSubmodules }}# + submodules: #{{ .Config.CheckoutSubmodules }}# #{{- end }}# persist-credentials: false - name: Setup tools uses: ./.github/actions/setup-tools with: - tools: pulumictl, pulumicli, #{{ range $index, $element := .Config.languages }}##{{if $index}}#, #{{end}}##{{ $element }}##{{end}}# + tools: pulumictl, pulumicli, #{{ range $index, $element := .Config.Languages }}##{{if $index}}#, #{{end}}##{{ $element }}##{{end}}# - name: Download bin uses: ./.github/actions/download-bin - name: Add NuGet source @@ -105,24 +105,24 @@ jobs: run: |- pip3 install virtualenv==20.0.23 pip3 install pipenv - #{{- if .Config.docker }}# + #{{- if .Config.Docker }}# - name: Run docker compose run: docker compose -f testing/docker-compose.yml up --build -d #{{- end }}# - #{{- if .Config.aws }}# + #{{- if .Config.AWS }}# - name: Configure AWS Credentials - uses: #{{ .Config.actionVersions.configureAwsCredentials }}# + uses: #{{ .Config.ActionVersions.ConfigureAwsCredentials }}# with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-region: ${{ env.AWS_REGION }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} role-duration-seconds: 7200 - role-session-name: #{{ .Config.provider }}#@githubActions + role-session-name: #{{ .Config.Provider }}#@githubActions role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }} #{{- end }}# - #{{- if .Config.gcp }}# + #{{- if .Config.GCP }}# - name: Authenticate to Google Cloud - uses: #{{ .Config.actionVersions.googleAuth }}# + uses: #{{ .Config.ActionVersions.GoogleAuth }}# with: service_account: ${{ env.GOOGLE_CI_SERVICE_ACCOUNT_EMAIL }} workload_identity_provider: projects/${{ env.GOOGLE_PROJECT_NUMBER @@ -130,27 +130,27 @@ jobs: env.GOOGLE_CI_WORKLOAD_IDENTITY_POOL }}/providers/${{ env.GOOGLE_CI_WORKLOAD_IDENTITY_PROVIDER }} - name: Setup gcloud auth - uses: #{{ .Config.actionVersions.setupGcloud }}# + uses: #{{ .Config.ActionVersions.SetupGcloud }}# with: install_components: gke-gcloud-auth-plugin #{{- end }}# - #{{- if .Config.gcpRegistry }}# + #{{- if .Config.GCPRegistry }}# - name: Login to Google Cloud Registry run: gcloud --quiet auth configure-docker #{{- end }}# - #{{- if .Config.sshPrivateKey }}# + #{{- if .Config.SSHPrivateKey }}# - name: Setup SSH key uses: webfactory/ssh-agent@v0.7.0 with: - ssh-private-key: #{{ .Config.sshPrivateKey }}# + ssh-private-key: #{{ .Config.SSHPrivateKey }}# #{{- end }}# - #{{- if .Config.integrationTestProvider }}# + #{{- if .Config.IntegrationTestProvider }}# - name: Prepare upstream code run: make upstream #{{- end }}# - #{{- if index .Config "setup-script" }}# + #{{- if index .Config.SetupScript }}# - name: Run setup script - run: #{{ index .Config "setup-script" }}# + run: #{{ index .Config.SetupScript }}# #{{- end }}# - name: Install dependencies run: make install_${{ matrix.language}}_sdk @@ -159,10 +159,10 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} version: v2.5.0 -#{{- if .Config.actions.preTest }}# -#{{ .Config.actions.preTest | toYaml | indent 4 }}# +#{{- if .Config.Actions.PreTest }}# +#{{ .Config.Actions.PreTest | toYaml | indent 4 }}# #{{- end }}# - #{{- if .Config.integrationTestProvider }}# + #{{- if .Config.IntegrationTestProvider }}# - name: Run provider tests working-directory: provider run: go test -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -parallel 4 . @@ -173,9 +173,9 @@ jobs: fail-fast: false matrix: language: -#{{ .Config.languages | toYaml | indent 8 }}# -#{{- if .Config.extraTests }}# -#{{ .Config.extraTests | toYaml | indent 2 }}# +#{{ .Config.Languages | toYaml | indent 8 }}# +#{{- if .Config.ExtraTests }}# +#{{ .Config.ExtraTests | toYaml | indent 2 }}# #{{ end }}# name: prerelease @@ -183,6 +183,6 @@ on: push: tags: - v*.*.*-** -#{{- if .Config.testMasterAndReleaseWorkflows }}# +#{{- if .Config.TestMasterAndReleaseWorkflows }}# pull_request: #{{ end }}# diff --git a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/prerequisites.yml b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/prerequisites.yml index d8cf644c5e..7133fe35c0 100644 --- a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/prerequisites.yml +++ b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/prerequisites.yml @@ -18,29 +18,29 @@ on: value: ${{ jobs.prerequisites.outputs.version }} env: -#{{ .Config.env | toYaml | indent 2 }}# +#{{ .Config.Env | toYaml | indent 2 }}# jobs: prerequisites: name: prerequisites - runs-on: #{{ .Config.runner.prerequisites }}# + runs-on: #{{ .Config.Runner.Prerequisites }}# outputs: version: ${{ steps.provider-version.outputs.version }} steps: -#{{- if .Config.freeDiskSpaceBeforeBuild }}# +#{{- if .Config.FreeDiskSpaceBeforeBuild }}# # Run as first step so we don't delete things that have just been installed - name: Free Disk Space (Ubuntu) - uses: #{{ .Config.actionVersions.freeDiskSpace }}# + uses: #{{ .Config.ActionVersions.FreeDiskSpace }}# with: tool-cache: false swap-storage: false dotnet: false #{{- end }}# - name: Checkout Repo - uses: #{{ .Config.actionVersions.checkout }}# + uses: #{{ .Config.ActionVersions.Checkout }}# with: - #{{- if .Config.checkoutSubmodules }}# - submodules: #{{ .Config.checkoutSubmodules }}# + #{{- if .Config.CheckoutSubmodules }}# + submodules: #{{ .Config.CheckoutSubmodules }}# #{{- end }}# persist-credentials: false - uses: pulumi/provider-version-action@v1 @@ -59,8 +59,8 @@ jobs: uses: ./.github/actions/setup-tools with: tools: go, pulumictl, pulumicli, schema-tools -#{{- if .Config.actions.preBuild }}# -#{{ .Config.actions.preBuild | toYaml | indent 4 }}# +#{{- if .Config.Actions.PreBuild }}# +#{{ .Config.Actions.PreBuild | toYaml | indent 4 }}# #{{- end }}# - name: Build schema generator binary run: make tfgen_build_only @@ -78,12 +78,12 @@ jobs: EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) { echo "SCHEMA_CHANGES<<$EOF"; - schema-tools compare -r github://api.github.com/#{{ .Config.organization }}# -p #{{ .Config.provider }}# -o "${{ inputs.default_branch }}" -n --local-path=provider/cmd/pulumi-resource-#{{ .Config.provider }}#/schema.json; + schema-tools compare -r github://api.github.com/#{{ .Config.Organization }}# -p #{{ .Config.Provider }}# -o "${{ inputs.default_branch }}" -n --local-path=provider/cmd/pulumi-resource-#{{ .Config.Provider }}#/schema.json; echo "$EOF"; } >> "$GITHUB_ENV" - if: inputs.is_pr && inputs.is_automated == false name: Comment on PR with Details of Schema Check - uses: #{{ .Config.actionVersions.prComment }}# + uses: #{{ .Config.ActionVersions.PrComment }}# with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} comment_tag: schemaCheck @@ -93,12 +93,12 @@ jobs: Maintainer note: consult the [runbook](https://github.com/pulumi/platform-providers-team/blob/main/playbooks/tf-provider-updating.md) for dealing with any breaking changes. -#{{- if .Config.enableConfigurationCheck }}# +#{{- if .Config.EnableConfigurationCheck }}# - if: inputs.is_pr name: Check Configuration section run: | sed -n '/## Configuration/,$p' README.md | sed -n '/## Reference/q;p' >> config_section.txt - jq -r '.config | select(.variables) | .variables | keys[]' < provider/cmd/pulumi-resource-#{{ .Config.provider }}#/schema.json >> keys.txt + jq -r '.config | select(.variables) | .variables | keys[]' < provider/cmd/pulumi-resource-#{{ .Config.Provider }}#/schema.json >> keys.txt EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) { echo "MISSING_CONFIG<<$EOF"; @@ -123,8 +123,8 @@ jobs: uses: ./.github/actions/upload-bin - name: Upload schema-embed.json - uses: #{{ .Config.actionVersions.uploadArtifact }}# + uses: #{{ .Config.ActionVersions.UploadArtifact }}# with: name: schema-embed.json - path: provider/cmd/pulumi-resource-#{{ .Config.provider }}#/schema-embed.json + path: provider/cmd/pulumi-resource-#{{ .Config.Provider }}#/schema-embed.json retention-days: 30 diff --git a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/publish.yml b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/publish.yml index 4bad0a3987..14fed363ed 100644 --- a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/publish.yml +++ b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/publish.yml @@ -17,12 +17,12 @@ on: env: IS_PRERELEASE: ${{ inputs.isPrerelease }} -#{{ .Config.env | toYaml | indent 2 }}# +#{{ .Config.Env | toYaml | indent 2 }}# jobs: publish: name: publish - runs-on: #{{ if .Config.runner.publish }}##{{- .Config.runner.publish }}##{{ else }}##{{- .Config.runner.default }}##{{ end }}# + runs-on: #{{ if .Config.Runner.Publish }}##{{- .Config.Runner.Publish }}##{{ else }}##{{- .Config.Runner.Default }}##{{ end }}# steps: - name: Validate prerelease if: inputs.isPrerelease == false && (contains(inputs.version, '-') || contains(inputs.version, '+')) @@ -31,54 +31,54 @@ jobs: if: inputs.skipGoSdk && inputs.isPrerelease == false run: echo "Can't skip Go SDK for stable releases. This is likely a bug in the calling workflow." && exit 1 - name: Checkout Repo - uses: #{{ .Config.actionVersions.checkout }}# + uses: #{{ .Config.ActionVersions.Checkout }}# with: - #{{- if .Config.checkoutSubmodules }}# - submodules: #{{ .Config.checkoutSubmodules }}# + #{{- if .Config.CheckoutSubmodules }}# + submodules: #{{ .Config.CheckoutSubmodules }}# #{{- end }}# persist-credentials: false - name: Setup tools uses: ./.github/actions/setup-tools with: tools: pulumictl, pulumicli, go, schema-tools -#{{- if .Config.publish.cdn }}# +#{{- if .Config.Publish.CDN }}# - name: Configure AWS Credentials - uses: #{{ .Config.actionVersions.configureAwsCredentials }}# + uses: #{{ .Config.ActionVersions.ConfigureAwsCredentials }}# with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-region: us-east-2 aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} role-duration-seconds: 7200 role-external-id: upload-pulumi-release - role-session-name: #{{ .Config.provider }}#@githubActions + role-session-name: #{{ .Config.Provider }}#@githubActions role-to-assume: ${{ secrets.AWS_UPLOAD_ROLE_ARN }} #{{- end }}# - name: Create dist directory run: mkdir -p dist - name: Download provider assets - uses: #{{ .Config.actionVersions.downloadArtifact }}# + uses: #{{ .Config.ActionVersions.DownloadArtifact }}# with: - pattern: pulumi-resource-#{{ .Config.provider }}#-v${{ inputs.version }}-* + pattern: pulumi-resource-#{{ .Config.Provider }}#-v${{ inputs.version }}-* path: dist # Don't create a directory for each artifact merge-multiple: true - name: Calculate checksums working-directory: dist - run: shasum ./*.tar.gz > "pulumi-#{{ .Config.provider }}#_${{ inputs.version }}_checksums.txt" + run: shasum ./*.tar.gz > "pulumi-#{{ .Config.Provider }}#_${{ inputs.version }}_checksums.txt" - name: Get Schema Change Summary id: schema-summary shell: bash run: | # Get latest stable release. Return only first column from result (tag). - LAST_VERSION=$(gh release view --repo #{{ .Config.organization }}#/pulumi-#{{ .Config.provider }}# --json tagName -q .tagName || echo "No stable release" ) + LAST_VERSION=$(gh release view --repo #{{ .Config.Organization }}#/pulumi-#{{ .Config.Provider }}# --json tagName -q .tagName || echo "No stable release" ) { echo 'summary<> "$GITHUB_OUTPUT" -#{{- if .Config.publish.cdn }}# +#{{- if .Config.Publish.CDN }}# - name: Upload Provider Binaries run: aws s3 cp dist s3://get.pulumi.com/releases/plugins/ --recursive #{{- end }}# @@ -99,24 +99,24 @@ jobs: publish_sdk: name: publish_sdk needs: publish - runs-on: #{{ .Config.runner.default }}# + runs-on: #{{ .Config.Runner.Default }}# steps: - name: Checkout Repo - uses: #{{ .Config.actionVersions.checkout }}# + uses: #{{ .Config.ActionVersions.Checkout }}# with: - #{{- if .Config.checkoutSubmodules }}# - submodules: #{{ .Config.checkoutSubmodules }}# + #{{- if .Config.CheckoutSubmodules }}# + submodules: #{{ .Config.CheckoutSubmodules }}# #{{- end }}# # Persist credentials so we can push back to the repo persist-credentials: true - name: Setup tools uses: ./.github/actions/setup-tools with: - tools: pulumictl, pulumicli, #{{ range $index, $element := .Config.languages }}##{{if $index}}#, #{{end}}##{{ $element }}##{{end}}# + tools: pulumictl, pulumicli, #{{ range $index, $element := .Config.Languages }}##{{if $index}}#, #{{end}}##{{ $element }}##{{end}}# - name: Publish SDKs uses: pulumi/pulumi-package-publisher@v0.0.20 with: - sdk: #{{ .Config.publish.sdk }}# + sdk: #{{ .Config.Publish.SDK }}# version: ${{ inputs.version }} - name: Download Go SDK uses: ./.github/actions/download-sdk @@ -137,13 +137,13 @@ jobs: go/** !*.tar.gz -#{{- if .Config.publishRegistry }}# +#{{- if .Config.PublishRegistry }}# create_docs_build: name: create_docs_build needs: publish_sdk # Only run for non-prerelease, if the publish_go_sdk job was successful or skipped if: inputs.isPrerelease == false - runs-on: #{{ .Config.runner.default }}# + runs-on: #{{ .Config.Runner.Default }}# steps: - name: Dispatch Metadata build uses: peter-evans/repository-dispatch@v3 @@ -154,7 +154,7 @@ jobs: client-payload: |- { "project": "${{ github.repository }}", - "project-shortname": "#{{ .Config.provider }}#", + "project-shortname": "#{{ .Config.Provider }}#", "ref": "${{ github.ref_name }}" } #{{- end }}# @@ -163,15 +163,15 @@ jobs: name: Clean up release labels # Only run for non-prerelease, if the publish_go_sdk job was successful or skipped if: inputs.isPrerelease == false - #{{ if .Config.publishRegistry -}}# + #{{ if .Config.PublishRegistry -}}# needs: create_docs_build #{{ else }}# needs: publish_sdk #{{- end }}# - runs-on: #{{ .Config.runner.default }}# + runs-on: #{{ .Config.Runner.Default }}# steps: - name: Checkout Repo - uses: #{{ .Config.actionVersions.checkout }}# + uses: #{{ .Config.ActionVersions.Checkout }}# with: persist-credentials: false - name: Clean up release labels diff --git a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/release.yml b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/release.yml index 692ec8db9d..86c1d60431 100644 --- a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/release.yml +++ b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/release.yml @@ -5,12 +5,12 @@ on: tags: - v*.*.* - "!v*.*.*-**" -#{{- if .Config.testMasterAndReleaseWorkflows }}# +#{{- if .Config.TestMasterAndReleaseWorkflows }}# pull_request: #{{ end }}# env: -#{{ .Config.env | toYaml | indent 2 }}# +#{{ .Config.Env | toYaml | indent 2 }}# jobs: prerequisites: uses: ./.github/workflows/prerequisites.yml @@ -35,7 +35,7 @@ jobs: with: version: ${{ needs.prerequisites.outputs.version }} - #{{ if .Config.lint -}}# + #{{ if .Config.Lint -}}# lint: name: lint uses: ./.github/workflows/lint.yml @@ -57,7 +57,7 @@ jobs: - build_provider - test - license_check - #{{- range $action, $_ := .Config.extraTests }}# + #{{- range $action, $_ := .Config.ExtraTests }}# - #{{ $action }}# #{{- end }}# uses: ./.github/workflows/publish.yml @@ -74,24 +74,24 @@ jobs: permissions: contents: read id-token: write - runs-on: #{{ if .Config.runner.buildSdk }}##{{- .Config.runner.buildSdk }}##{{ else }}##{{- .Config.runner.default }}##{{ end }}# + runs-on: #{{ if .Config.Runner.BuildSDK }}##{{- .Config.Runner.BuildSDK }}##{{ else }}##{{- .Config.Runner.Default }}##{{ end }}# env: PROVIDER_VERSION: ${{ needs.prerequisites.outputs.version }} steps: -#{{- if .Config.freeDiskSpaceBeforeTest }}# +#{{- if .Config.FreeDiskSpaceBeforeTest }}# # Run as first step so we don't delete things that have just been installed - name: Free Disk Space (Ubuntu) - uses: #{{ .Config.actionVersions.freeDiskSpace }}# + uses: #{{ .Config.ActionVersions.FreeDiskSpace }}# with: tool-cache: false swap-storage: false dotnet: false #{{- end }}# - name: Checkout Repo - uses: #{{ .Config.actionVersions.checkout }}# + uses: #{{ .Config.ActionVersions.Checkout }}# with: - #{{- if .Config.checkoutSubmodules }}# - submodules: #{{ .Config.checkoutSubmodules }}# + #{{- if .Config.CheckoutSubmodules }}# + submodules: #{{ .Config.CheckoutSubmodules }}# #{{- end }}# persist-credentials: false - name: Setup tools @@ -114,24 +114,24 @@ jobs: run: |- pip3 install virtualenv==20.0.23 pip3 install pipenv - #{{- if .Config.docker }}# + #{{- if .Config.Docker }}# - name: Run docker compose run: docker compose -f testing/docker-compose.yml up --build -d #{{- end }}# - #{{- if .Config.aws }}# + #{{- if .Config.AWS }}# - name: Configure AWS Credentials - uses: #{{ .Config.actionVersions.configureAwsCredentials }}# + uses: #{{ .Config.ActionVersions.ConfigureAwsCredentials }}# with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-region: ${{ env.AWS_REGION }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} role-duration-seconds: 7200 - role-session-name: #{{ .Config.provider }}#@githubActions + role-session-name: #{{ .Config.Provider }}#@githubActions role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }} #{{- end }}# - #{{- if .Config.gcp }}# + #{{- if .Config.GCP }}# - name: Authenticate to Google Cloud - uses: #{{ .Config.actionVersions.googleAuth }}# + uses: #{{ .Config.ActionVersions.GoogleAuth }}# with: service_account: ${{ env.GOOGLE_CI_SERVICE_ACCOUNT_EMAIL }} workload_identity_provider: projects/${{ env.GOOGLE_PROJECT_NUMBER @@ -139,27 +139,27 @@ jobs: env.GOOGLE_CI_WORKLOAD_IDENTITY_POOL }}/providers/${{ env.GOOGLE_CI_WORKLOAD_IDENTITY_PROVIDER }} - name: Setup gcloud auth - uses: #{{ .Config.actionVersions.setupGcloud }}# + uses: #{{ .Config.ActionVersions.SetupGcloud }}# with: install_components: gke-gcloud-auth-plugin #{{- end }}# - #{{- if .Config.gcpRegistry }}# + #{{- if .Config.GCPRegistry }}# - name: Login to Google Cloud Registry run: gcloud --quiet auth configure-docker #{{- end }}# - #{{- if .Config.sshPrivateKey }}# + #{{- if .Config.SSHPrivateKey }}# - name: Setup SSH key uses: webfactory/ssh-agent@v0.7.0 with: - ssh-private-key: #{{ .Config.sshPrivateKey }}# + ssh-private-key: #{{ .Config.SSHPrivateKey }}# #{{- end }}# - #{{- if .Config.integrationTestProvider }}# + #{{- if .Config.IntegrationTestProvider }}# - name: Prepare upstream code run: make upstream #{{- end }}# - #{{- if index .Config "setup-script" }}# + #{{- if index .Config.SetupScript }}# - name: Run setup script - run: #{{ index .Config "setup-script" }}# + run: #{{ index .Config.SetupScript }}# #{{- end }}# - name: Install dependencies run: make install_${{ matrix.language}}_sdk @@ -168,10 +168,10 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} version: v2.5.0 -#{{- if .Config.actions.preTest }}# -#{{ .Config.actions.preTest | toYaml | indent 4 }}# +#{{- if .Config.Actions.PreTest }}# +#{{ .Config.Actions.PreTest | toYaml | indent 4 }}# #{{- end }}# - #{{- if .Config.integrationTestProvider }}# + #{{- if .Config.IntegrationTestProvider }}# - name: Run provider tests working-directory: provider run: go test -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -parallel 4 . @@ -182,7 +182,7 @@ jobs: fail-fast: false matrix: language: -#{{ .Config.languages | toYaml | indent 8 }}# -#{{- if .Config.extraTests }}# -#{{ .Config.extraTests | toYaml | indent 2 }}# +#{{ .Config.Languages | toYaml | indent 8 }}# +#{{- if .Config.ExtraTests }}# +#{{ .Config.ExtraTests | toYaml | indent 2 }}# #{{ end }}# diff --git a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/resync-build.yml b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/resync-build.yml index 98660808fa..12fd774cba 100644 --- a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/resync-build.yml +++ b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/resync-build.yml @@ -1,24 +1,24 @@ # WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi/ci-mgmt env: - PULUMI_EXTRA_MAPPING_ERROR: #{{ index .Config "fail-on-extra-mapping" }}# - PULUMI_MISSING_MAPPING_ERROR: #{{ index .Config "fail-on-missing-mapping" }}# -#{{ .Config.env | toYaml | indent 2 }}# + PULUMI_EXTRA_MAPPING_ERROR: #{{ .Config.FailOnExtraMapping }}# + PULUMI_MISSING_MAPPING_ERROR: #{{ .Config.FailOnMissingMapping }}# +#{{ .Config.Env | toYaml | indent 2 }}# jobs: resync_build: name: resync-build - runs-on: #{{ .Config.runner.default }}# + runs-on: #{{ .Config.Runner.Default }}# steps: - name: Checkout Repo - uses: #{{ .Config.actionVersions.checkout }}# + uses: #{{ .Config.ActionVersions.Checkout }}# with: - #{{- if .Config.checkoutSubmodules }}# - submodules: #{{ .Config.checkoutSubmodules }}# + #{{- if .Config.CheckoutSubmodules }}# + submodules: #{{ .Config.CheckoutSubmodules }}# #{{- end }}# # Persist credentials so we can push a new branch. persist-credentials: true - name: Checkout repo - uses: #{{ .Config.actionVersions.checkout }}# + uses: #{{ .Config.ActionVersions.Checkout }}# with: path: ci-mgmt repository: pulumi/ci-mgmt @@ -56,15 +56,15 @@ jobs: uses: peter-evans/create-pull-request@v3.12.0 with: author: pulumi-bot - base: #{{ .Config.providerDefaultBranch }}# + base: #{{ .Config.ProviderDefaultBranch }}# body: This pull request was generated automatically by the resync-build workflow in this repository. branch: pulumi-bot/resync-${{ github.run_id}} - commit-message: Resync build for pulumi-#{{ .Config.provider }}# + commit-message: Resync build for pulumi-#{{ .Config.Provider }}# committer: pulumi-bot labels: impact/no-changelog-required team-reviewers: platform-integrations - title: Fix up build for pulumi-#{{ .Config.provider }}# + title: Fix up build for pulumi-#{{ .Config.Provider }}# token: ${{ secrets.PULUMI_BOT_TOKEN }} name: Resync build on: diff --git a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/run-acceptance-tests.yml b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/run-acceptance-tests.yml index 7992cf39ed..0b80142579 100644 --- a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/run-acceptance-tests.yml +++ b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/run-acceptance-tests.yml @@ -12,7 +12,7 @@ on: env: PR_COMMIT_SHA: ${{ github.event.client_payload.pull_request.head.sha }} -#{{ .Config.env | toYaml | indent 2 }}# +#{{ .Config.Env | toYaml | indent 2 }}# # This should cancel any previous runs of the same workflow on the same branch which are still running. concurrency: @@ -54,7 +54,7 @@ jobs: name: comment-notification permissions: pull-requests: write - runs-on: #{{ .Config.runner.default }}# + runs-on: #{{ .Config.Runner.Default }}# steps: - id: run-url name: Create URL to the run output @@ -66,7 +66,7 @@ jobs: issue-number: ${{ github.event.client_payload.github.payload.issue.number }} repository: ${{ github.event.client_payload.github.payload.repository.full_name }} token: ${{ secrets.GITHUB_TOKEN }} - #{{ if .Config.lint -}}# + #{{ if .Config.Lint -}}# lint: if: github.event_name == 'repository_dispatch' || github.event.pull_request.head.repo.full_name == github.repository @@ -85,13 +85,13 @@ jobs: - test - build_provider - license_check - #{{- if .Config.lint }}# + #{{- if .Config.Lint }}# - lint #{{- end }}# - #{{- range $action, $_ := .Config.extraTests }}# + #{{- range $action, $_ := .Config.ExtraTests }}# - #{{ $action }}# #{{- end }}# - runs-on: #{{ .Config.runner.default }}# + runs-on: #{{ .Config.Runner.Default }}# steps: - uses: guibranco/github-status-action-v2@0849440ec82c5fa69b2377725b9b7852a3977e76 with: @@ -115,30 +115,30 @@ jobs: permissions: contents: read id-token: write - runs-on: #{{ if .Config.runner.buildSdk }}##{{- .Config.runner.buildSdk }}##{{ else }}##{{- .Config.runner.default }}##{{ end }}# + runs-on: #{{ if .Config.Runner.BuildSDK }}##{{- .Config.Runner.BuildSdk }}##{{ else }}##{{- .Config.Runner.Default }}##{{ end }}# env: PROVIDER_VERSION: ${{ needs.prerequisites.outputs.version }} steps: -#{{- if .Config.freeDiskSpaceBeforeTest }}# +#{{- if .Config.FreeDiskSpaceBeforeTest }}# # Run as first step so we don't delete things that have just been installed - name: Free Disk Space (Ubuntu) - uses: #{{ .Config.actionVersions.freeDiskSpace }}# + uses: #{{ .Config.ActionVersions.FreeDiskSpace }}# with: tool-cache: false swap-storage: false dotnet: false #{{- end }}# - name: Checkout Repo - uses: #{{ .Config.actionVersions.checkout }}# + uses: #{{ .Config.ActionVersions.Checkout }}# with: ref: ${{ env.PR_COMMIT_SHA }} - #{{- if .Config.checkoutSubmodules }}# - submodules: #{{ .Config.checkoutSubmodules }}# + #{{- if .Config.CheckoutSubmodules }}# + submodules: #{{ .Config.CheckoutSubmodules }}# #{{- end }}# persist-credentials: false - name: Checkout p/examples if: matrix.testTarget == 'pulumiExamples' - uses: #{{ .Config.actionVersions.checkout }}# + uses: #{{ .Config.ActionVersions.Checkout }}# with: repository: pulumi/examples path: p-examples @@ -162,24 +162,24 @@ jobs: run: |- pip3 install virtualenv==20.0.23 pip3 install pipenv - #{{- if .Config.docker }}# + #{{- if .Config.Docker }}# - name: Run docker compose run: docker compose -f testing/docker-compose.yml up --build -d #{{- end }}# - #{{- if .Config.aws }}# + #{{- if .Config.AWS }}# - name: Configure AWS Credentials - uses: #{{ .Config.actionVersions.configureAwsCredentials }}# + uses: #{{ .Config.ActionVersions.ConfigureAwsCredentials }}# with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-region: ${{ env.AWS_REGION }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} role-duration-seconds: 7200 - role-session-name: #{{ .Config.provider }}#@githubActions + role-session-name: #{{ .Config.Provider }}#@githubActions role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }} #{{- end }}# - #{{- if .Config.gcp }}# + #{{- if .Config.GCP }}# - name: Authenticate to Google Cloud - uses: #{{ .Config.actionVersions.googleAuth }}# + uses: #{{ .Config.ActionVersions.GoogleAuth }}# with: service_account: ${{ env.GOOGLE_CI_SERVICE_ACCOUNT_EMAIL }} workload_identity_provider: projects/${{ env.GOOGLE_PROJECT_NUMBER @@ -187,27 +187,27 @@ jobs: env.GOOGLE_CI_WORKLOAD_IDENTITY_POOL }}/providers/${{ env.GOOGLE_CI_WORKLOAD_IDENTITY_PROVIDER }} - name: Setup gcloud auth - uses: #{{ .Config.actionVersions.setupGcloud }}# + uses: #{{ .Config.ActionVersions.SetupGcloud }}# with: install_components: gke-gcloud-auth-plugin #{{- end }}# - #{{- if .Config.gcpRegistry }}# + #{{- if .Config.GCPRegistry }}# - name: Login to Google Cloud Registry run: gcloud --quiet auth configure-docker #{{- end }}# - #{{- if .Config.sshPrivateKey }}# + #{{- if .Config.SSHPrivateKey }}# - name: Setup SSH key uses: webfactory/ssh-agent@v0.7.0 with: - ssh-private-key: #{{ .Config.sshPrivateKey }}# + ssh-private-key: #{{ .Config.SSHPrivateKey }}# #{{- end }}# - #{{- if .Config.integrationTestProvider }}# + #{{- if .Config.IntegrationTestProvider }}# - name: Prepare upstream code run: make upstream #{{- end }}# - #{{- if index .Config "setup-script" }}# + #{{- if index .Config.SetupScript }}# - name: Run setup script - run: #{{ index .Config "setup-script" }}# + run: #{{ index .Config.setupScript }}# #{{- end }}# - name: Install dependencies run: make install_${{ matrix.language}}_sdk @@ -216,10 +216,10 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} version: v2.5.0 -#{{- if .Config.actions.preTest }}# -#{{ .Config.actions.preTest | toYaml | indent 4 }}# +#{{- if .Config.Actions.PreTest }}# +#{{ .Config.Actions.PreTest | toYaml | indent 4 }}# #{{- end }}# - #{{- if .Config.integrationTestProvider }}# + #{{- if .Config.IntegrationTestProvider }}# - name: Run provider tests if: matrix.testTarget == 'local' working-directory: provider @@ -235,8 +235,8 @@ jobs: fail-fast: false matrix: language: -#{{ .Config.languages | toYaml | indent 8 }}# - #{{- if .Config.testPulumiExamples }}# +#{{ .Config.Languages | toYaml | indent 8 }}# + #{{- if .Config.TestPulumiExamples }}# testTarget: [local, pulumiExamples] #{{- else }}# testTarget: [local] @@ -245,6 +245,6 @@ jobs: name: License Check uses: ./.github/workflows/license.yml secrets: inherit -#{{- if .Config.extraTests }}# -#{{ .Config.extraTests | toYaml | indent 2 }}# +#{{- if .Config.ExtraTests }}# +#{{ .Config.ExtraTests | toYaml | indent 2 }}# #{{ end }}# diff --git a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/upgrade-bridge.yml b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/upgrade-bridge.yml index 23c9e017cc..e9f748437e 100644 --- a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/upgrade-bridge.yml +++ b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/upgrade-bridge.yml @@ -55,31 +55,31 @@ env: jobs: upgrade_provider: name: upgrade-provider - runs-on: #{{ if .Config.runner.buildSdk }}##{{- .Config.runner.buildSdk }}##{{ else }}##{{- .Config.runner.default }}##{{ end }}# + runs-on: #{{ if .Config.Runner.BuildSDK }}##{{- .Config.Runner.BuildSDK }}##{{ else }}##{{- .Config.Runner.Default }}##{{ end }}# steps: - #{{- if .Config.freeDiskSpaceBeforeBuild }}# + #{{- if .Config.FreeDiskSpaceBeforeBuild }}# # Run as first step so we don't delete things that have just been installed - name: Free Disk Space (Ubuntu) - uses: #{{ .Config.actionVersions.freeDiskSpace }}# + uses: #{{ .Config.ActionVersions.FreeDiskSpace }}# with: tool-cache: false swap-storage: false dotnet: false #{{- end }}# - name: Checkout Repo - uses: #{{ .Config.actionVersions.checkout }}# + uses: #{{ .Config.ActionVersions.Checkout }}# with: - #{{- if .Config.checkoutSubmodules }}# - submodules: #{{ .Config.checkoutSubmodules }}# + #{{- if .Config.CheckoutSubmodules }}# + submodules: #{{ .Config.CheckoutSubmodules }}# #{{- end }}# persist-credentials: false - name: Setup tools uses: ./.github/actions/setup-tools with: - tools: pulumictl, pulumicli, #{{ range $index, $element := .Config.languages }}##{{if $index}}#, #{{end}}##{{ $element }}##{{end}}# + tools: pulumictl, pulumicli, #{{ range $index, $element := .Config.Languages }}##{{if $index}}#, #{{end}}##{{ $element }}##{{end}}# - name: Call upgrade provider action if: github.event_name == 'workflow_dispatch' - uses: #{{ .Config.actionVersions.upgradeProviderAction }}# + uses: #{{ .Config.ActionVersions.UpgradeProviderAction }}# with: kind: ${{ inputs.kind }} email: bot@pulumi.com @@ -87,15 +87,15 @@ jobs: automerge: ${{ inputs.automerge }} target-bridge-version: ${{ inputs.target-bridge-version }} target-pulumi-version: ${{ inputs.target-pulumi-version }} - #{{- if .Config.javaGenVersion }}# - target-java-version: #{{ .Config.javaGenVersion }}# + #{{- if .Config.JavaGenVersion }}# + target-java-version: #{{ .Config.JavaGenVersion }}# #{{- end }}# pr-reviewers: ${{ inputs.pr-reviewers }} pr-description: ${{ inputs.pr-description }} pr-title-prefix: ${{ inputs.pr-title-prefix }} - name: Call upgrade provider action if: github.event_name == 'repository_dispatch' - uses: #{{ .Config.actionVersions.upgradeProviderAction }}# + uses: #{{ .Config.ActionVersions.UpgradeProviderAction }}# with: kind: ${{ github.event.client_payload.kind || 'bridge' }} email: bot@pulumi.com diff --git a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/upgrade-provider.yml b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/upgrade-provider.yml index 8467a720fa..63adbcf815 100644 --- a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/upgrade-provider.yml +++ b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/upgrade-provider.yml @@ -1,4 +1,4 @@ -#{{ if .Config.checkUpstreamUpgrade -}}# +#{{ if .Config.CheckUpstreamUpgrade -}}# # WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi/ci-mgmt name: Upgrade provider @@ -29,29 +29,29 @@ env: jobs: upgrade_provider: name: upgrade-provider - runs-on: #{{ .Config.runner.default }}# + runs-on: #{{ .Config.Runner.Default }}# steps: - #{{- if .Config.freeDiskSpaceBeforeBuild }}# + #{{- if .Config.FreeDiskSpaceBeforeBuild }}# # Run as first step so we don't delete things that have just been installed - name: Free Disk Space (Ubuntu) - uses: #{{ .Config.actionVersions.freeDiskSpace }}# + uses: #{{ .Config.ActionVersions.FreeDiskSpace }}# with: tool-cache: false swap-storage: false dotnet: false #{{- end }}# - name: Checkout Repo - uses: #{{ .Config.actionVersions.checkout }}# + uses: #{{ .Config.ActionVersions.Checkout }}# with: - #{{- if .Config.checkoutSubmodules }}# - submodules: #{{ .Config.checkoutSubmodules }}# + #{{- if .Config.CheckoutSubmodules }}# + submodules: #{{ .Config.CheckoutSubmodules }}# #{{- end }}# # Persist credentials so upgrade-provider can push a new branch. persist-credentials: true - name: Setup tools uses: ./.github/actions/setup-tools with: - tools: pulumictl, pulumicli, #{{ range $index, $element := .Config.languages }}##{{if $index}}#, #{{end}}##{{ $element }}##{{end}}# + tools: pulumictl, pulumicli, #{{ range $index, $element := .Config.Languages }}##{{if $index}}#, #{{end}}##{{ $element }}##{{end}}# - name: Install upgrade-provider run: go install github.com/pulumi/upgrade-provider@${{ inputs.upgradeProviderVersion || 'main' }} shell: bash @@ -80,7 +80,7 @@ jobs: if: steps.target_version.outputs.version != '' # Don't mark the build as failed if we can't auto-open a PR as we've already opened the upgrade issue for tracking continue-on-error: true - run: upgrade-provider "${{ github.repository }}" --kind="all" --target-version="${{ steps.target_version.outputs.version }}" #{{ if .Config.javaGenVersion }}#--java-version="#{{ .Config.javaGenVersion }}#"#{{ end }}# + run: upgrade-provider "${{ github.repository }}" --kind="all" --target-version="${{ steps.target_version.outputs.version }}" #{{ if .Config.JavaGenVersion }}#--java-version="#{{ .Config.JavaGenVersion }}#"#{{ end }}# shell: bash - name: Comment on upgrade issue if automated PR failed if: steps.upgrade_provider.outcome == 'failure' diff --git a/provider-ci/internal/pkg/templates/bridged-provider/Makefile b/provider-ci/internal/pkg/templates/bridged-provider/Makefile index cf3bd33912..9179933d98 100644 --- a/provider-ci/internal/pkg/templates/bridged-provider/Makefile +++ b/provider-ci/internal/pkg/templates/bridged-provider/Makefile @@ -1,10 +1,10 @@ # WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi/ci-mgmt -PACK := #{{ .Config.provider }}# -ORG := #{{ .Config.organization }}# +PACK := #{{ .Config.Provider }}# +ORG := #{{ .Config.Organization }}# PROJECT := github.com/$(ORG)/pulumi-$(PACK) -#{{- if ge (index .Config "major-version") 2 }}# -PROVIDER_PATH := provider/v#{{ index .Config "major-version" }}# +#{{- if ge .Config.MajorVersion 2 }}# +PROVIDER_PATH := provider/v#{{ .Config.MajorVersion }}# #{{- else }}# PROVIDER_PATH := provider #{{- end }}# @@ -14,12 +14,12 @@ PROVIDER := pulumi-resource-$(PACK) JAVA_GEN := pulumi-java-gen TESTPARALLELISM := 10 WORKING_DIR := $(shell pwd) -#{{- if .Config.goBuildParallelism }}# -PULUMI_PROVIDER_BUILD_PARALLELISM ?= -p #{{ .Config.goBuildParallelism }}# +#{{- if .Config.GoBuildParallelism }}# +PULUMI_PROVIDER_BUILD_PARALLELISM ?= -p #{{ .Config.GoBuildParallelism }}# #{{- else }}# PULUMI_PROVIDER_BUILD_PARALLELISM ?= #{{- end }}# -#{{- if .Config.pulumiConvert }}# +#{{- if .Config.PulumiConvert }}# PULUMI_CONVERT := 1 #{{- else }}# PULUMI_CONVERT := 0 @@ -28,26 +28,26 @@ PULUMI_MISSING_DOCS_ERROR := true # Override during CI using `make [TARGET] PROVIDER_VERSION=""` or by setting a PROVIDER_VERSION environment variable # Local & branch builds will just used this fixed default version unless specified -PROVIDER_VERSION ?= #{{ index .Config "major-version" }}#.0.0-alpha.0+dev +PROVIDER_VERSION ?= #{{ .Config.MajorVersion }}#.0.0-alpha.0+dev # Use this normalised version everywhere rather than the raw input to ensure consistency. VERSION_GENERIC = $(shell pulumictl convert-version --language generic --version "$(PROVIDER_VERSION)") # Strips debug information from the provider binary to reduce its size and speed up builds LDFLAGS_STRIP_SYMBOLS=-s -w -LDFLAGS_PROJ_VERSION=-X $(PROJECT)/$(VERSION_PATH)=$(VERSION_GENERIC)#{{if .Config.providerVersion}}# -X #{{ .Config.providerVersion }}#=$(VERSION_GENERIC)#{{end}}# -#{{- if .Config.providerVersion }}# -LDFLAGS_UPSTREAM_VERSION=-X #{{ .Config.providerVersion }}#=v$(VERSION_GENERIC) +LDFLAGS_PROJ_VERSION=-X $(PROJECT)/$(VERSION_PATH)=$(VERSION_GENERIC)#{{if .Config.ProviderVersion}}# -X #{{ .Config.ProviderVersion }}#=$(VERSION_GENERIC)#{{end}}# +#{{- if .Config.ProviderVersion }}# +LDFLAGS_UPSTREAM_VERSION=-X #{{ .Config.ProviderVersion }}#=v$(VERSION_GENERIC) #{{- else }}# LDFLAGS_UPSTREAM_VERSION= #{{- end }}# -LDFLAGS_EXTRAS=#{{- range (index .Config "extra-ld-flags") }}# #{{ . }}# #{{- end }}# +LDFLAGS_EXTRAS=#{{- range .Config.ExtraLDFlags }}# #{{ . }}# #{{- end }}# LDFLAGS=$(LDFLAGS_PROJ_VERSION) $(LDFLAGS_UPSTREAM_VERSION) $(LDFLAGS_EXTRAS) $(LDFLAGS_STRIP_SYMBOLS) development: install_plugins provider build_sdks install_sdks build: install_plugins provider build_sdks install_sdks -build_sdks: #{{ range .Config.languages }}#build_#{{ . }}# #{{ end }}##{{- if .Config.registryDocs }}#build_registry_docs#{{- end }}# +build_sdks: #{{ range .Config.Languages }}#build_#{{ . }}# #{{ end }}##{{- if .Config.RegistryDocs }}#build_registry_docs#{{- end }}# install_go_sdk: @@ -113,7 +113,7 @@ build_python: upstream ./venv/bin/python -m pip install build==1.2.1 && \ cd ./bin && \ ../venv/bin/python -m build . -#{{- if .Config.registryDocs }}# +#{{- if .Config.RegistryDocs }}# # Run the bridge's registry-docs command to generated the content of the installation docs/ folder at provider repo root build_registry_docs: @@ -127,10 +127,10 @@ cleanup: rm -r $(WORKING_DIR)/bin rm -f provider/cmd/$(PROVIDER)/schema.go -#{{- if .Config.docsCmd }}# +#{{- if .Config.DocsCmd }}# docs: - #{{ .Config.docsCmd }}# + #{{ .Config.DocsCmd }}# #{{- end }}# help: @@ -148,8 +148,8 @@ install_nodejs_sdk: install_plugins: export PULUMI_HOME := $(WORKING_DIR)/.pulumi install_plugins: export PATH := $(WORKING_DIR)/.pulumi/bin:$(PATH) install_plugins: .pulumi/bin/pulumi - #{{- range .Config.plugins }}# - .pulumi/bin/pulumi plugin install #{{ or .kind "resource" }}# #{{ .name }}# #{{ .version }}# + #{{- range .Config.Plugins }}# + .pulumi/bin/pulumi plugin install #{{ or .Kind "resource" }}# #{{ .Name }}# #{{ .Version }}# #{{- end }}# lint_provider: provider @@ -161,7 +161,7 @@ lint_provider.fix: cd provider && golangci-lint run --path-prefix provider -c ../.golangci.yml --fix # `make provider_no_deps` builds the provider binary directly, without ensuring that -# `cmd/pulumi-resource-#{{ .Config.provider }}#/schema.json` is valid and up to date. +# `cmd/pulumi-resource-#{{ .Config.Provider }}#/schema.json` is valid and up to date. # To create a release ready binary, you should use `make provider`. provider_no_deps: (cd provider && go build $(PULUMI_PROVIDER_BUILD_PARALLELISM) -o $(WORKING_DIR)/bin/$(PROVIDER) -ldflags "$(LDFLAGS)" $(PROJECT)/$(PROVIDER_PATH)/cmd/$(PROVIDER)) @@ -178,7 +178,7 @@ test_provider: @echo "" cd provider && go test -v -short ./... -parallel $(TESTPARALLELISM) -tfgen: install_plugins upstream#{{ if .Config.docsCmd }}# docs#{{ end }}# tfgen_no_deps +tfgen: install_plugins upstream#{{ if .Config.DocsCmd }}# docs#{{ end }}# tfgen_no_deps tfgen_no_deps: export PULUMI_HOME := $(WORKING_DIR)/.pulumi tfgen_no_deps: export PATH := $(WORKING_DIR)/.pulumi/bin:$(PATH) @@ -241,7 +241,7 @@ ci-mgmt: .ci-mgmt.yaml debug_tfgen: dlv --listen=:2345 --headless=true --api-version=2 exec $(WORKING_DIR)/bin/$(TFGEN) -- schema --out provider/cmd/$(PROVIDER) -.PHONY: development build build_sdks install_go_sdk install_java_sdk install_python_sdk install_sdks only_build build_dotnet build_go build_java build_nodejs build_python clean cleanup#{{ if .Config.docsCmd }}# docs#{{end}}# help install_dotnet_sdk install_nodejs_sdk install_plugins lint_provider provider provider_no_deps test tfgen upstream ci-mgmt test_provider debug_tfgen tfgen_build_only +.PHONY: development build build_sdks install_go_sdk install_java_sdk install_python_sdk install_sdks only_build build_dotnet build_go build_java build_nodejs build_python clean cleanup#{{ if .Config.DocsCmd }}# docs#{{end}}# help install_dotnet_sdk install_nodejs_sdk install_plugins lint_provider provider provider_no_deps test tfgen upstream ci-mgmt test_provider debug_tfgen tfgen_build_only # Provider cross-platform build & packaging diff --git a/provider-ci/internal/pkg/templates/defaults.config.yaml b/provider-ci/internal/pkg/templates/defaults.config.yaml index 8c12d2baee..945e1c7f41 100644 --- a/provider-ci/internal/pkg/templates/defaults.config.yaml +++ b/provider-ci/internal/pkg/templates/defaults.config.yaml @@ -44,7 +44,7 @@ lint: true # Currently set in around 17 repos: https://github.com/search?q=org%3Apulumi+path%3A.ci-mgmt.yaml+%22providerDefaultBranch%3A%22&type=code providerDefaultBranch: master -# Sets PULUMI_MISSING_MAPPING_ERROR and PULUMI_EXTRA_MAPPING_ERROR in resync-build +# Sets PULUMI_MISSING_MAPPING_ERROR in resync-build # Used in alicloud only: https://github.com/search?q=org%3Apulumi+path%3A.ci-mgmt.yaml+%22fail-on-missing-mapping%3A%22&type=code fail-on-missing-mapping: true # Not used: https://github.com/search?q=org%3Apulumi+path%3A.ci-mgmt.yaml+%22fail-on-extra-mapping%3A%22&type=code @@ -127,7 +127,8 @@ env: # actions can contain preBuild and preTest additional steps to be spliced into workflows. # The use of these hooks vary - quite a few just build upstream and run provider tests. # Usage: https://github.com/search?q=org%3Apulumi+path%3A.ci-mgmt.yaml+%22actions%3A%22&type=code -actions: {} +actions: + {} # preBuild: # - Your action here # preTest: @@ -188,13 +189,12 @@ registryDocs: false # checkUpstreamUpgrade determines whether we run the upstream upgrade job for bridged providers. # Set to false for providers that cannot be upgraded, e.g. because of archived upstream or a license conflict. checkUpstreamUpgrade: true - # Set a path for each language example to enable the test # releaseVerification: - # nodejs: examples/simple-nodejs - # python: examples/simple-python - # dotnet: examples/simple-dotnet - # go: exampels/simple-go +# nodejs: examples/simple-nodejs +# python: examples/simple-python +# dotnet: examples/simple-dotnet +# go: exampels/simple-go # List of extra flags used in Makefile. # Only used by newrelic: https://github.com/search?q=org%3Apulumi+path%3A.ci-mgmt.yaml+%22extra-ld-flags%22&type=code @@ -245,12 +245,6 @@ checkUpstreamUpgrade: true # Used in 11 providers: https://github.com/search?q=org%3Apulumi+path%3A.ci-mgmt.yaml+%22generate-nightly-test-workflow%3A%22&type=code #generate-nightly-test-workflow: false -# List of objects with `name` and `version` properties for the devbox packages. -# Unused: https://github.com/search?q=org%3Apulumi+path%3A.ci-mgmt.yaml+%22nixpkgs%3A%22&type=code -#nixpkgs: -# - name: foo -# version: 1.2.3 - # Package paths to ignore when running the license check #license: # ignore: diff --git a/provider-ci/internal/pkg/templates/dev-container/devbox.json b/provider-ci/internal/pkg/templates/dev-container/devbox.json index 1d81d0eb7c..07d537a360 100644 --- a/provider-ci/internal/pkg/templates/dev-container/devbox.json +++ b/provider-ci/internal/pkg/templates/dev-container/devbox.json @@ -1,15 +1,12 @@ { "packages": [ - #{{- range .Config.nixpkgs }}# - "#{{ .name }}#@#{{ .version }}#", - #{{- end }}# "yarn@latest", "pulumictl@latest", - "go@#{{ trimAll "x" .Config.toolVersions.go }}#", - "nodejs@#{{ trimAll "x" .Config.toolVersions.nodejs }}#", - "python3@#{{ trimAll "x" .Config.toolVersions.python }}#", - "dotnet-sdk@#{{ trimAll "x" .Config.toolVersions.dotnet }}#", - "gradle_7@#{{ trimAll "x" .Config.toolVersions.gradle }}#", + "go@#{{ trimAll "x" .Config.ToolVersions.Go }}#", + "nodejs@#{{ trimAll "x" .Config.ToolVersions.Nodejs }}#", + "python3@#{{ trimAll "x" .Config.ToolVersions.Python }}#", + "dotnet-sdk@#{{ trimAll "x" .Config.ToolVersions.Dotnet }}#", + "gradle_7@#{{ trimAll "x" .Config.ToolVersions.Gradle }}#", "curl@8" ], "shell": { diff --git a/provider-ci/internal/pkg/templates/provider/.github/actions/download-sdk/action.yml b/provider-ci/internal/pkg/templates/provider/.github/actions/download-sdk/action.yml index 2da0e7ce25..5efd756b84 100644 --- a/provider-ci/internal/pkg/templates/provider/.github/actions/download-sdk/action.yml +++ b/provider-ci/internal/pkg/templates/provider/.github/actions/download-sdk/action.yml @@ -10,7 +10,7 @@ runs: using: "composite" steps: - name: Download ${{ inputs.language }} SDK - uses: #{{ .Config.actionVersions.downloadArtifact }}# + uses: #{{ .Config.ActionVersions.DownloadArtifact }}# with: name: ${{ inputs.language }}-sdk.tar.gz path: ${{ github.workspace}}/sdk/ diff --git a/provider-ci/internal/pkg/templates/provider/.github/actions/setup-tools/action.yml b/provider-ci/internal/pkg/templates/provider/.github/actions/setup-tools/action.yml index 2834b14520..6220433e3e 100644 --- a/provider-ci/internal/pkg/templates/provider/.github/actions/setup-tools/action.yml +++ b/provider-ci/internal/pkg/templates/provider/.github/actions/setup-tools/action.yml @@ -22,7 +22,7 @@ runs: if: inputs.tools == 'all' || contains(inputs.tools, 'go') uses: actions/setup-go@v5 with: - go-version: "#{{ .Config.toolVersions.go }}#" + go-version: "#{{ .Config.ToolVersions.Go }}#" cache-dependency-path: | provider/*.sum upstream/*.sum @@ -39,7 +39,7 @@ runs: if: inputs.tools == 'all' || contains(inputs.tools, 'pulumicli') uses: pulumi/actions@v5 with: - pulumi-version: "#{{ .Config.toolVersions.pulumi }}#" + pulumi-version: "#{{ .Config.ToolVersions.Pulumi }}#" - name: Install Schema Tools if: inputs.tools == 'all' || contains(inputs.tools, 'schema-tools') @@ -51,20 +51,20 @@ runs: if: inputs.tools == 'all' || contains(inputs.tools, 'nodejs') uses: actions/setup-node@v4 with: - node-version: #{{ .Config.toolVersions.nodejs }}# + node-version: #{{ .Config.ToolVersions.Nodejs }}# registry-url: https://registry.npmjs.org - name: Setup DotNet if: inputs.tools == 'all' || contains(inputs.tools, 'dotnet') uses: actions/setup-dotnet@v4 with: - dotnet-version: #{{ .Config.toolVersions.dotnet }}# + dotnet-version: #{{ .Config.ToolVersions.Dotnet }}# - name: Setup Python if: inputs.tools == 'all' || contains(inputs.tools, 'python') uses: actions/setup-python@v5 with: - python-version: #{{ .Config.toolVersions.python }}# + python-version: #{{ .Config.ToolVersions.Python }}# - name: Setup Java if: inputs.tools == 'all' || contains(inputs.tools, 'java') @@ -72,10 +72,10 @@ runs: with: cache: gradle distribution: temurin - java-version: #{{ .Config.toolVersions.java }}# + java-version: #{{ .Config.ToolVersions.Java }}# - name: Setup Gradle if: inputs.tools == 'all' || contains(inputs.tools, 'java') uses: gradle/gradle-build-action@v3 with: - gradle-version: #{{ .Config.toolVersions.gradle }}# + gradle-version: #{{ .Config.ToolVersions.Gradle }}# diff --git a/provider-ci/internal/pkg/templates/provider/.github/actions/upload-sdk/action.yml b/provider-ci/internal/pkg/templates/provider/.github/actions/upload-sdk/action.yml index cf3e05644b..e3299d2df3 100644 --- a/provider-ci/internal/pkg/templates/provider/.github/actions/upload-sdk/action.yml +++ b/provider-ci/internal/pkg/templates/provider/.github/actions/upload-sdk/action.yml @@ -13,7 +13,7 @@ runs: shell: bash run: tar -zcf sdk/${{ inputs.language }}.tar.gz -C sdk/${{ inputs.language }} . - name: Upload artifacts - uses: #{{ .Config.actionVersions.uploadArtifact }}# + uses: #{{ .Config.ActionVersions.UploadArtifact }}# with: name: ${{ inputs.language }}-sdk.tar.gz path: ${{ github.workspace}}/sdk/${{ inputs.language }}.tar.gz diff --git a/provider-ci/internal/pkg/templates/provider/.github/workflows/license.yml b/provider-ci/internal/pkg/templates/provider/.github/workflows/license.yml index 3a19ae2ac9..f86f4e53a6 100644 --- a/provider-ci/internal/pkg/templates/provider/.github/workflows/license.yml +++ b/provider-ci/internal/pkg/templates/provider/.github/workflows/license.yml @@ -7,15 +7,15 @@ on: inputs: {} env: -#{{ .Config.env | toYaml | indent 2 }}# +#{{ .Config.Env | toYaml | indent 2 }}# jobs: license_check: name: License Check - runs-on: #{{ .Config.runner.default }}# + runs-on: #{{ .Config.Runner.Default }}# steps: - name: Checkout Repo - uses: #{{ .Config.actionVersions.checkout }}# + uses: #{{ .Config.ActionVersions.Checkout }}# with: persist-credentials: false - name: Setup tools @@ -27,7 +27,7 @@ jobs: with: module-path: provider ignore-modules: >- - #{{ range $ignore := .Config.license.ignore }}# + #{{ range $ignore := .Config.License.Ignore }}# #{{- $ignore -}}#, #{{ end -}}# github.com/aead/chacha20, diff --git a/provider-ci/internal/pkg/templates/provider/.github/workflows/lint.yml b/provider-ci/internal/pkg/templates/provider/.github/workflows/lint.yml index 7a7312803d..06c5b3d38e 100644 --- a/provider-ci/internal/pkg/templates/provider/.github/workflows/lint.yml +++ b/provider-ci/internal/pkg/templates/provider/.github/workflows/lint.yml @@ -7,18 +7,18 @@ on: inputs: {} env: -#{{ .Config.env | toYaml | indent 2 }}# +#{{ .Config.Env | toYaml | indent 2 }}# jobs: lint: name: lint - runs-on: #{{ .Config.runner.default }}# + runs-on: #{{ .Config.Runner.Default }}# steps: - name: Checkout Repo - uses: #{{ .Config.actionVersions.checkout }}# + uses: #{{ .Config.ActionVersions.Checkout }}# with: - #{{- if .Config.checkoutSubmodules }}# - submodules: #{{ .Config.checkoutSubmodules }}# + #{{- if .Config.CheckoutSubmodules }}# + submodules: #{{ .Config.CheckoutSubmodules }}# #{{- end }}# persist-credentials: false - name: Install go diff --git a/provider-ci/internal/pkg/templates/provider/.github/workflows/pull-request.yml b/provider-ci/internal/pkg/templates/provider/.github/workflows/pull-request.yml index 155b76e938..3937ec7e4b 100644 --- a/provider-ci/internal/pkg/templates/provider/.github/workflows/pull-request.yml +++ b/provider-ci/internal/pkg/templates/provider/.github/workflows/pull-request.yml @@ -1,22 +1,22 @@ # WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi/ci-mgmt env: -#{{ .Config.env | toYaml | indent 2 }}# +#{{ .Config.Env | toYaml | indent 2 }}# jobs: comment-on-pr: if: github.event.pull_request.head.repo.full_name != github.repository name: comment-on-pr - runs-on: #{{ .Config.runner.default }}# + runs-on: #{{ .Config.Runner.Default }}# steps: - name: Checkout Repo - uses: #{{ .Config.actionVersions.checkout }}# + uses: #{{ .Config.ActionVersions.Checkout }}# with: - #{{- if .Config.checkoutSubmodules }}# - submodules: #{{ .Config.checkoutSubmodules }}# + #{{- if .Config.CheckoutSubmodules }}# + submodules: #{{ .Config.CheckoutSubmodules }}# #{{- end }}# persist-credentials: false - name: Comment PR - uses: #{{ .Config.actionVersions.prComment }}# + uses: #{{ .Config.ActionVersions.PrComment }}# with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} message: > diff --git a/provider-ci/internal/pkg/templates/provider/.github/workflows/verify-release.yml b/provider-ci/internal/pkg/templates/provider/.github/workflows/verify-release.yml index 1d84855c12..b9f370c4ac 100644 --- a/provider-ci/internal/pkg/templates/provider/.github/workflows/verify-release.yml +++ b/provider-ci/internal/pkg/templates/provider/.github/workflows/verify-release.yml @@ -34,12 +34,12 @@ on: default: false env: -#{{ .Config.env | toYaml | indent 2 }}# +#{{ .Config.Env | toYaml | indent 2 }}# jobs: verify-release: name: verify-release -#{{- if not .Config.releaseVerification }}# +#{{- if not .Config.ReleaseVerification }}# # We don't have any release verification configurations, so we never run this workflow. # Configure your .ci-mgmt.yaml files to include the release verification configurations e.g. # releaseVerification: @@ -51,7 +51,7 @@ jobs: #{{- end }}# strategy: matrix: -#{{- if .Config.releaseVerification }}# +#{{- if .Config.ReleaseVerification }}# # We always run on Linux and Windows, and optionally on MacOS. This is because MacOS runners have limited availability. # Expression expands to ["ubuntu-latest","windows-latest"] or ["ubuntu-latest","windows-latest","macos-latest"] # GitHub expressions don't have 'if' statements, so we use a ternary operator to conditionally include the MacOS runner suffix. @@ -64,47 +64,49 @@ jobs: runs-on: ${{ matrix.runner }} steps: - name: Checkout Repo - uses: #{{ .Config.actionVersions.checkout }}# + uses: #{{ .Config.ActionVersions.Checkout }}# with: persist-credentials: false - name: Setup tools uses: ./.github/actions/setup-tools with: - tools: pulumicli, #{{ range $index, $element := .Config.languages }}##{{if $index}}#, #{{end}}##{{ $element }}##{{end}}# -#{{- if .Config.releaseVerification.nodejs }}# + tools: pulumicli, #{{ range $index, $element := .Config.Languages }}##{{if $index}}#, #{{end}}##{{ $element }}##{{end}}# +#{{- if .Config.ReleaseVerification }}# +#{{- if .Config.ReleaseVerification.Nodejs }}# - name: Verify nodejs release uses: pulumi/verify-provider-release@v1 with: runtime: nodejs - directory: #{{ .Config.releaseVerification.nodejs }}# - provider: #{{ .Config.provider }}# + directory: #{{ .Config.ReleaseVerification.Nodejs }}# + provider: #{{ .Config.Provider }}# providerVersion: ${{ inputs.providerVersion }} #{{- end }}# -#{{- if .Config.releaseVerification.python }}# +#{{- if .Config.ReleaseVerification.Python }}# - name: Verify python release uses: pulumi/verify-provider-release@v1 with: runtime: python - directory: #{{ .Config.releaseVerification.python }}# - provider: #{{ .Config.provider }}# + directory: #{{ .Config.ReleaseVerification.Python }}# + provider: #{{ .Config.Provider }}# providerVersion: ${{ inputs.providerVersion }} #{{- end }}# -#{{- if .Config.releaseVerification.dotnet }}# +#{{- if .Config.ReleaseVerification.Dotnet }}# - name: Verify dotnet release uses: pulumi/verify-provider-release@v1 with: runtime: dotnet - directory: #{{ .Config.releaseVerification.dotnet }}# - provider: #{{ .Config.provider }}# + directory: #{{ .Config.ReleaseVerification.Dotnet }}# + provider: #{{ .Config.Provider }}# providerVersion: ${{ inputs.providerVersion }} #{{- end }}# -#{{- if .Config.releaseVerification.go }}# +#{{- if .Config.ReleaseVerification.Go }}# - name: Verify go release uses: pulumi/verify-provider-release@v1 if: inputs.skipGoSdk == false with: runtime: go - directory: #{{ .Config.releaseVerification.go }}# - provider: #{{ .Config.provider }}# + directory: #{{ .Config.ReleaseVerification.Go }}# + provider: #{{ .Config.Provider }}# providerVersion: ${{ inputs.providerVersion }} #{{- end }}# +#{{- end }}# diff --git a/provider-ci/internal/pkg/templates/provider/.golangci.yml b/provider-ci/internal/pkg/templates/provider/.golangci.yml index 810a530ff7..54be0dac52 100644 --- a/provider-ci/internal/pkg/templates/provider/.golangci.yml +++ b/provider-ci/internal/pkg/templates/provider/.golangci.yml @@ -31,5 +31,5 @@ linters-settings: - blank # Blank section: contains all blank imports. - default # Default section: contains all imports that could not be matched to another section type. - prefix(github.com/pulumi/) # Custom section: groups all imports with the github.com/pulumi/ prefix. - - prefix(github.com/#{{ .Config.organization }}#/pulumi-#{{ .Config.provider }}#) # Custom section: local imports + - prefix(github.com/#{{ .Config.Organization }}#/pulumi-#{{ .Config.Provider }}#) # Custom section: local imports custom-order: true diff --git a/provider-ci/internal/pkg/templates/pulumi-provider/.github/workflows/command-dispatch.yml b/provider-ci/internal/pkg/templates/pulumi-provider/.github/workflows/command-dispatch.yml index 807285b87e..4bde364821 100644 --- a/provider-ci/internal/pkg/templates/pulumi-provider/.github/workflows/command-dispatch.yml +++ b/provider-ci/internal/pkg/templates/pulumi-provider/.github/workflows/command-dispatch.yml @@ -1,17 +1,17 @@ # WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi/ci-mgmt env: -#{{ .Config.env | toYaml | indent 2 }}# +#{{ .Config.Env | toYaml | indent 2 }}# jobs: command-dispatch-for-testing: name: command-dispatch-for-testing - runs-on: #{{ .Config.runner.default }}# + runs-on: #{{ .Config.Runner.Default }}# steps: - name: Checkout Repo - uses: #{{ .Config.actionVersions.checkout }}# + uses: #{{ .Config.ActionVersions.Checkout }}# with: - #{{- if .Config.checkoutSubmodules }}# - submodules: #{{ .Config.checkoutSubmodules }}# + #{{- if .Config.CheckoutSubmodules }}# + submodules: #{{ .Config.CheckoutSubmodules }}# #{{- end }}# persist-credentials: false - uses: peter-evans/slash-command-dispatch@v4 diff --git a/provider-ci/internal/pkg/templates/pulumi-provider/.github/workflows/community-moderation.yml b/provider-ci/internal/pkg/templates/pulumi-provider/.github/workflows/community-moderation.yml index 923e75b624..9f9f9a8bc7 100644 --- a/provider-ci/internal/pkg/templates/pulumi-provider/.github/workflows/community-moderation.yml +++ b/provider-ci/internal/pkg/templates/pulumi-provider/.github/workflows/community-moderation.yml @@ -5,30 +5,30 @@ env: jobs: warn_codegen: name: warn_codegen - runs-on: #{{ .Config.runner.default }}# + runs-on: #{{ .Config.Runner.Default }}# steps: - name: Checkout Repo - uses: #{{ .Config.actionVersions.checkout }}# + uses: #{{ .Config.ActionVersions.Checkout }}# with: - #{{- if .Config.checkoutSubmodules }}# - submodules: #{{ .Config.checkoutSubmodules }}# + #{{- if .Config.CheckoutSubmodules }}# + submodules: #{{ .Config.CheckoutSubmodules }}# #{{- end }}# persist-credentials: false - id: schema_changed name: Check for diff in schema - uses: #{{ .Config.actionVersions.pathsFilter }}# + uses: #{{ .Config.ActionVersions.PathsFilter }}# with: filters: "changed: 'provider/cmd/**/schema.json'" - id: sdk_changed if: steps.schema_changed.outputs.changed == 'false' name: Check for diff in sdk/** - uses: #{{ .Config.actionVersions.pathsFilter }}# + uses: #{{ .Config.ActionVersions.PathsFilter }}# with: filters: "changed: 'sdk/**'" - if: steps.sdk_changed.outputs.changed == 'true' && github.event.pull_request.head.repo.full_name != github.repository name: Send codegen warning as comment on PR - uses: #{{ .Config.actionVersions.prComment }}# + uses: #{{ .Config.ActionVersions.PrComment }}# with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} message: > @@ -43,6 +43,6 @@ name: warn-codegen on: pull_request_target: branches: - - #{{ .Config.providerDefaultBranch }}# + - #{{ .Config.ProviderDefaultBranch }}# types: - opened diff --git a/provider-ci/internal/pkg/templates/pulumi-provider/.github/workflows/release_command.yml b/provider-ci/internal/pkg/templates/pulumi-provider/.github/workflows/release_command.yml index 5e6c6456b9..7fcd732d90 100644 --- a/provider-ci/internal/pkg/templates/pulumi-provider/.github/workflows/release_command.yml +++ b/provider-ci/internal/pkg/templates/pulumi-provider/.github/workflows/release_command.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Repo - uses: #{{ .Config.actionVersions.checkout }}# + uses: #{{ .Config.ActionVersions.Checkout }}# with: persist-credentials: false - name: Should release PR diff --git a/provider-ci/internal/pkg/templates/pulumi-provider/.upgrade-config.yml b/provider-ci/internal/pkg/templates/pulumi-provider/.upgrade-config.yml index 519dd4b906..720c8033b3 100644 --- a/provider-ci/internal/pkg/templates/pulumi-provider/.upgrade-config.yml +++ b/provider-ci/internal/pkg/templates/pulumi-provider/.upgrade-config.yml @@ -1,16 +1,16 @@ # WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi/ci-mgmt --- -#{{- if (index .Config "upstream-provider-repo") }}# -upstream-provider-name: #{{ index .Config "upstream-provider-repo" }}# +#{{- if .Config.UpstreamProviderRepo }}# +upstream-provider-name: #{{ .Config.UpstreamProviderRepo }}# #{{- else }}# -upstream-provider-name: terraform-provider-#{{ .Config.provider }}# +upstream-provider-name: terraform-provider-#{{ .Config.Provider }}# #{{- end }}# -#{{- if (index .Config "upstreamProviderOrg") }}# -upstream-provider-org: #{{ .Config.upstreamProviderOrg }}# +#{{- if .Config.UpstreamProviderOrg }}# +upstream-provider-org: #{{ .Config.UpstreamProviderOrg }}# #{{- end }}# pulumi-infer-version: true remove-plugins: true -#{{- if (index .Config "javaGenVersion") }}# -javaVersion: "#{{ .Config.javaGenVersion }}#" +#{{- if .Config.JavaGenVersion }}# +javaVersion: "#{{ .Config.JavaGenVersion }}#" #{{- end }}# diff --git a/provider-ci/test-providers/acme/.ci-mgmt.yaml b/provider-ci/test-providers/acme/.ci-mgmt.yaml index ad389d4d29..b424c12433 100644 --- a/provider-ci/test-providers/acme/.ci-mgmt.yaml +++ b/provider-ci/test-providers/acme/.ci-mgmt.yaml @@ -5,7 +5,6 @@ major-version: 0 providerDefaultBranch: main upstreamProviderOrg: vancluever publishRegistry: false -enableAutoRelease: false languages: - dotnet - go diff --git a/provider-ci/test-providers/aws/.ci-mgmt.yaml b/provider-ci/test-providers/aws/.ci-mgmt.yaml index e01f2b2c6b..721dbc72fc 100644 --- a/provider-ci/test-providers/aws/.ci-mgmt.yaml +++ b/provider-ci/test-providers/aws/.ci-mgmt.yaml @@ -9,7 +9,7 @@ env: PULUMI_MISSING_DOCS_ERROR: true AWS_REGION: "us-west-2" OIDC_ROLE_ARN: ${{ secrets.OIDC_ROLE_ARN }} -makeTemplate: bridged +template: bridged-provider checkoutSubmodules: true freeDiskSpaceBeforeBuild: true freeDiskSpaceBeforeSdkBuild: true diff --git a/provider-ci/test-providers/aws/.github/workflows/build_sdk.yml b/provider-ci/test-providers/aws/.github/workflows/build_sdk.yml index 40b8f0e3a2..b8020bb8b2 100644 --- a/provider-ci/test-providers/aws/.github/workflows/build_sdk.yml +++ b/provider-ci/test-providers/aws/.github/workflows/build_sdk.yml @@ -20,7 +20,7 @@ env: PULUMI_API: https://api.pulumi-staging.io PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/.. PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget - PULUMI_MISSING_DOCS_ERROR: true + PULUMI_MISSING_DOCS_ERROR: "true" PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} PYPI_USERNAME: __token__ SIGNING_KEY: ${{ secrets.JAVA_SIGNING_KEY }} diff --git a/provider-ci/test-providers/aws/.github/workflows/command-dispatch.yml b/provider-ci/test-providers/aws/.github/workflows/command-dispatch.yml index 8e61b7eb7d..7482963d58 100644 --- a/provider-ci/test-providers/aws/.github/workflows/command-dispatch.yml +++ b/provider-ci/test-providers/aws/.github/workflows/command-dispatch.yml @@ -13,7 +13,7 @@ env: PULUMI_API: https://api.pulumi-staging.io PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/.. PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget - PULUMI_MISSING_DOCS_ERROR: true + PULUMI_MISSING_DOCS_ERROR: "true" PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} PYPI_USERNAME: __token__ SIGNING_KEY: ${{ secrets.JAVA_SIGNING_KEY }} diff --git a/provider-ci/test-providers/aws/.github/workflows/license.yml b/provider-ci/test-providers/aws/.github/workflows/license.yml index c2c72b7c59..50646fd686 100644 --- a/provider-ci/test-providers/aws/.github/workflows/license.yml +++ b/provider-ci/test-providers/aws/.github/workflows/license.yml @@ -19,7 +19,7 @@ env: PULUMI_API: https://api.pulumi-staging.io PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/.. PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget - PULUMI_MISSING_DOCS_ERROR: true + PULUMI_MISSING_DOCS_ERROR: "true" PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} PYPI_USERNAME: __token__ SIGNING_KEY: ${{ secrets.JAVA_SIGNING_KEY }} diff --git a/provider-ci/test-providers/aws/.github/workflows/lint.yml b/provider-ci/test-providers/aws/.github/workflows/lint.yml index a3103f006a..fbec6c8feb 100644 --- a/provider-ci/test-providers/aws/.github/workflows/lint.yml +++ b/provider-ci/test-providers/aws/.github/workflows/lint.yml @@ -19,7 +19,7 @@ env: PULUMI_API: https://api.pulumi-staging.io PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/.. PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget - PULUMI_MISSING_DOCS_ERROR: true + PULUMI_MISSING_DOCS_ERROR: "true" PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} PYPI_USERNAME: __token__ SIGNING_KEY: ${{ secrets.JAVA_SIGNING_KEY }} diff --git a/provider-ci/test-providers/aws/.github/workflows/master.yml b/provider-ci/test-providers/aws/.github/workflows/master.yml index 84916fef54..b80eadf4a6 100644 --- a/provider-ci/test-providers/aws/.github/workflows/master.yml +++ b/provider-ci/test-providers/aws/.github/workflows/master.yml @@ -13,7 +13,7 @@ env: PULUMI_API: https://api.pulumi-staging.io PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/.. PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget - PULUMI_MISSING_DOCS_ERROR: true + PULUMI_MISSING_DOCS_ERROR: "true" PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} PYPI_USERNAME: __token__ SIGNING_KEY: ${{ secrets.JAVA_SIGNING_KEY }} diff --git a/provider-ci/test-providers/aws/.github/workflows/nightly-test.yml b/provider-ci/test-providers/aws/.github/workflows/nightly-test.yml index 93c97159c5..93d71620a2 100644 --- a/provider-ci/test-providers/aws/.github/workflows/nightly-test.yml +++ b/provider-ci/test-providers/aws/.github/workflows/nightly-test.yml @@ -13,7 +13,7 @@ env: PULUMI_API: https://api.pulumi-staging.io PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/.. PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget - PULUMI_MISSING_DOCS_ERROR: true + PULUMI_MISSING_DOCS_ERROR: "true" PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} PYPI_USERNAME: __token__ SIGNING_KEY: ${{ secrets.JAVA_SIGNING_KEY }} diff --git a/provider-ci/test-providers/aws/.github/workflows/prerelease.yml b/provider-ci/test-providers/aws/.github/workflows/prerelease.yml index d70112dec4..c4d43286e2 100644 --- a/provider-ci/test-providers/aws/.github/workflows/prerelease.yml +++ b/provider-ci/test-providers/aws/.github/workflows/prerelease.yml @@ -14,7 +14,7 @@ env: PULUMI_API: https://api.pulumi-staging.io PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/.. PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget - PULUMI_MISSING_DOCS_ERROR: true + PULUMI_MISSING_DOCS_ERROR: "true" PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} PYPI_USERNAME: __token__ SIGNING_KEY: ${{ secrets.JAVA_SIGNING_KEY }} diff --git a/provider-ci/test-providers/aws/.github/workflows/prerequisites.yml b/provider-ci/test-providers/aws/.github/workflows/prerequisites.yml index 4d5745564b..d626c0534d 100644 --- a/provider-ci/test-providers/aws/.github/workflows/prerequisites.yml +++ b/provider-ci/test-providers/aws/.github/workflows/prerequisites.yml @@ -30,7 +30,7 @@ env: PULUMI_API: https://api.pulumi-staging.io PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/.. PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget - PULUMI_MISSING_DOCS_ERROR: true + PULUMI_MISSING_DOCS_ERROR: "true" PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} PYPI_USERNAME: __token__ SIGNING_KEY: ${{ secrets.JAVA_SIGNING_KEY }} diff --git a/provider-ci/test-providers/aws/.github/workflows/publish.yml b/provider-ci/test-providers/aws/.github/workflows/publish.yml index c15cb03f60..6b0490ad39 100644 --- a/provider-ci/test-providers/aws/.github/workflows/publish.yml +++ b/provider-ci/test-providers/aws/.github/workflows/publish.yml @@ -29,7 +29,7 @@ env: PULUMI_API: https://api.pulumi-staging.io PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/.. PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget - PULUMI_MISSING_DOCS_ERROR: true + PULUMI_MISSING_DOCS_ERROR: "true" PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} PYPI_USERNAME: __token__ SIGNING_KEY: ${{ secrets.JAVA_SIGNING_KEY }} diff --git a/provider-ci/test-providers/aws/.github/workflows/pull-request.yml b/provider-ci/test-providers/aws/.github/workflows/pull-request.yml index 2dff3c597b..a389ebe7d9 100644 --- a/provider-ci/test-providers/aws/.github/workflows/pull-request.yml +++ b/provider-ci/test-providers/aws/.github/workflows/pull-request.yml @@ -13,7 +13,7 @@ env: PULUMI_API: https://api.pulumi-staging.io PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/.. PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget - PULUMI_MISSING_DOCS_ERROR: true + PULUMI_MISSING_DOCS_ERROR: "true" PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} PYPI_USERNAME: __token__ SIGNING_KEY: ${{ secrets.JAVA_SIGNING_KEY }} diff --git a/provider-ci/test-providers/aws/.github/workflows/release.yml b/provider-ci/test-providers/aws/.github/workflows/release.yml index b29cbade7b..fa6d7d0f39 100644 --- a/provider-ci/test-providers/aws/.github/workflows/release.yml +++ b/provider-ci/test-providers/aws/.github/workflows/release.yml @@ -19,7 +19,7 @@ env: PULUMI_API: https://api.pulumi-staging.io PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/.. PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget - PULUMI_MISSING_DOCS_ERROR: true + PULUMI_MISSING_DOCS_ERROR: "true" PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} PYPI_USERNAME: __token__ SIGNING_KEY: ${{ secrets.JAVA_SIGNING_KEY }} diff --git a/provider-ci/test-providers/aws/.github/workflows/resync-build.yml b/provider-ci/test-providers/aws/.github/workflows/resync-build.yml index 52f8e46cc7..309486bd79 100644 --- a/provider-ci/test-providers/aws/.github/workflows/resync-build.yml +++ b/provider-ci/test-providers/aws/.github/workflows/resync-build.yml @@ -15,7 +15,7 @@ env: PULUMI_API: https://api.pulumi-staging.io PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/.. PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget - PULUMI_MISSING_DOCS_ERROR: true + PULUMI_MISSING_DOCS_ERROR: "true" PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} PYPI_USERNAME: __token__ SIGNING_KEY: ${{ secrets.JAVA_SIGNING_KEY }} diff --git a/provider-ci/test-providers/aws/.github/workflows/run-acceptance-tests.yml b/provider-ci/test-providers/aws/.github/workflows/run-acceptance-tests.yml index 164dc199ef..02d8dd92e0 100644 --- a/provider-ci/test-providers/aws/.github/workflows/run-acceptance-tests.yml +++ b/provider-ci/test-providers/aws/.github/workflows/run-acceptance-tests.yml @@ -24,7 +24,7 @@ env: PULUMI_API: https://api.pulumi-staging.io PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/.. PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget - PULUMI_MISSING_DOCS_ERROR: true + PULUMI_MISSING_DOCS_ERROR: "true" PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} PYPI_USERNAME: __token__ SIGNING_KEY: ${{ secrets.JAVA_SIGNING_KEY }} diff --git a/provider-ci/test-providers/aws/.github/workflows/verify-release.yml b/provider-ci/test-providers/aws/.github/workflows/verify-release.yml index 3c4eeccaf8..8f1ff83558 100644 --- a/provider-ci/test-providers/aws/.github/workflows/verify-release.yml +++ b/provider-ci/test-providers/aws/.github/workflows/verify-release.yml @@ -46,7 +46,7 @@ env: PULUMI_API: https://api.pulumi-staging.io PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/.. PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget - PULUMI_MISSING_DOCS_ERROR: true + PULUMI_MISSING_DOCS_ERROR: "true" PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} PYPI_USERNAME: __token__ SIGNING_KEY: ${{ secrets.JAVA_SIGNING_KEY }} diff --git a/provider-ci/test-providers/cloudflare/.ci-mgmt.yaml b/provider-ci/test-providers/cloudflare/.ci-mgmt.yaml index fb835017ac..e9ffab7af9 100644 --- a/provider-ci/test-providers/cloudflare/.ci-mgmt.yaml +++ b/provider-ci/test-providers/cloudflare/.ci-mgmt.yaml @@ -1,6 +1,6 @@ provider: cloudflare major-version: 5 -makeTemplate: bridged +template: bridged-provider plugins: - name: terraform version: "1.0.16" @@ -26,4 +26,4 @@ actions: cd provider && go test -v -json -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt pulumiConvert: 1 registryDocs: true -checkUpstreamUpgrade: false \ No newline at end of file +checkUpstreamUpgrade: false diff --git a/provider-ci/test-providers/docker/.ci-mgmt.yaml b/provider-ci/test-providers/docker/.ci-mgmt.yaml index 2e63c3ec17..9bdce900cb 100644 --- a/provider-ci/test-providers/docker/.ci-mgmt.yaml +++ b/provider-ci/test-providers/docker/.ci-mgmt.yaml @@ -20,7 +20,7 @@ env: GOOGLE_REGION: us-central1 GOOGLE_ZONE: us-central1-a DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }} -makeTemplate: bridged +template: bridged-provider docsCmd: "cd provider/pkg/docs-gen/examples/ && go run generate.go ./yaml ./" hybrid: true plugins: diff --git a/provider-ci/test-providers/docker/.github/workflows/build_sdk.yml b/provider-ci/test-providers/docker/.github/workflows/build_sdk.yml index 8bdc9f0797..7bb00d3c79 100644 --- a/provider-ci/test-providers/docker/.github/workflows/build_sdk.yml +++ b/provider-ci/test-providers/docker/.github/workflows/build_sdk.yml @@ -21,7 +21,7 @@ env: GOOGLE_CI_WORKLOAD_IDENTITY_POOL: pulumi-ci GOOGLE_CI_WORKLOAD_IDENTITY_PROVIDER: pulumi-ci GOOGLE_PROJECT: pulumi-ci-gcp-provider - GOOGLE_PROJECT_NUMBER: 895284651812 + GOOGLE_PROJECT_NUMBER: "895284651812" GOOGLE_REGION: us-central1 GOOGLE_ZONE: us-central1-a NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/provider-ci/test-providers/docker/.github/workflows/command-dispatch.yml b/provider-ci/test-providers/docker/.github/workflows/command-dispatch.yml index 24f7b13b5a..595a32362d 100644 --- a/provider-ci/test-providers/docker/.github/workflows/command-dispatch.yml +++ b/provider-ci/test-providers/docker/.github/workflows/command-dispatch.yml @@ -14,7 +14,7 @@ env: GOOGLE_CI_WORKLOAD_IDENTITY_POOL: pulumi-ci GOOGLE_CI_WORKLOAD_IDENTITY_PROVIDER: pulumi-ci GOOGLE_PROJECT: pulumi-ci-gcp-provider - GOOGLE_PROJECT_NUMBER: 895284651812 + GOOGLE_PROJECT_NUMBER: "895284651812" GOOGLE_REGION: us-central1 GOOGLE_ZONE: us-central1-a NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/provider-ci/test-providers/docker/.github/workflows/license.yml b/provider-ci/test-providers/docker/.github/workflows/license.yml index 4a3921c420..a3163a257a 100644 --- a/provider-ci/test-providers/docker/.github/workflows/license.yml +++ b/provider-ci/test-providers/docker/.github/workflows/license.yml @@ -20,7 +20,7 @@ env: GOOGLE_CI_WORKLOAD_IDENTITY_POOL: pulumi-ci GOOGLE_CI_WORKLOAD_IDENTITY_PROVIDER: pulumi-ci GOOGLE_PROJECT: pulumi-ci-gcp-provider - GOOGLE_PROJECT_NUMBER: 895284651812 + GOOGLE_PROJECT_NUMBER: "895284651812" GOOGLE_REGION: us-central1 GOOGLE_ZONE: us-central1-a NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/provider-ci/test-providers/docker/.github/workflows/lint.yml b/provider-ci/test-providers/docker/.github/workflows/lint.yml index d9af2573e9..0254743214 100644 --- a/provider-ci/test-providers/docker/.github/workflows/lint.yml +++ b/provider-ci/test-providers/docker/.github/workflows/lint.yml @@ -20,7 +20,7 @@ env: GOOGLE_CI_WORKLOAD_IDENTITY_POOL: pulumi-ci GOOGLE_CI_WORKLOAD_IDENTITY_PROVIDER: pulumi-ci GOOGLE_PROJECT: pulumi-ci-gcp-provider - GOOGLE_PROJECT_NUMBER: 895284651812 + GOOGLE_PROJECT_NUMBER: "895284651812" GOOGLE_REGION: us-central1 GOOGLE_ZONE: us-central1-a NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/provider-ci/test-providers/docker/.github/workflows/master.yml b/provider-ci/test-providers/docker/.github/workflows/master.yml index 18bc542aa9..ef631a5bd1 100644 --- a/provider-ci/test-providers/docker/.github/workflows/master.yml +++ b/provider-ci/test-providers/docker/.github/workflows/master.yml @@ -14,7 +14,7 @@ env: GOOGLE_CI_WORKLOAD_IDENTITY_POOL: pulumi-ci GOOGLE_CI_WORKLOAD_IDENTITY_PROVIDER: pulumi-ci GOOGLE_PROJECT: pulumi-ci-gcp-provider - GOOGLE_PROJECT_NUMBER: 895284651812 + GOOGLE_PROJECT_NUMBER: "895284651812" GOOGLE_REGION: us-central1 GOOGLE_ZONE: us-central1-a NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/provider-ci/test-providers/docker/.github/workflows/prerelease.yml b/provider-ci/test-providers/docker/.github/workflows/prerelease.yml index 199c5931c5..647517823e 100644 --- a/provider-ci/test-providers/docker/.github/workflows/prerelease.yml +++ b/provider-ci/test-providers/docker/.github/workflows/prerelease.yml @@ -15,7 +15,7 @@ env: GOOGLE_CI_WORKLOAD_IDENTITY_POOL: pulumi-ci GOOGLE_CI_WORKLOAD_IDENTITY_PROVIDER: pulumi-ci GOOGLE_PROJECT: pulumi-ci-gcp-provider - GOOGLE_PROJECT_NUMBER: 895284651812 + GOOGLE_PROJECT_NUMBER: "895284651812" GOOGLE_REGION: us-central1 GOOGLE_ZONE: us-central1-a NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/provider-ci/test-providers/docker/.github/workflows/prerequisites.yml b/provider-ci/test-providers/docker/.github/workflows/prerequisites.yml index b4527a4f10..fe98f3366e 100644 --- a/provider-ci/test-providers/docker/.github/workflows/prerequisites.yml +++ b/provider-ci/test-providers/docker/.github/workflows/prerequisites.yml @@ -31,7 +31,7 @@ env: GOOGLE_CI_WORKLOAD_IDENTITY_POOL: pulumi-ci GOOGLE_CI_WORKLOAD_IDENTITY_PROVIDER: pulumi-ci GOOGLE_PROJECT: pulumi-ci-gcp-provider - GOOGLE_PROJECT_NUMBER: 895284651812 + GOOGLE_PROJECT_NUMBER: "895284651812" GOOGLE_REGION: us-central1 GOOGLE_ZONE: us-central1-a NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/provider-ci/test-providers/docker/.github/workflows/publish.yml b/provider-ci/test-providers/docker/.github/workflows/publish.yml index 06279d1653..463339640f 100644 --- a/provider-ci/test-providers/docker/.github/workflows/publish.yml +++ b/provider-ci/test-providers/docker/.github/workflows/publish.yml @@ -30,7 +30,7 @@ env: GOOGLE_CI_WORKLOAD_IDENTITY_POOL: pulumi-ci GOOGLE_CI_WORKLOAD_IDENTITY_PROVIDER: pulumi-ci GOOGLE_PROJECT: pulumi-ci-gcp-provider - GOOGLE_PROJECT_NUMBER: 895284651812 + GOOGLE_PROJECT_NUMBER: "895284651812" GOOGLE_REGION: us-central1 GOOGLE_ZONE: us-central1-a NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/provider-ci/test-providers/docker/.github/workflows/pull-request.yml b/provider-ci/test-providers/docker/.github/workflows/pull-request.yml index e7ff1f84af..0735a916c4 100644 --- a/provider-ci/test-providers/docker/.github/workflows/pull-request.yml +++ b/provider-ci/test-providers/docker/.github/workflows/pull-request.yml @@ -14,7 +14,7 @@ env: GOOGLE_CI_WORKLOAD_IDENTITY_POOL: pulumi-ci GOOGLE_CI_WORKLOAD_IDENTITY_PROVIDER: pulumi-ci GOOGLE_PROJECT: pulumi-ci-gcp-provider - GOOGLE_PROJECT_NUMBER: 895284651812 + GOOGLE_PROJECT_NUMBER: "895284651812" GOOGLE_REGION: us-central1 GOOGLE_ZONE: us-central1-a NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/provider-ci/test-providers/docker/.github/workflows/release.yml b/provider-ci/test-providers/docker/.github/workflows/release.yml index fc850a7a3f..cc3f8ca8fa 100644 --- a/provider-ci/test-providers/docker/.github/workflows/release.yml +++ b/provider-ci/test-providers/docker/.github/workflows/release.yml @@ -20,7 +20,7 @@ env: GOOGLE_CI_WORKLOAD_IDENTITY_POOL: pulumi-ci GOOGLE_CI_WORKLOAD_IDENTITY_PROVIDER: pulumi-ci GOOGLE_PROJECT: pulumi-ci-gcp-provider - GOOGLE_PROJECT_NUMBER: 895284651812 + GOOGLE_PROJECT_NUMBER: "895284651812" GOOGLE_REGION: us-central1 GOOGLE_ZONE: us-central1-a NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/provider-ci/test-providers/docker/.github/workflows/resync-build.yml b/provider-ci/test-providers/docker/.github/workflows/resync-build.yml index 26177230ad..fbdfad370e 100644 --- a/provider-ci/test-providers/docker/.github/workflows/resync-build.yml +++ b/provider-ci/test-providers/docker/.github/workflows/resync-build.yml @@ -16,7 +16,7 @@ env: GOOGLE_CI_WORKLOAD_IDENTITY_POOL: pulumi-ci GOOGLE_CI_WORKLOAD_IDENTITY_PROVIDER: pulumi-ci GOOGLE_PROJECT: pulumi-ci-gcp-provider - GOOGLE_PROJECT_NUMBER: 895284651812 + GOOGLE_PROJECT_NUMBER: "895284651812" GOOGLE_REGION: us-central1 GOOGLE_ZONE: us-central1-a NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/provider-ci/test-providers/docker/.github/workflows/run-acceptance-tests.yml b/provider-ci/test-providers/docker/.github/workflows/run-acceptance-tests.yml index ddb7dc6f71..f8241233c4 100644 --- a/provider-ci/test-providers/docker/.github/workflows/run-acceptance-tests.yml +++ b/provider-ci/test-providers/docker/.github/workflows/run-acceptance-tests.yml @@ -25,7 +25,7 @@ env: GOOGLE_CI_WORKLOAD_IDENTITY_POOL: pulumi-ci GOOGLE_CI_WORKLOAD_IDENTITY_PROVIDER: pulumi-ci GOOGLE_PROJECT: pulumi-ci-gcp-provider - GOOGLE_PROJECT_NUMBER: 895284651812 + GOOGLE_PROJECT_NUMBER: "895284651812" GOOGLE_REGION: us-central1 GOOGLE_ZONE: us-central1-a NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/provider-ci/test-providers/docker/.github/workflows/verify-release.yml b/provider-ci/test-providers/docker/.github/workflows/verify-release.yml index c256de52a4..50b6ab09bd 100644 --- a/provider-ci/test-providers/docker/.github/workflows/verify-release.yml +++ b/provider-ci/test-providers/docker/.github/workflows/verify-release.yml @@ -47,7 +47,7 @@ env: GOOGLE_CI_WORKLOAD_IDENTITY_POOL: pulumi-ci GOOGLE_CI_WORKLOAD_IDENTITY_PROVIDER: pulumi-ci GOOGLE_PROJECT: pulumi-ci-gcp-provider - GOOGLE_PROJECT_NUMBER: 895284651812 + GOOGLE_PROJECT_NUMBER: "895284651812" GOOGLE_REGION: us-central1 GOOGLE_ZONE: us-central1-a NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}