Add providerURL to package definition
This commit is contained in:
parent
45d2fa95d6
commit
f310c21b85
|
@ -3,8 +3,11 @@ CHANGELOG
|
|||
|
||||
## HEAD (Unreleased)
|
||||
|
||||
- Add providerURL field to package definition
|
||||
[#4947](https://github.com/pulumi/pulumi/pull/4947)
|
||||
|
||||
- Go program gen: Improved handling for pulumi.Map types
|
||||
[#491](https://github.com/pulumi/pulumi/pull/4914)
|
||||
[#4914](https://github.com/pulumi/pulumi/pull/4914)
|
||||
|
||||
- Go SDK: Input type interfaces should declare pointer type impls where appropriate
|
||||
[#4911](https://github.com/pulumi/pulumi/pull/4911)
|
||||
|
|
|
@ -1221,7 +1221,8 @@ type npmPackage struct {
|
|||
}
|
||||
|
||||
type npmPulumiManifest struct {
|
||||
Resource bool `json:"resource,omitempty"`
|
||||
Resource bool `json:"resource,omitempty"`
|
||||
ProviderURL string `json:"providerURL,omitempty"`
|
||||
}
|
||||
|
||||
func genNPMPackageMetadata(pkg *schema.Package, info NodePackageInfo) string {
|
||||
|
@ -1253,7 +1254,8 @@ func genNPMPackageMetadata(pkg *schema.Package, info NodePackageInfo) string {
|
|||
},
|
||||
DevDependencies: devDependencies,
|
||||
Pulumi: npmPulumiManifest{
|
||||
Resource: true,
|
||||
Resource: true,
|
||||
ProviderURL: pkg.ProviderURL,
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
@ -774,7 +774,11 @@ func genPackageMetadata(tool string, pkg *schema.Package, requires map[string]st
|
|||
fmt.Fprintf(w, " def run(self):\n")
|
||||
fmt.Fprintf(w, " install.run(self)\n")
|
||||
fmt.Fprintf(w, " try:\n")
|
||||
fmt.Fprintf(w, " check_call(['pulumi', 'plugin', 'install', 'resource', '%s', '${PLUGIN_VERSION}'])\n", pkg.Name)
|
||||
if pkg.ProviderURL == "" {
|
||||
fmt.Fprintf(w, " check_call(['pulumi', 'plugin', 'install', 'resource', '%s', '${PLUGIN_VERSION}'])\n", pkg.Name)
|
||||
} else {
|
||||
fmt.Fprintf(w, " check_call(['pulumi', 'plugin', 'install', 'resource', '%s', '${PLUGIN_VERSION}', '--server', '%s'])\n", pkg.Name, pkg.ProviderURL)
|
||||
}
|
||||
fmt.Fprintf(w, " except OSError as error:\n")
|
||||
fmt.Fprintf(w, " if error.errno == errno.ENOENT:\n")
|
||||
fmt.Fprintf(w, " print(\"\"\"\n")
|
||||
|
|
|
@ -303,6 +303,8 @@ type Package struct {
|
|||
Repository string
|
||||
// LogoURL is the URL for the package's logo, if any.
|
||||
LogoURL string
|
||||
// ProviderURL is the URL to use to acquire the provider binary, if any.
|
||||
ProviderURL string
|
||||
|
||||
// Types is the list of non-resource types defined by the package.
|
||||
Types []Type
|
||||
|
@ -681,6 +683,8 @@ type PackageSpec struct {
|
|||
Repository string `json:"repository,omitempty"`
|
||||
// LogoURL is the URL for the package's logo, if any.
|
||||
LogoURL string `json:"logoUrl,omitempty"`
|
||||
// ProviderURL is the URL to use to acquire the provider binary, if any.
|
||||
ProviderURL string `json:"providerURL,omitempty"`
|
||||
|
||||
// Meta contains information for the importer about this package.
|
||||
Meta *MetadataSpec `json:"meta,omitempty"`
|
||||
|
@ -783,6 +787,7 @@ func ImportSpec(spec PackageSpec, languages map[string]Language) (*Package, erro
|
|||
License: spec.License,
|
||||
Attribution: spec.Attribution,
|
||||
Repository: spec.Repository,
|
||||
ProviderURL: spec.ProviderURL,
|
||||
Config: config,
|
||||
Types: typeList,
|
||||
Provider: provider,
|
||||
|
|
Loading…
Reference in a new issue