Skip to content

Commit

Permalink
Fix packages artifacts map assignment, bubble up errors returned (#7838)
Browse files Browse the repository at this point in the history
  • Loading branch information
abhay-krishna authored Mar 13, 2024
1 parent 5c2d6c0 commit 4291c5c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 5 additions & 1 deletion release/cli/pkg/helm/helm.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ func GetHelmDest(d *helmDriver, r *releasetypes.ReleaseConfig, ReleaseImageURI,
}

pwd, err := os.Getwd()
dest := filepath.Join(pwd, assetName)
if err != nil {
return "", fmt.Errorf("getting current working dir: %w", err)
}
dest := filepath.Join(pwd, assetName)
fmt.Printf("Untar helm chart %s into %s\n", chartPath, dest)
err = UnTarHelmChart(chartPath, assetName, dest)
if err != nil {
Expand Down Expand Up @@ -140,6 +140,10 @@ func ModifyAndPushChartYaml(i releasetypes.ImageArtifact, r *releasetypes.Releas
// If the chart is packages, we find the image tag values and overide them in the values.yaml.
if strings.Contains(helmDest, "eks-anywhere-packages") {
imageTagMap, err := GetPackagesImageTags(eksaArtifacts)
if err != nil {
return fmt.Errorf("getting packages image tags: %w", err)
}

fmt.Printf("Overwriting helm values.yaml version to new image tags %v\n", imageTagMap)
err = OverWriteChartValuesImageTag(helmDest, imageTagMap)
if err != nil {
Expand Down
1 change: 0 additions & 1 deletion release/cli/pkg/operations/upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ func UploadArtifacts(ctx context.Context, r *releasetypes.ReleaseConfig, eksaArt
packagesArtifacts := map[string][]releasetypes.Artifact{}
if isBundleRelease {
projectsInBundle := []string{"eks-anywhere-packages"}
packagesArtifacts := map[string][]releasetypes.Artifact{}
for _, project := range projectsInBundle {
projectArtifacts, err := r.BundleArtifactsTable.Load(project)
if err != nil {
Expand Down

0 comments on commit 4291c5c

Please sign in to comment.