Skip to content

Commit

Permalink
Merge pull request #990 from pivotal/silence-ecr-helper
Browse files Browse the repository at this point in the history
Set logrus log level to fatal
  • Loading branch information
Tyler Phelan committed Jul 12, 2022
2 parents 33d72b2 + 3ba62c0 commit 1d5282d
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 4 deletions.
7 changes: 4 additions & 3 deletions cmd/build-init/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
"github.com/google/go-containerregistry/pkg/authn/k8schain"
"github.com/pkg/errors"

_ "github.com/pivotal/kpack/internal/logrus/fatal"
"github.com/pivotal/kpack/pkg/blob"
"github.com/pivotal/kpack/pkg/buildchange"
"github.com/pivotal/kpack/pkg/cnb"
Expand All @@ -40,9 +41,9 @@ var (
buildChanges = flag.String("build-changes", os.Getenv("BUILD_CHANGES"), "JSON string of build changes and their reason")
descriptorPath = flag.String("project-descriptor-path", os.Getenv("PROJECT_DESCRIPTOR_PATH"), "path to project descriptor file")

builderImage= flag.String("builder-image", os.Getenv("BUILDER_IMAGE"), "The builder image used to build the application")
builderName = flag.String("builder-name", os.Getenv("BUILDER_NAME"), "The builder name provided during creation")
builderKind = flag.String("builder-kind", os.Getenv("BUILDER_KIND"), "The builder kind")
builderImage = flag.String("builder-image", os.Getenv("BUILDER_IMAGE"), "The builder image used to build the application")
builderName = flag.String("builder-name", os.Getenv("BUILDER_NAME"), "The builder name provided during creation")
builderKind = flag.String("builder-kind", os.Getenv("BUILDER_KIND"), "The builder kind")

basicGitCredentials flaghelpers.CredentialsFlags
sshGitCredentials flaghelpers.CredentialsFlags
Expand Down
1 change: 1 addition & 0 deletions cmd/completion/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
"github.com/pkg/errors"
"github.com/sigstore/cosign/cmd/cosign/cli/sign"

_ "github.com/pivotal/kpack/internal/logrus/fatal"
buildapi "github.com/pivotal/kpack/pkg/apis/build/v1alpha2"
"github.com/pivotal/kpack/pkg/cnb"
"github.com/pivotal/kpack/pkg/cosign"
Expand Down
1 change: 1 addition & 0 deletions cmd/controller/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import (
"knative.dev/pkg/signals"

"github.com/pivotal/kpack/cmd"
_ "github.com/pivotal/kpack/internal/logrus/fatal"
buildapi "github.com/pivotal/kpack/pkg/apis/build/v1alpha2"
"github.com/pivotal/kpack/pkg/blob"
"github.com/pivotal/kpack/pkg/buildpod"
Expand Down
1 change: 1 addition & 0 deletions cmd/rebase/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"github.com/google/go-containerregistry/pkg/authn/k8schain"
"github.com/pkg/errors"

_ "github.com/pivotal/kpack/internal/logrus/fatal"
"github.com/pivotal/kpack/pkg/buildchange"
"github.com/pivotal/kpack/pkg/dockercreds"
"github.com/pivotal/kpack/pkg/flaghelpers"
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ require (
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06
github.com/sclevine/spec v1.4.0
github.com/sigstore/cosign v1.5.2
github.com/sirupsen/logrus v1.8.1
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.7.1
github.com/theupdateframework/notary v0.6.2-0.20200804143915-84287fd8df4f
Expand Down Expand Up @@ -240,7 +241,6 @@ require (
github.com/sigstore/fulcio v0.1.2-0.20220114150912-86a2036f9bc7 // indirect
github.com/sigstore/rekor v0.4.1-0.20220114213500-23f583409af3 // indirect
github.com/sigstore/sigstore v1.1.1-0.20220130134424-bae9b66b8442 // indirect
github.com/sirupsen/logrus v1.8.1 // indirect
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 // indirect
github.com/soheilhy/cmux v0.1.5 // indirect
github.com/spf13/afero v1.8.0 // indirect
Expand Down
9 changes: 9 additions & 0 deletions internal/logrus/fatal/fatal_level.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package fatal

import "github.com/sirupsen/logrus"

// package can be imported to set the log level to fatal

func init() {
logrus.SetLevel(logrus.FatalLevel)
}

0 comments on commit 1d5282d

Please sign in to comment.