diff --git a/src/pkg/packager/publish.go b/src/pkg/packager/publish.go index 34c54bd546..34e56b2a9d 100644 --- a/src/pkg/packager/publish.go +++ b/src/pkg/packager/publish.go @@ -9,6 +9,7 @@ import ( "fmt" "os" "strings" + "time" "github.com/defenseunicorns/pkg/helpers/v2" "github.com/defenseunicorns/pkg/oci" @@ -17,6 +18,7 @@ import ( "github.com/zarf-dev/zarf/src/api/v1alpha1" "github.com/zarf-dev/zarf/src/config" "github.com/zarf-dev/zarf/src/pkg/layout" + "github.com/zarf-dev/zarf/src/pkg/logger" "github.com/zarf-dev/zarf/src/pkg/message" "github.com/zarf-dev/zarf/src/pkg/packager/creator" "github.com/zarf-dev/zarf/src/pkg/packager/filters" @@ -27,6 +29,10 @@ import ( // Publish publishes the package to a registry func (p *Packager) Publish(ctx context.Context) (err error) { + l := logger.From(ctx) + start := time.Now() + l.Debug("start publish") + _, isOCISource := p.source.(*sources.OCISource) if isOCISource && p.cfg.PublishOpts.SigningKeyPath == "" { // oci --> oci is a special case, where we will use oci.CopyPackage so that we can transfer the package @@ -123,5 +129,10 @@ func (p *Packager) Publish(ctx context.Context) (err error) { return err } } + l.Info("packaged successfully published", + "name", p.cfg.Pkg.Metadata.Name, + "ref", ref, + "duration", time.Since(start), + ) return nil } diff --git a/src/test/e2e/50_oci_publish_deploy_test.go b/src/test/e2e/50_oci_publish_deploy_test.go index 4c2e250551..921c127deb 100644 --- a/src/test/e2e/50_oci_publish_deploy_test.go +++ b/src/test/e2e/50_oci_publish_deploy_test.go @@ -48,7 +48,6 @@ func (suite *PublishDeploySuiteTestSuite) Test_0_Publish() { ref := suite.Reference.String() stdOut, stdErr, err := e2e.Zarf(suite.T(), "package", "publish", example, "oci://"+ref, "--plain-http") suite.NoError(err, stdOut, stdErr) - suite.Contains(stdErr, "Published "+ref) // Pull the package via OCI. stdOut, stdErr, err = e2e.Zarf(suite.T(), "package", "pull", "oci://"+ref+"/helm-charts:0.0.1", "--plain-http")