Skip to content

Commit

Permalink
dont exit with error when Cleanup is skipped as expected.
Browse files Browse the repository at this point in the history
  • Loading branch information
AnalogJ committed Jun 17, 2021
1 parent d8654a7 commit 6ad9bae
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ require (
github.com/golang/mock v1.4.4
github.com/kvz/logstreamer v0.0.0-20201023134116-02d20f4338f5 // indirect
github.com/mitchellh/mapstructure v1.3.3 // indirect
github.com/packagrio/go-common v0.0.1 // indirect
github.com/packagrio/go-common v0.0.1
github.com/spf13/viper v1.7.1
github.com/stretchr/testify v1.7.0
github.com/urfave/cli v1.22.5
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d // indirect
gopkg.in/yaml.v2 v2.3.0
)

// replace github.com/packagrio/go-common v0.0.0-20210616052944-f4124cc14bcc => ../go-common
//replace github.com/packagrio/go-common v0.0.1 => ../go-common
1 change: 1 addition & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
github.com/urfave/cli v1.22.5 h1:lNq9sAHXK2qfdI8W+GRItjCEkI+2oR4d+MEHy1CKXoU=
github.com/urfave/cli v1.22.5/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
github.com/whilp/git-urls v1.0.0 h1:95f6UMWN5FKW71ECsXRUd3FVYiXdrE7aX4NZKcPmIjU=
github.com/whilp/git-urls v1.0.0/go.mod h1:J16SAmobsqc3Qcy98brfl5f5+e0clUvg1krgwk/qCfE=
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
Expand Down
6 changes: 5 additions & 1 deletion pkg/pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package pkg

import (
"errors"
packagrErrors "github.com/packagrio/go-common/errors"
"github.com/analogj/go-util/utils"
"github.com/packagrio/go-common/pipeline"
"github.com/packagrio/go-common/scm"
Expand Down Expand Up @@ -201,7 +202,10 @@ func (p *Pipeline) ScmCleanupStep() error {

log.Println("scm_cleanup_step")
if err := p.Scm.Cleanup(); err != nil {
return err
if _, typeMatch := err.(packagrErrors.ScmCleanupFailed); !typeMatch {
//not a cleanup failure message (which we can ignore), so expose this.
return err
}
}

return nil
Expand Down

0 comments on commit 6ad9bae

Please sign in to comment.