Skip to content

Commit

Permalink
Source Bottlerocket artifacts from new upload location (aws#6703)
Browse files Browse the repository at this point in the history
  • Loading branch information
abhay-krishna committed Sep 19, 2023
1 parent b07acd0 commit bdaca1b
Show file tree
Hide file tree
Showing 7 changed files with 1,703 additions and 948 deletions.
2 changes: 1 addition & 1 deletion release/pkg/assets/archives/archives.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func EksDistroArtifactPathGetter(rc *releasetypes.ReleaseConfig, archive *assett

if rc.DevRelease || rc.ReleaseEnvironment == "development" {
sourceS3Key = fmt.Sprintf("%s.%s", archive.OSName, imageExtension)
sourceS3Prefix = fmt.Sprintf("%s/%s/%s/%s/%s", projectPath, eksDReleaseChannel, archive.Format, archive.OSName, latestPath)
sourceS3Prefix = fmt.Sprintf("%s/%s/%s/%s/%s/%s", projectPath, eksDReleaseChannel, archive.Format, archive.OSName, archive.OSVersion, latestPath)
} else {
sourceS3Key = fmt.Sprintf("%s-%s-eks-d-%s-%s-eks-a-%d-%s.%s",
archive.OSName,
Expand Down
3 changes: 2 additions & 1 deletion release/pkg/assets/archives/archives_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,13 @@ func TestGenerateArchiveAssets(t *testing.T) {
archive: &assettypes.Archive{
Name: "baz",
OSName: "lorem",
OSVersion: "v1.2.3",
Format: "ova",
ArchiveS3PathGetter: EksDistroArtifactPathGetter,
},
wantArchiveArtifact: &releasetypes.ArchiveArtifact{
SourceS3Key: "lorem.ova",
SourceS3Prefix: "projects/foo/bar/1-21/ova/lorem/latest",
SourceS3Prefix: "projects/foo/bar/1-21/ova/lorem/v1.2.3/latest",
ArtifactPath: "artifacts/baz-ova/1-21",
ReleaseName: "lorem-1.21.9-eks-d-1-21-8-eks-a-v0.0.0-dev-build.0-amd64.ova",
ReleaseS3Path: "artifacts/v0.0.0-dev-build.0/eks-distro/ova/1-21/1-21-8",
Expand Down
3 changes: 3 additions & 0 deletions release/pkg/assets/config/bundle_release.go
Original file line number Diff line number Diff line change
Expand Up @@ -596,18 +596,21 @@ var bundleReleaseAssetsConfigMap = []assettypes.AssetConfig{
{
Name: "eks-distro",
OSName: "bottlerocket",
OSVersion: "1",
Format: "ami",
ArchiveS3PathGetter: archives.EksDistroArtifactPathGetter,
},
{
Name: "eks-distro",
OSName: "bottlerocket",
OSVersion: "1",
Format: "ova",
ArchiveS3PathGetter: archives.EksDistroArtifactPathGetter,
},
{
Name: "eks-distro",
OSName: "bottlerocket",
OSVersion: "1",
Format: "raw",
ArchiveS3PathGetter: archives.EksDistroArtifactPathGetter,
},
Expand Down
1 change: 1 addition & 0 deletions release/pkg/assets/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ type Archive struct {
Name string
Format string
OSName string
OSVersion string
ArchitectureOverride string
ArchiveS3PathGetter ArchiveS3PathGenerator
}
Expand Down
14 changes: 7 additions & 7 deletions release/pkg/operations/bundle_release_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,15 @@ func TestGenerateBundleManifest(t *testing.T) {
testName: "Dev-release from main",
buildRepoBranchName: "main",
cliRepoBranchName: "main",
cliMinVersion: "v0.16.0",
cliMaxVersion: "v0.16.0",
cliMinVersion: "v0.17.0",
cliMaxVersion: "v0.17.0",
},
{
testName: "Dev-release from release-0.16",
buildRepoBranchName: "release-0.16",
cliRepoBranchName: "release-0.16",
cliMinVersion: "v0.16.0",
cliMaxVersion: "v0.16.0",
testName: "Dev-release from release-0.17",
buildRepoBranchName: "release-0.17",
cliRepoBranchName: "release-0.17",
cliMinVersion: "v0.17.0",
cliMaxVersion: "v0.17.0",
},
}

Expand Down
1,290 changes: 1,020 additions & 270 deletions release/pkg/test/testdata/main-bundle-release.yaml

Large diffs are not rendered by default.

Large diffs are not rendered by default.

0 comments on commit bdaca1b

Please sign in to comment.