Merge branch 'master' into getbinaries-fix-transport

This commit is contained in:
mergify[bot] 2020-11-24 18:28:04 +00:00 committed by GitHub
commit c2c41101cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 11 deletions

View File

@ -98,14 +98,14 @@ func main() {
if err != nil {
log.Fatal(err)
}
err = copyBinaryFromLastLayer(path.Join(imgsDir, imgDir), path.Join(releaseDir, imgDir), binaryToCopy)
err = untarLayers(path.Join(imgsDir, imgDir), path.Join(releaseDir, imgDir), binaryToCopy)
if err != nil {
log.Fatal(err)
}
}
}
func copyBinaryFromLastLayer(src, dest, binaryPath string) error {
func untarLayers(src, dest, binaryPath string) error {
b, err := ioutil.ReadFile(path.Join(src, "manifest.json"))
if err != nil {
return err
@ -114,8 +114,8 @@ func copyBinaryFromLastLayer(src, dest, binaryPath string) error {
if err != nil {
return err
}
last := man.LayerInfos()[len(man.LayerInfos())-1]
layerTar, err := os.Open(path.Join(src, last.Digest.String()[7:]))
for _, l := range man.LayerInfos() {
layerTar, err := os.Open(path.Join(src, l.Digest.String()[7:]))
if err != nil {
return err
}
@ -123,6 +123,7 @@ func copyBinaryFromLastLayer(src, dest, binaryPath string) error {
if err != nil {
return err
}
}
input, err := ioutil.ReadFile(path.Join(src, binaryPath))
if err != nil {

View File

@ -7,6 +7,6 @@
export OSIE_DOWNLOAD_LINK=https://tinkerbell-oss.s3.amazonaws.com/osie-uploads/osie-v0-n=366,c=1aec189,b=master.tar.gz
export TINKERBELL_TINK_SERVER_IMAGE=quay.io/tinkerbell/tink:sha-0e8e5733
export TINKERBELL_TINK_CLI_IMAGE=quay.io/tinkerbell/tink-cli:sha-0e8e5733
export TINKERBELL_TINK_BOOTS_IMAGE=quay.io/tinkerbell/boots:sha-9625559b
export TINKERBELL_TINK_BOOTS_IMAGE=quay.io/tinkerbell/boots:sha-45a64dad
export TINKERBELL_TINK_HEGEL_IMAGE=quay.io/tinkerbell/hegel:sha-c17b512f
export TINKERBELL_TINK_WORKER_IMAGE=quay.io/tinkerbell/tink-worker:sha-0e8e5733