diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-03-30 17:09:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-30 17:09:58 +0200 |
commit | f7ad9fbd9e334b5daf9f3af9160cc8fab82255d6 (patch) | |
tree | 8dfb5e8caf621686737abcf43d76bbb9412b5b6b /pkg/machine/fcos_arm64.go | |
parent | 5e28b35aa511e699dffb2172458fda35ac01a4d2 (diff) | |
parent | b6089a5e9967b239348afcce452c8aa82df53ccf (diff) | |
download | podman-f7ad9fbd9e334b5daf9f3af9160cc8fab82255d6.tar.gz podman-f7ad9fbd9e334b5daf9f3af9160cc8fab82255d6.tar.bz2 podman-f7ad9fbd9e334b5daf9f3af9160cc8fab82255d6.zip |
Merge pull request #9873 from baude/correctaarch64
resolve proper aarch64 image names
Diffstat (limited to 'pkg/machine/fcos_arm64.go')
-rw-r--r-- | pkg/machine/fcos_arm64.go | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/pkg/machine/fcos_arm64.go b/pkg/machine/fcos_arm64.go index 4d7e4e4db..f5cd5a505 100644 --- a/pkg/machine/fcos_arm64.go +++ b/pkg/machine/fcos_arm64.go @@ -2,9 +2,9 @@ package machine import ( "encoding/json" - "fmt" "io/ioutil" "net/http" + url2 "net/url" "github.com/sirupsen/logrus" ) @@ -14,9 +14,7 @@ const aarchBaseURL = "https://fedorapeople.org/groups/fcos-images/builds/latest/ // Total hack until automation is possible. // We need a proper json file at least to automate func getFCOSDownload() (*fcosDownloadInfo, error) { - meta := Build{} - fmt.Println(aarchBaseURL + "meta.json") resp, err := http.Get(aarchBaseURL + "meta.json") if err != nil { return nil, err @@ -33,8 +31,18 @@ func getFCOSDownload() (*fcosDownloadInfo, error) { if err := json.Unmarshal(body, &meta); err != nil { return nil, err } + pathURL, err := url2.Parse(meta.BuildArtifacts.Qemu.Path) + if err != nil { + return nil, err + } + + baseURL, err := url2.Parse(aarchBaseURL) + if err != nil { + return nil, err + } + pullURL := baseURL.ResolveReference(pathURL) return &fcosDownloadInfo{ - Location: aarchBaseURL + "/" + meta.BuildArtifacts.Qemu.Path, + Location: pullURL.String(), Release: "", Sha256Sum: meta.BuildArtifacts.Qemu.Sha256, }, nil |