Skip to content

Commit

Permalink
Merge pull request #238 from ubuntu/fix-build-wsl
Browse files Browse the repository at this point in the history
Adapts the image base name to the new pipeline
  • Loading branch information
CarlosNihelton authored Jul 22, 2022
2 parents 18a94ac + 6ea79c0 commit 713809f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion wsl-builder/prepare-build/buildGHMatrix.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,14 @@ func buildGHMatrix(csvPath, metaPath string) error {
}
// Currently only Kinetic (22.10) and later are published to "https://cloud-images.ubuntu.com/wsl/"
codeNameSubUri := r.CodeName
imageBaseName := fmt.Sprintf("%s-server-cloudimg", r.CodeName)
if strings.Compare(r.BuildVersion, "2210") >= 0 {
codeNameSubUri = filepath.Join("wsl", r.CodeName)
// The image base name scheme also changed.
imageBaseName = fmt.Sprintf("ubuntu-%s-wsl", r.CodeName)
}

t += fmt.Sprintf("https://cloud-images.ubuntu.com/%s/current/%s-server-cloudimg-%s-wsl.rootfs.tar.gz::%s", codeNameSubUri, r.CodeName, arch, arch)
t += fmt.Sprintf("https://cloud-images.ubuntu.com/%s/current/%s-%s-wsl.rootfs.tar.gz::%s", codeNameSubUri, imageBaseName, arch, arch)
rootfses += t
}

Expand Down

0 comments on commit 713809f

Please sign in to comment.