Skip to content

Commit

Permalink
Add Container Registry Integration Tests for AWS ECR (#502)
Browse files Browse the repository at this point in the history
* Remove extraneous js folder

* Add TS test for ECR

* Add Python AWS registry test

* Remove examples/aws-py folder as duplicate

* Update dependences and enable Go container registry test

* Add csharp AWS ECR container registry integration test
  • Loading branch information
guineveresaenger authored Feb 27, 2023
1 parent 84f4dd6 commit 259c28c
Show file tree
Hide file tree
Showing 24 changed files with 378 additions and 466 deletions.
3 changes: 0 additions & 3 deletions examples/aws-py/Pulumi.yaml

This file was deleted.

44 changes: 0 additions & 44 deletions examples/aws-py/__main__.py

This file was deleted.

4 changes: 0 additions & 4 deletions examples/aws-py/app/Dockerfile

This file was deleted.

5 changes: 0 additions & 5 deletions examples/aws-py/app/Dockerfile-multistage

This file was deleted.

1 change: 0 additions & 1 deletion examples/aws-py/app/content/index.html

This file was deleted.

2 changes: 0 additions & 2 deletions examples/aws-py/requirements.txt

This file was deleted.

12 changes: 8 additions & 4 deletions examples/container-registries/aws/csharp/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,16 @@
using Pulumi;
using Pulumi.Aws.Ecr;
using Pulumi.Docker;
using Pulumi.Docker.Inputs;

class Program
{
static Task<int> Main() => Deployment.RunAsync(async () => {
// Create a private ECR registry.
var repo = new Repository("my-repo");
var repo = new Repository("my-repo", new RepositoryArgs{
ForceDelete = true,
});


// Get registry info (creds and endpoint) so we can build/publish to it.
var imageName = repo.RepositoryUrl;
Expand All @@ -26,7 +30,7 @@ static Task<int> Main() => Deployment.RunAsync(async () => {
throw new Exception("Invalid credentials");
}

return new ImageRegistry
return new Pulumi.Docker.Inputs.RegistryArgs
{
Server = creds.ProxyEndpoint,
Username = parts[0],
Expand All @@ -37,12 +41,12 @@ static Task<int> Main() => Deployment.RunAsync(async () => {
// Build and publish the app image.
var image = new Image("my-image", new ImageArgs
{
Build = new DockerBuild { Context = "app" },
Build = new Pulumi.Docker.Inputs.DockerBuildArgs { Context = "app" },
ImageName = imageName,
Registry = registryInfo,
});

// Export the resulting base name in addition to the specific version pushed.
// Export the resulting image name
return new Dictionary<string, object>
{
{ "baseImageName", image.BaseImageName },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Pulumi.Aws" Version="2.*" />
<PackageReference Include="Pulumi.Docker" Version="2.2.2" />
<PackageReference Include="Pulumi.Aws" Version="5.*" />
<PackageReference Include="Pulumi.Docker" Version="4.*" />
</ItemGroup>

</Project>
93 changes: 53 additions & 40 deletions examples/container-registries/aws/go/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,54 +3,67 @@ module github.com/pulumi/pulumi-docker/examples/container-registries/aws/go
go 1.19

require (
github.com/pulumi/pulumi-aws/sdk/v2 v2.13.1
github.com/pulumi/pulumi-docker/sdk/v2 v2.4.1
github.com/pulumi/pulumi/sdk/v2 v2.14.0
github.com/pulumi/pulumi-aws/sdk/v5 v5.30.0
github.com/pulumi/pulumi-docker/sdk/v4 v4.0.0-alpha.4
github.com/pulumi/pulumi/sdk/v3 v3.55.0
)

require (
github.com/Masterminds/semver v1.5.0 // indirect
github.com/Microsoft/go-winio v0.5.2 // indirect
github.com/ProtonMail/go-crypto v0.0.0-20221026131551-cf6655e29de4 // indirect
github.com/acomagu/bufpipe v1.0.3 // indirect
github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da // indirect
github.com/blang/semver v3.5.1+incompatible // indirect
github.com/cheggaaa/pb v1.0.18 // indirect
github.com/djherbis/times v1.2.0 // indirect
github.com/emirpasic/gods v1.12.0 // indirect
github.com/gofrs/flock v0.7.1 // indirect
github.com/gofrs/uuid v3.3.0+incompatible // indirect
github.com/gogo/protobuf v1.3.1 // indirect
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b // indirect
github.com/golang/protobuf v1.3.5 // indirect
github.com/cheggaaa/pb v1.0.29 // indirect
github.com/cloudflare/circl v1.1.0 // indirect
github.com/djherbis/times v1.5.0 // indirect
github.com/emirpasic/gods v1.18.1 // indirect
github.com/go-git/gcfg v1.5.0 // indirect
github.com/go-git/go-billy/v5 v5.3.1 // indirect
github.com/go-git/go-git/v5 v5.5.1 // indirect
github.com/gofrs/uuid v4.2.0+incompatible // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/glog v1.0.0 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-multierror v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/imdario/mergo v0.3.13 // indirect
github.com/inconshreveable/mousetrap v1.0.1 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd // indirect
github.com/mattn/go-runewidth v0.0.8 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/mattn/go-runewidth v0.0.13 // indirect
github.com/mitchellh/go-ps v1.0.0 // indirect
github.com/opentracing/basictracer-go v1.0.0 // indirect
github.com/opentracing/opentracing-go v1.1.0 // indirect
github.com/opentracing/basictracer-go v1.1.0 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/pjbgf/sha1cd v0.2.3 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/sabhiram/go-gitignore v0.0.0-20180611051255-d3107576ba94 // indirect
github.com/sergi/go-diff v1.0.0 // indirect
github.com/spf13/cobra v1.0.0 // indirect
github.com/spf13/pflag v1.0.3 // indirect
github.com/src-d/gcfg v1.4.0 // indirect
github.com/texttheater/golang-levenshtein v0.0.0-20191208221605-eb6844b05fc6 // indirect
github.com/pkg/term v1.1.0 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
github.com/rogpeppe/go-internal v1.9.0 // indirect
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 // indirect
github.com/santhosh-tekuri/jsonschema/v5 v5.0.0 // indirect
github.com/sergi/go-diff v1.2.0 // indirect
github.com/skeema/knownhosts v1.1.0 // indirect
github.com/spf13/cobra v1.6.1 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/stretchr/objx v0.2.0 // indirect
github.com/texttheater/golang-levenshtein v1.0.1 // indirect
github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // indirect
github.com/uber/jaeger-client-go v2.22.1+incompatible // indirect
github.com/uber/jaeger-lib v2.2.0+incompatible // indirect
github.com/xanzy/ssh-agent v0.2.1 // indirect
go.uber.org/atomic v1.6.0 // indirect
golang.org/x/crypto v0.0.0-20200317142112-1b76d66859c6 // indirect
golang.org/x/net v0.0.0-20200301022130-244492dfa37a // indirect
golang.org/x/sys v0.0.0-20200317113312-5766fd39f98d // indirect
golang.org/x/text v0.3.2 // indirect
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 // indirect
google.golang.org/grpc v1.28.0 // indirect
gopkg.in/src-d/go-billy.v4 v4.3.2 // indirect
gopkg.in/src-d/go-git.v4 v4.13.1 // indirect
github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect
github.com/uber/jaeger-lib v2.4.1+incompatible // indirect
github.com/xanzy/ssh-agent v0.3.3 // indirect
go.uber.org/atomic v1.9.0 // indirect
golang.org/x/crypto v0.3.0 // indirect
golang.org/x/net v0.5.0 // indirect
golang.org/x/sys v0.4.0 // indirect
golang.org/x/term v0.4.0 // indirect
golang.org/x/text v0.6.0 // indirect
google.golang.org/genproto v0.0.0-20220802133213-ce4fa296bf78 // indirect
google.golang.org/grpc v1.51.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v2 v2.2.8 // indirect
sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
lukechampine.com/frand v1.4.2 // indirect
sourcegraph.com/sourcegraph/appdash v0.0.0-20211028080628-e2786a622600 // indirect
)
Loading

0 comments on commit 259c28c

Please sign in to comment.