From 2eb73c3a98ec45700f3f08a9d40c8d7e57e53bb8 Mon Sep 17 00:00:00 2001 From: Ashley Connor Date: Thu, 27 Jan 2022 09:56:17 -0500 Subject: [PATCH] Implement deploy interface --- builder/builder.go | 17 ++--- builder/output.proto | 2 +- go.mod | 3 + go.sum | 7 ++ platform/deploy.go | 150 +++++++++++++++++------------------------- platform/destroy.go | 75 --------------------- registry/output.proto | 11 +++- registry/registry.go | 25 ++++--- release/destroy.go | 2 +- release/release.go | 8 +-- 10 files changed, 109 insertions(+), 191 deletions(-) delete mode 100644 platform/destroy.go diff --git a/builder/builder.go b/builder/builder.go index dad06c6..573217d 100644 --- a/builder/builder.go +++ b/builder/builder.go @@ -151,13 +151,12 @@ func (b *Builder) build(ctx context.Context, src *component.Source, ui terminal. RebaseName: "", // TODO: Follow symbolic links } - dir, err := os.MkdirTemp("", "waypoint-plugin-s3") + destDir, err := os.MkdirTemp("", "waypoint-plugin-s3") if err != nil { return nil, status.Errorf(codes.FailedPrecondition, "unable to create tmp directory: %s", err) } - defer os.RemoveAll(dir) - archive.CopyTo(content, srcInfo, dir) + archive.CopyTo(content, srcInfo, destDir) step.Done() @@ -168,12 +167,14 @@ func (b *Builder) build(ctx context.Context, src *component.Source, ui terminal. step.Done() - step = sg.Add("Zipping assets...") - defer step.Abort() + // step = sg.Add("Zipping assets...") + // defer step.Abort() - dockerClient.ContainerRemove(ctx, containerResp.ID, types.ContainerRemoveOptions{Force: true}) + // // TODO zip files - step.Done() + // step.Done() - return &Zip{}, nil + return &Zip{ + Path: destDir, + }, nil } diff --git a/builder/output.proto b/builder/output.proto index 9cba479..7c501a1 100644 --- a/builder/output.proto +++ b/builder/output.proto @@ -6,5 +6,5 @@ package platform; option go_package = "github.com/hashicorp/waypoint-plugin-s3/builder"; message Zip { - string location = 1; + string path = 1; } diff --git a/go.mod b/go.mod index 0115abb..23e6649 100644 --- a/go.mod +++ b/go.mod @@ -3,6 +3,7 @@ module github.com/hashicorp/waypoint-plugin-s3 go 1.17 require ( + github.com/aws/aws-sdk-go v1.15.11 github.com/docker/docker v20.10.12+incompatible github.com/hashicorp/go-hclog v0.16.1 github.com/hashicorp/waypoint-plugin-sdk v0.0.0-20211012192505-5c78341a47e4 @@ -30,6 +31,7 @@ require ( github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.4.0 // indirect github.com/fatih/color v1.12.0 // indirect + github.com/go-ini/ini v1.25.4 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect github.com/golang/protobuf v1.5.2 // indirect @@ -43,6 +45,7 @@ require ( github.com/hashicorp/hcl/v2 v2.10.1-0.20210621220818-327f3ce2570e // indirect github.com/hashicorp/yamux v0.0.0-20210316155119-a95892c5f864 // indirect github.com/iancoleman/strcase v0.1.2 // indirect + github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7 // indirect github.com/kr/pretty v0.3.0 // indirect github.com/kr/text v0.2.0 // indirect github.com/lab47/vterm v0.0.0-20201001232628-a9dd795f94c2 // indirect diff --git a/go.sum b/go.sum index 156ba22..bbe7ecc 100644 --- a/go.sum +++ b/go.sum @@ -90,6 +90,7 @@ github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6 github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/aws/aws-sdk-go v1.15.11 h1:m45+Ru/wA+73cOZXiEGLDH2d9uLN3iHqMc0/z4noDXE= github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -309,6 +310,7 @@ github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeME github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-ini/ini v1.25.4 h1:Mujh4R/dH6YL8bxuISne3xX2+qcQ9p0IxKAP6ExWoUo= github.com/go-ini/ini v1.25.4/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= @@ -410,6 +412,7 @@ github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5m github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= github.com/gookit/color v1.3.1 h1:PPD/C7sf8u2L8XQPdPgsWRoAiLQGZEZOzU3cf5IYYUk= github.com/gookit/color v1.3.1/go.mod h1:R3ogXq2B9rTbXoSHJ1HyUVAZ3poOJHpd9nQmyGZsfvQ= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= @@ -470,6 +473,7 @@ github.com/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56/go.mod h1:ymszkNOg6t github.com/jhump/protoreflect v1.6.0 h1:h5jfMVslIg6l29nsMs0D8Wj17RDVdNYti0vDN/PZZoE= github.com/jhump/protoreflect v1.6.0/go.mod h1:eaTn3RZAmMBcV0fifFvlm6VHNz3wSkYyXYWUh7ymB74= github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7 h1:SMvOWPJCES2GdFracYbBQh93GXac8fq7HeN6JnpduB8= github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/joefitzgerald/rainbow-reporter v0.1.0/go.mod h1:481CNgqmVHQZzdIbN52CupLJyoVwB10FQ/IQlF1pdL8= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= @@ -478,6 +482,7 @@ github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/u github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= @@ -697,7 +702,9 @@ github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrf github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a h1:pa8hGb/2YqsZKovtsgrwcDH1RZhVbTKCjLp47XpqCDs= github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= diff --git a/platform/deploy.go b/platform/deploy.go index 119cd5b..6d54ed1 100644 --- a/platform/deploy.go +++ b/platform/deploy.go @@ -3,19 +3,21 @@ package platform import ( "context" "fmt" + "os" + "path/filepath" + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/session" + "github.com/aws/aws-sdk-go/service/s3/s3manager" "github.com/hashicorp/go-hclog" "github.com/hashicorp/waypoint-plugin-s3/registry" "github.com/hashicorp/waypoint-plugin-sdk/component" - "github.com/hashicorp/waypoint-plugin-sdk/framework/resource" - sdk "github.com/hashicorp/waypoint-plugin-sdk/proto/gen" "github.com/hashicorp/waypoint-plugin-sdk/terminal" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" ) type DeployConfig struct { - Region string "hcl:directory,optional" + Region string `hcl:"region,optional"` + BucketName string `hcl:"bucket_name,optional"` } type Platform struct { @@ -32,12 +34,16 @@ func (p *Platform) ConfigSet(config interface{}) error { c, ok := config.(*DeployConfig) if !ok { // The Waypoint SDK should ensure this never gets hit - return fmt.Errorf("Expected *DeployConfig as parameter") + return fmt.Errorf("expected *DeployConfig as parameter") } // validate the config if c.Region == "" { - return fmt.Errorf("Region must be set to a valid directory") + return fmt.Errorf("region must be set to a valid AWS region") + } + + if c.BucketName == "" { + return fmt.Errorf("bucket_name must be set to a valid S3 bucket") } return nil @@ -51,43 +57,12 @@ func (p *Platform) getConnectContext() (interface{}, error) { return nil, nil } -// Resource manager will tell the Waypoint Plugin SDK how to create and delete -// certain resources for your deployments. -// -// For example, your deployment might need to create a "container" or "load balancer". -// Your plugin could implement two resources through ResourceManager and the Waypoint -// Plugin SDK will automatically create or delete these resources as well as -// obtain the defined status for them. -// -// ResourceManager can also be implemented for Release as well. -func (p *Platform) resourceManager(log hclog.Logger, dcr *component.DeclaredResourcesResp) *resource.Manager { - return resource.NewManager( - resource.WithLogger(log.Named("resource_manager")), - resource.WithValueProvider(p.getConnectContext), - resource.WithDeclaredResourcesResp(dcr), - resource.WithResource(resource.NewResource( - resource.WithName("template_example"), - resource.WithState(&Resource_Deployment{}), - resource.WithCreate(p.resourceDeploymentCreate), - resource.WithDestroy(p.resourceDeploymentDestroy), - resource.WithStatus(p.resourceDeploymentStatus), - resource.WithPlatform("template_platform"), // Update this to match your plugins platform, like Kubernetes - resource.WithCategoryDisplayHint(sdk.ResourceCategoryDisplayHint_INSTANCE_MANAGER), // This is meant for the UI to determine what kind of icon to show - )), - // NOTE: Add more resource funcs here if your plugin has more than 1 resource - ) -} - -// Implement Builder +// Implement Platform func (p *Platform) DeployFunc() interface{} { // return a function which will be called by Waypoint return p.deploy } -func (p *Platform) StatusFunc() interface{} { - return p.status -} - // A BuildFunc does not have a strict signature, you can define the parameters // you need based on the Available parameters that the Waypoint SDK provides. // Waypoint will automatically inject parameters as specified @@ -102,7 +77,7 @@ func (p *Platform) StatusFunc() interface{} { // - terminal.UI // - *component.LabelSet -// In addition to default input parameters the registry.Artifact from the Build step +// In addition to default input parameters the registry.Zip from the Build step // can also be injected. // // The output parameters for BuildFunc must be a Struct which can @@ -116,73 +91,66 @@ func (b *Platform) deploy( ui terminal.UI, log hclog.Logger, dcr *component.DeclaredResourcesResp, - artifact *registry.Artifact, + zip *registry.Zip, ) (*Deployment, error) { u := ui.Status() defer u.Close() u.Update("Deploy application") + // the session the S3 Uploader will use + sess := session.Must(session.NewSession(&aws.Config{Region: &b.config.Region})) - var result Deployment + // create an uploader with the session and default options + uploader := s3manager.NewUploader(sess) - // Create our resource manager and create deployment resources - rm := b.resourceManager(log, dcr) + // walk temp dir + objects := []s3manager.BatchUploadObject{} - // These params must match exactly to your resource manager functions. Otherwise - // they will not be invoked during CreateAll() - if err := rm.CreateAll( - ctx, log, u, ui, - artifact, &result, - ); err != nil { - return nil, err - } + err := filepath.Walk(zip.Path, func(path string, info os.FileInfo, err error) error { + if err != nil { + return err + } - // Store our resource state - result.ResourceState = rm.State() + stat, err := os.Stat(path) + if err != nil { + return err + } - u.Update("Application deployed") + if stat.IsDir() { + return nil + } - return &Deployment{}, nil -} + relativePath, err := filepath.Rel(zip.Path, path) + if err != nil { + return err + } -// This function is the top level status command that gets invoked when Waypoint -// attempts to determine the health of a dpeloyment. It will also invoke the -// status for each resource involed for the given deployment if any. -func (d *Platform) status( - ctx context.Context, - ji *component.JobInfo, - ui terminal.UI, - log hclog.Logger, - deployment *Deployment, -) (*sdk.StatusReport, error) { - sg := ui.StepGroup() - s := sg.Add("Checking the status of the deployment...") - - rm := d.resourceManager(log, nil) - - // If we don't have resource state, this state is from an older version - // and we need to manually recreate it. - if deployment.ResourceState == nil { - rm.Resource("deployment").SetState(&Resource_Deployment{ - Name: deployment.Id, - }) - } else { - // Load our set state - if err := rm.LoadState(deployment.ResourceState); err != nil { - return nil, err + f, err := os.Open(path) + if err != nil { + return fmt.Errorf("failed to open file %q, %v", path, err) } + + objects = append(objects, s3manager.BatchUploadObject{Object: &s3manager.UploadInput{ + Key: aws.String(relativePath), + Bucket: aws.String(b.config.BucketName), + Body: f, + }}) + + return nil + }) + + if err != nil { + return nil, err } - // This will call the StatusReport func on every defined resource in ResourceManager - report, err := rm.StatusReport(ctx, log, sg, ui) + iter := &s3manager.UploadObjectsIterator{Objects: objects} + err = uploader.UploadWithIterator(ctx, iter) if err != nil { - return nil, status.Errorf(codes.Internal, "resource manager failed to generate resource statuses: %s", err) + return nil, err } - report.Health = sdk.StatusReport_UNKNOWN - s.Update("Deployment is currently not implemented!") - s.Done() + u.Update("Application deployed") - return report, nil + return &Deployment{}, nil } func (b *Platform) resourceDeploymentCreate( @@ -190,7 +158,7 @@ func (b *Platform) resourceDeploymentCreate( log hclog.Logger, st terminal.Status, ui terminal.UI, - artifact *registry.Artifact, + zip *registry.Zip, result *Deployment, ) error { // Create your deployment resource here! @@ -202,7 +170,7 @@ func (b *Platform) resourceDeploymentStatus( ctx context.Context, ui terminal.UI, sg terminal.StepGroup, - artifact *registry.Artifact, + zip *registry.Zip, ) error { // Determine health status of "this" resource. return nil diff --git a/platform/destroy.go b/platform/destroy.go deleted file mode 100644 index 4f90198..0000000 --- a/platform/destroy.go +++ /dev/null @@ -1,75 +0,0 @@ -package platform - -import ( - "context" - - "github.com/hashicorp/go-hclog" - "github.com/hashicorp/waypoint-plugin-sdk/terminal" -) - -// Implement the Destroyer interface -func (p *Platform) DestroyFunc() interface{} { - return p.destroy -} - -// A DestroyFunc does not have a strict signature, you can define the parameters -// you need based on the Available parameters that the Waypoint SDK provides. -// Waypoint will automatically inject parameters as specified -// in the signature at run time. -// -// Available input parameters: -// - context.Context -// - *component.Source -// - *component.JobInfo -// - *component.DeploymentConfig -// - hclog.Logger -// - terminal.UI -// - *component.LabelSet -// -// In addition to default input parameters the Deployment from the DeployFunc step -// can also be injected. -// -// The output parameters for PushFunc must be a Struct which can -// be serialzied to Protocol Buffers binary format and an error. -// This Output Value will be made available for other functions -// as an input parameter. -// -// If an error is returned, Waypoint stops the execution flow and -// returns an error to the user. -func (p *Platform) destroy( - ctx context.Context, - ui terminal.UI, - log hclog.Logger, - deployment *Deployment, -) error { - sg := ui.StepGroup() - defer sg.Wait() - - rm := p.resourceManager(log, nil) - - // If we don't have resource state, this state is from an older version - // and we need to manually recreate it. - if deployment.ResourceState == nil { - rm.Resource("deployment").SetState(&Resource_Deployment{ - Name: deployment.Name, - }) - } else { - // Load our set state - if err := rm.LoadState(deployment.ResourceState); err != nil { - return err - } - } - - // Destroy - return rm.DestroyAll(ctx, log, sg, ui) -} - -func (b *Platform) resourceDeploymentDestroy( - ctx context.Context, - log hclog.Logger, - sg terminal.StepGroup, - ui terminal.UI, -) error { - // Destroy your deployment resource - return nil -} diff --git a/registry/output.proto b/registry/output.proto index b19ca13..c6f7a98 100644 --- a/registry/output.proto +++ b/registry/output.proto @@ -5,6 +5,11 @@ package registry; option go_package = "github.com/hashicorp/waypoint-plugin-s3/registry"; -message Artifact { - string source = 1; -} \ No newline at end of file +message Zip { + string path = 1; +} + +message AccessInfo { + string image = 1; + string tag = 2; +} diff --git a/registry/registry.go b/registry/registry.go index 3bdd254..65aa44c 100644 --- a/registry/registry.go +++ b/registry/registry.go @@ -9,8 +9,8 @@ import ( ) type RegistryConfig struct { - Name string "hcl:name" - Version string "hcl:version" + Name string `hcl:"name"` + Version string `hcl:"version"` } type Registry struct { @@ -27,17 +27,26 @@ func (r *Registry) ConfigSet(config interface{}) error { c, ok := config.(*RegistryConfig) if !ok { // The Waypoint SDK should ensure this never gets hit - return fmt.Errorf("Expected *RegisterConfig as parameter") + return fmt.Errorf("expected *RegisterConfig as parameter") } // validate the config if c.Name == "" { - return fmt.Errorf("Name must be set to a valid directory") + return fmt.Errorf("name must be set to a valid directory") } return nil } +// Implement Registry +func (r *Registry) AccessInfoFunc() interface{} { + return r.accessInfo +} + +func (r *Registry) accessInfo() (*AccessInfo, error) { + return &AccessInfo{}, nil +} + // Implement Registry func (r *Registry) PushFunc() interface{} { // return a function which will be called by Waypoint @@ -67,12 +76,12 @@ func (r *Registry) PushFunc() interface{} { // as an input parameter. // If an error is returned, Waypoint stops the execution flow and // returns an error to the user. -func (r *Registry) push(ctx context.Context, ui terminal.UI, binary *builder.Zip) (*Artifact, error) { +func (r *Registry) push(ctx context.Context, ui terminal.UI, binary *builder.Zip) (*Zip, error) { u := ui.Status() defer u.Close() u.Update("Pushing binary to registry") - return &Artifact{}, nil + return &Zip{ + Path: binary.Path, + }, nil } - -// Implement Authenticator diff --git a/release/destroy.go b/release/destroy.go index 0305258..5d29002 100644 --- a/release/destroy.go +++ b/release/destroy.go @@ -70,7 +70,7 @@ func (rm *ReleaseManager) resourceReleaseDestroy( log hclog.Logger, st terminal.Status, ui terminal.UI, - artifact *registry.Artifact, + zip *registry.Zip, result *Release, ) error { // Create your deployment resource here! diff --git a/release/release.go b/release/release.go index d907864..0303ee2 100644 --- a/release/release.go +++ b/release/release.go @@ -114,7 +114,7 @@ func (rm *ReleaseManager) release( log hclog.Logger, dcr *component.DeclaredResourcesResp, ui terminal.UI, - artifact *registry.Artifact, + artifact *registry.Zip, ) (*Release, error) { u := ui.Status() defer u.Close() @@ -147,7 +147,7 @@ func (rm *ReleaseManager) status( ji *component.JobInfo, log hclog.Logger, ui terminal.UI, - artifact *registry.Artifact, + artifact *registry.Zip, release *Release, ) (*sdk.StatusReport, error) { sg := ui.StepGroup() @@ -186,7 +186,7 @@ func (rm *ReleaseManager) resourceReleaseCreate( log hclog.Logger, st terminal.Status, ui terminal.UI, - artifact *registry.Artifact, + zip *registry.Zip, result *Release, ) error { // Create your release resource here! @@ -198,7 +198,7 @@ func (rm *ReleaseManager) resourceReleaseStatus( ctx context.Context, ui terminal.UI, sg terminal.StepGroup, - artifact *registry.Artifact, + zip *registry.Zip, ) error { // Determine health status of "this" resource. return nil