From 30a26f61e4e22e60d3f99597cae159137d37c46e Mon Sep 17 00:00:00 2001 From: Bryce Lampe Date: Fri, 27 Sep 2024 09:57:50 -0700 Subject: [PATCH] Upgrade pulumi-go-provider (#268) Fixes https://github.com/pulumi/pulumi-docker-build/issues/262. @iwahbe I realized while putting this together that the provider config case wasn't actually tested e2e, and I'm skeptical it was ever actually working. I think it would be reasonable to pull in https://github.com/pulumi/pulumi-docker-build/pull/253 IMO. --- CHANGELOG.md | 7 +++++++ examples/nodejs_test.go | 12 ++++++++++++ examples/tests/config/Pulumi.yaml | 3 +++ examples/tests/config/index.ts | 5 +++++ examples/tests/config/package.json | 9 +++++++++ go.mod | 2 +- go.sum | 4 ++-- 7 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 examples/tests/config/Pulumi.yaml create mode 100644 examples/tests/config/index.ts create mode 100644 examples/tests/config/package.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 10c686d..cdc5329 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ ### Fixed +- Fixed an issue where registry authentication couldn't be specified on the + provider. (https://github.com/pulumi/pulumi-docker-build/issues/262) + +## 0.0.6 (2024-08-13) + +### Fixed + - Refreshing an `Index` resource will no longer fail if its stored credentials have expired. (https://github.com/pulumi/pulumi-docker-build/pull/194) diff --git a/examples/nodejs_test.go b/examples/nodejs_test.go index 85be4f9..b0bad04 100644 --- a/examples/nodejs_test.go +++ b/examples/nodejs_test.go @@ -147,6 +147,18 @@ func TestCaching(t *testing.T) { } } +func TestConfig(t *testing.T) { + cwd, err := os.Getwd() + require.NoError(t, err) + + test := integration.ProgramTestOptions{ + Dir: path.Join(cwd, "tests", "config"), + Dependencies: []string{"@pulumi/docker-build"}, + } + + integration.ProgramTest(t, &test) +} + type ECR struct { address string username string diff --git a/examples/tests/config/Pulumi.yaml b/examples/tests/config/Pulumi.yaml new file mode 100644 index 0000000..0e60a31 --- /dev/null +++ b/examples/tests/config/Pulumi.yaml @@ -0,0 +1,3 @@ +name: test-buildx-config +runtime: nodejs +description: A minimal TypeScript Pulumi program diff --git a/examples/tests/config/index.ts b/examples/tests/config/index.ts new file mode 100644 index 0000000..f2c893e --- /dev/null +++ b/examples/tests/config/index.ts @@ -0,0 +1,5 @@ +import * as buildx from "@pulumi/docker-build"; + +new buildx.Provider("with-structured-config", { + registries: [{ username: "foo", password: "bar", address: "docker.io" }], +}); diff --git a/examples/tests/config/package.json b/examples/tests/config/package.json new file mode 100644 index 0000000..7aab95a --- /dev/null +++ b/examples/tests/config/package.json @@ -0,0 +1,9 @@ +{ + "name": "test-buildx-caching", + "devDependencies": { + "@types/node": "^20.0.0" + }, + "dependencies": { + "@pulumi/pulumi": "^3.128.0" + } +} diff --git a/go.mod b/go.mod index 3367717..918ef72 100644 --- a/go.mod +++ b/go.mod @@ -18,7 +18,7 @@ require ( github.com/otiai10/copy v1.14.0 github.com/pulumi/providertest v0.0.13 github.com/pulumi/pulumi-dotnet/pulumi-language-dotnet v0.0.0-20240624150732-fa777213effd - github.com/pulumi/pulumi-go-provider v0.21.0 + github.com/pulumi/pulumi-go-provider v0.23.0 github.com/pulumi/pulumi-java/pkg v0.16.1 github.com/pulumi/pulumi-yaml v1.10.3 github.com/pulumi/pulumi/pkg/v3 v3.134.1 diff --git a/go.sum b/go.sum index f0153d5..7f8e91c 100644 --- a/go.sum +++ b/go.sum @@ -940,8 +940,8 @@ github.com/pulumi/providertest v0.0.13 h1:9CAaoviOTuCVHDI15h3znXa5JsKYtXLYHIIdxO github.com/pulumi/providertest v0.0.13/go.mod h1:REAoaN+hGOtdWJGirfWYqcSjCejlbGfzyVTUuemJTuE= github.com/pulumi/pulumi-dotnet/pulumi-language-dotnet v0.0.0-20240624150732-fa777213effd h1:Ifc7JJZF0WVt+snPsDaEdkCcQXht2x/Hcw7GPnK5gvs= github.com/pulumi/pulumi-dotnet/pulumi-language-dotnet v0.0.0-20240624150732-fa777213effd/go.mod h1:poRLYpZlEjDr09kC2f50srI97hjjmNay55FBMl6ZHug= -github.com/pulumi/pulumi-go-provider v0.21.0 h1:sDHBtWkWRrWn6klfdvDIorlUGMBt6BwhgKXqcPoJh2c= -github.com/pulumi/pulumi-go-provider v0.21.0/go.mod h1:2qQ4M1LXzv+SpY6v8JiTbPVGdeCeqfBMgsqb7WyH77o= +github.com/pulumi/pulumi-go-provider v0.23.0 h1:cJCORjoxnnU4/K2Hnxb8wG540N/DlvxwOkDM1CiyQo4= +github.com/pulumi/pulumi-go-provider v0.23.0/go.mod h1:F8liLNHpntb2FkIl8GeVHuC1OWo4dDxIelz1/D8Obkw= github.com/pulumi/pulumi-java/pkg v0.16.1 h1:orHnDWFbpOERwaBLry9f+6nqPX7x0MsrIkaa5QDGAns= github.com/pulumi/pulumi-java/pkg v0.16.1/go.mod h1:QH0DihZkWYle9XFc+LJ76m4hUo+fA3RdyaM90pqOaSM= github.com/pulumi/pulumi-yaml v1.10.3 h1:j5cjPiE32ILmjrWnC1cfZ0MWdqCZ8fg9wlaWk7HOtM4=