12 Commits

Author SHA1 Message Date
d04bee185a Merge pull request #28 from gianarb/fix/update-aptrepos-tag-workflow
Run apt-update before installing package in the tag workflow
2020-11-24 20:08:31 +01:00
ee992dd8d4 Run apt-update before installing package in the tag workflow
Signed-off-by: Gianluca Arbezzano <gianarb92@gmail.com>
2020-11-24 19:52:15 +01:00
1b408b0f4f Missed docker transport in release-binaries (#26)
Regression from f8cf83f121
2020-11-24 18:30:04 +00:00
c2c41101cb Merge branch 'master' into getbinaries-fix-transport 2020-11-24 18:28:04 +00:00
2db68f09b6 Unpack all image and not just the last layer (#27)
The go program we use to get binaries from a docker image was unpacking
only the last layer. This is not required and in order to have a more
generic approach and fewest requirement the program now unpack all the
image
2020-11-24 16:29:08 +00:00
84f4fa8533 Merge branch 'master' into unpack-all-image 2020-11-24 16:28:31 +00:00
f6b43ada0b Unpack all image and not just the last layer
The go program we use to get binaries from a docker image was unpacking
only the last layer. This is not required and it order to have a more
generic approach and fewest requirement the program now unpack all the
image

Signed-off-by: Gianluca Arbezzano <gianarb92@gmail.com>
2020-11-24 17:12:33 +01:00
2650e324df Missed docker transport in release-binaries
This is a regression introduced here f8cf83f121

Signed-off-by: Gianluca Arbezzano <gianarb92@gmail.com>
2020-11-24 17:08:08 +01:00
e08401172c bump boots to 45a64dad03795133adf7f7177677f3d58a0018e2 (#25)
bump boots to 45a64dad03795133adf7f7177677f3d58a0018e2
2020-11-24 15:44:45 +00:00
87fca37075 bump boots to 45a64dad03795133adf7f7177677f3d58a0018e2
The main reason for this bump is because we fixed multi arch support for
boots binaries. Before docker images were multi arch but boots was
always x86. This issue is not fixed.

Signed-off-by: Gianluca Arbezzano <gianarb92@gmail.com>
2020-11-24 16:41:58 +01:00
1672752d56 Merge pull request #24 from tinkerbell/hotfix/use-current-versions
Use variables set in current_versions.sh as part of script/release-binaries.sh
2020-11-23 20:00:02 +05:30
f8cf83f121 Use variables set in current_versions.sh as part of
script/release-binaries.sh

When writing the release-binary bash script I didn't use the right
variables in current_versions.sh but I fixed those values as part of the
script itself.

Signed-off-by: Gianluca Arbezzano <gianarb92@gmail.com>
2020-11-23 15:22:59 +01:00
4 changed files with 18 additions and 17 deletions

View File

@ -7,7 +7,7 @@ jobs:
release:
runs-on: ubuntu-latest
steps:
- run: sudo apt install -y libgpgme-dev libassuan-dev libdevmapper-dev
- run: sudo apt-get update && sudo apt install -y libgpgme-dev libassuan-dev libdevmapper-dev
- name: Checkout code
uses: actions/checkout@v2
- uses: actions/setup-go@v2

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,14 +114,15 @@ 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:]))
if err != nil {
return err
}
err = tar.Untar(src, layerTar)
if err != nil {
return err
for _, l := range man.LayerInfos() {
layerTar, err := os.Open(path.Join(src, l.Digest.String()[7:]))
if err != nil {
return err
}
err = tar.Untar(src, layerTar)
if err != nil {
return err
}
}
input, err := ioutil.ReadFile(path.Join(src, binaryPath))

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-e81a291c
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

View File

@ -4,25 +4,25 @@ source ./current_versions.sh
go run cmd/getbinariesfromquay/main.go \
-binary-to-copy /usr/bin/hegel \
-image docker://quay.io/tinkerbell/hegel:sha-c17b512f \
-image docker://${TINKERBELL_TINK_HEGEL_IMAGE} \
-program hegel
go run cmd/getbinariesfromquay/main.go \
-binary-to-copy /usr/bin/boots \
-image docker://quay.io/tinkerbell/boots:sha-e81a291c \
-image docker://${TINKERBELL_TINK_BOOTS_IMAGE} \
-program boots
go run cmd/getbinariesfromquay/main.go \
-binary-to-copy /usr/bin/tink-worker \
-image docker://quay.io/tinkerbell/tink-worker:sha-0e8e5733 \
-image docker://${TINKERBELL_TINK_WORKER_IMAGE} \
-program tink-worker
go run cmd/getbinariesfromquay/main.go \
-binary-to-copy /usr/bin/tink-server \
-image docker://quay.io/tinkerbell/tink:sha-0e8e5733 \
-image docker://${TINKERBELL_TINK_SERVER_IMAGE} \
-program tink-server
go run cmd/getbinariesfromquay/main.go \
-binary-to-copy /usr/bin/tink \
-image docker://quay.io/tinkerbell/tink-cli:sha-0e8e5733 \
-image docker://${TINKERBELL_TINK_CLI_IMAGE} \
-program tink