Skip to content

Commit

Permalink
Merge pull request cnabio#853 from carolynvs/bump-cnab-go
Browse files Browse the repository at this point in the history
Bump cnab-go to v0.4.0-beta1
  • Loading branch information
silvin-lubecki committed Sep 11, 2019
2 parents 2391758 + 2a58e08 commit 3933d69
Show file tree
Hide file tree
Showing 20 changed files with 113 additions and 63 deletions.
6 changes: 3 additions & 3 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 1 addition & 6 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@

[[constraint]]
name = "github.com/deislabs/cnab-go"
version = "v0.3.3-beta1"
version = "v0.4.0-beta1"

[[override]]
name = "github.com/google/go-containerregistry"
Expand Down Expand Up @@ -94,8 +94,3 @@
[[override]]
name = "golang.org/x/sys"
revision = "f49334f85ddcf0f08d7fb6dd7363e9e6d6b777eb"

[[constraint]]
# version imported by k8s.io/client-go @ kubernetes-1.11.2
name = "github.com/Azure/go-autorest"
revision = "1ff28809256a84bb6966640ff3d0371af82ccba4"
2 changes: 1 addition & 1 deletion cmd/duffle/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func (i *installCmd) run() error {
Driver: driverImpl,
}
fmt.Fprintf(i.out, "Executing install action...\n")
err = inst.Run(c, creds, i.out)
err = inst.Run(c, creds, setOut(i.out))

// Even if the action fails, we want to store a claim. This is because
// we cannot know, based on a failure, whether or not any resources were
Expand Down
2 changes: 1 addition & 1 deletion cmd/duffle/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ func (d *driverWithRelocationMapping) Run(op *driver.Operation) (driver.Operatio
op.Files["/cnab/app/relocation-mapping.json"] = d.relMapping

var err error
op.Image, err = d.relocateImage(op.Image)
op.Image.Image, err = d.relocateImage(op.Image.Image)
if err != nil {
return driver.OperationResult{}, err
}
Expand Down
15 changes: 15 additions & 0 deletions cmd/duffle/operation_configuration.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package main

import (
"io"

"github.com/deislabs/cnab-go/action"
"github.com/deislabs/cnab-go/driver"
)

func setOut(w io.Writer) action.OperationConfigFunc {
return func(op *driver.Operation) error {
op.Out = w
return nil
}
}
2 changes: 1 addition & 1 deletion cmd/duffle/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Credentials and parameters may be passed to the bundle during a target action.
}

fmt.Fprintf(w, "Executing custom action %q for release %q", target, claimName)
err = action.Run(&c, creds, cmd.OutOrStdout())
err = action.Run(&c, creds, setOut(cmd.OutOrStdout()))
if actionDef := c.Bundle.Actions[target]; !actionDef.Modifies {
// Do not store a claim for non-mutating actions.
return err
Expand Down
2 changes: 1 addition & 1 deletion cmd/duffle/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ reason, it may need the same credentials used to install.
// TODO: Do we pass new values in here? Or just from Claim?
action := &action.Status{Driver: driverImpl}
fmt.Println("Executing status action in bundle...")
return action.Run(&c, creds, cmd.OutOrStdout())
return action.Run(&c, creds, setOut(cmd.OutOrStdout()))
},
}
cmd.Flags().StringVarP(&statusDriver, "driver", "d", "docker", "Specify a driver name")
Expand Down
2 changes: 1 addition & 1 deletion cmd/duffle/uninstall.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func (un *uninstallCmd) run() error {
}

fmt.Fprintln(un.out, "Executing uninstall action...")
if err := uninst.Run(&claim, creds, un.out); err != nil {
if err := uninst.Run(&claim, creds, setOut(un.out)); err != nil {
return fmt.Errorf("could not uninstall %q: %s", un.name, err)
}
return claimStorage().Delete(un.name)
Expand Down
2 changes: 1 addition & 1 deletion cmd/duffle/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func (up *upgradeCmd) run() error {
upgr := &action.Upgrade{
Driver: driverImpl,
}
err = upgr.Run(&claim, creds, up.out)
err = upgr.Run(&claim, creds, setOut(up.out))

// persist the claim, regardless of the success of the upgrade action
persistErr := claimStorage().Store(claim)
Expand Down
9 changes: 3 additions & 6 deletions vendor/github.com/deislabs/cnab-go/action/action.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 7 additions & 4 deletions vendor/github.com/deislabs/cnab-go/action/install.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions vendor/github.com/deislabs/cnab-go/action/operation_configs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions vendor/github.com/deislabs/cnab-go/action/run_custom.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 7 additions & 4 deletions vendor/github.com/deislabs/cnab-go/action/status.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 7 additions & 4 deletions vendor/github.com/deislabs/cnab-go/action/uninstall.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 7 additions & 4 deletions vendor/github.com/deislabs/cnab-go/action/upgrade.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 9 additions & 15 deletions vendor/github.com/deislabs/cnab-go/bundle/definition/schema.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions vendor/github.com/deislabs/cnab-go/driver/docker/docker.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3933d69

Please sign in to comment.