Upgrade fluxcd/pkg packages
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
This commit is contained in:
@@ -92,6 +92,15 @@ func pullArtifactCmdRun(cmd *cobra.Command, args []string) error {
|
||||
opts = append(opts, crane.Insecure)
|
||||
}
|
||||
|
||||
if pullArtifactArgs.provider.String() != sourcev1.GenericOCIProvider {
|
||||
logger.Actionf("logging in to registry with provider credentials")
|
||||
opt, err := loginWithProvider(ctx, url, pullArtifactArgs.provider.String())
|
||||
if err != nil {
|
||||
return fmt.Errorf("error during login with provider: %w", err)
|
||||
}
|
||||
opts = append(opts, opt)
|
||||
}
|
||||
|
||||
ociClient := oci.NewClient(opts)
|
||||
|
||||
if pullArtifactArgs.provider.String() == sourcev1.GenericOCIProvider && pullArtifactArgs.creds != "" {
|
||||
@@ -101,13 +110,6 @@ func pullArtifactCmdRun(cmd *cobra.Command, args []string) error {
|
||||
}
|
||||
}
|
||||
|
||||
if pullArtifactArgs.provider.String() != sourcev1.GenericOCIProvider {
|
||||
logger.Actionf("logging in to registry with provider credentials")
|
||||
if err := ociClient.LoginWithProvider(ctx, url, pullArtifactArgs.provider.String()); err != nil {
|
||||
return fmt.Errorf("error during login with provider: %w", err)
|
||||
}
|
||||
}
|
||||
|
||||
logger.Actionf("pulling artifact from %s", url)
|
||||
|
||||
meta, err := ociClient.Pull(ctx, url, pullArtifactArgs.output)
|
||||
|
||||
Reference in New Issue
Block a user