Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add multi-arch image(amd64 and s390x) build and publish #23

Merged
merged 1 commit into from
Sep 11, 2020

Conversation

barthy1
Copy link
Contributor

@barthy1 barthy1 commented Aug 6, 2020

The updates:

  • build script was extended to build and publish images with arch
    information in tag (based on TRAVIS_CPU_ARCH env variable value),
    default is amd64
  • in build script NEXT_TAG is generated only for amd64, because
    container image to get the value is amd64 only - alpine/semver:5.5.0.
    For s390x this value is stored in Travis workspace (or local file called
    tag.txt)
  • git push will work for amd64 only (to avoid push duplicates)
  • multi-arch-image script was added to create and push multi-arch
    manifest to dockerhub, joining together separate images for different
    architectures. At this moment amd64 and s390x are added.
  • Travis configuration file was extended to have 3 stages:
    • build amd64 images
    • build s390x images
    • generate multi-arch images based on previous stages
  • workspace usage was added to Travis config to persist NEXT_TAG data,
    as this value can be received only for amd64 case. s390x is just used it
    after from workspace tag.txt file

Tested for master branch path in Travis

@ozbillwang
Copy link
Contributor

Thanks, @barthy1

This looks really big change !

I don't have other environments (such as s390x), how can I verify your change?

@barthy1
Copy link
Contributor Author

barthy1 commented Aug 6, 2020

hey @ozbillwang, thank you for quick response.
Sorry for this large piece of update :(

Which part you would like to verify?
Travis has s390x hardware, and the PR code was tested at least for image build for amd64 and s390x archs.
I also can share my Travis job results with the code for image's build and making multi-arch image.

You can also have a look to my dockerhub with multi-arch image I built using the PR code https://hub.docker.com/repository/docker/barthy/git/tags?page=1
You can pull the image to your amd64 linux machine and corresponding amd64 vesion of the image will be pulled.

…t image

- build script was extended to build and publish images with arch
information in tag (based on TRAVIS_CPU_ARCH env variable value),
default is amd64
- in build script NEXT_TAG is generated only for amd64, because
container image to get the value is amd64 only - alpine/semver:5.5.0.
For s390x this value is stored in Travis workspace (or local file called
tag.txt)
- git push will work for amd64 only (to avoid push duplicates)
- multi-arch-image script was added to create and push multi-arch
manifest to dockerhub, joining together separate images for different
architectures. At this moment amd64 and s390x are added.
- Travis configuration file was extended to have 3 stages:
  - build amd64 images
  - build s390x images
  - generate multi-arch images based on previous stages
- workspace usage was added to Travis config to persist NEXT_TAG data,
as this value can be received only for amd64 case. s390x is just used it
after from workspace tag.txt file

Signed-off-by: Yulia Gaponenko <[email protected]>
@ozbillwang
Copy link
Contributor

ozbillwang commented Aug 6, 2020

can you share your travis build link? Try to access this url https://travis-ci.org/github/barthy1/git, but failed.

Screen Shot 2020-08-06 at 9 21 41 pm

@barthy1
Copy link
Contributor Author

barthy1 commented Aug 6, 2020

https://travis-ci.com/github/barthy1/git/builds/178733123

@ozbillwang
Copy link
Contributor

Seems its build is similar as normal linux.

Let me think if I can add a test, for example, use the latest build git image for s390, show git versionn and git clone a repo

@barthy1
Copy link
Contributor Author

barthy1 commented Aug 7, 2020

It would be great, thank you. Please let me know if I can help.
Or test something on s390x hardware for you.

@barthy1
Copy link
Contributor Author

barthy1 commented Aug 11, 2020

hey @ozbillwang any updates or ideas how I can help?
One input from my side, actually in the process of s390x image build there is already the step where s390x image is running and returns git version - https://github.com/alpine-docker/git/pull/23/files#diff-0b83f9dedf40d7356e5ca147a077acb4R33
If you think it makes sense, I can add in my PR the test step in Travis after multi-arch image creation to pull images for both archs, run them and do git clone ?

@barthy1
Copy link
Contributor Author

barthy1 commented Sep 8, 2020

hi @ozbillwang just want to check if this PR is still on the table? Please, let me know, if I need to change/update/add something.

@ozbillwang
Copy link
Contributor

ozbillwang commented Sep 8, 2020

@barthy1

Thanks for reminding.

I am not that confidence to support this feature. I pop an idea to add you with write permission as maintainer in this rep, are you fine for this. In the future, any bugs/features about Multi-arch, you can help to support me?

I added you in Linkedin, please accept and share me your mailbox.

update 1

Wait, I doesn't need your mailbox, I can add your account directly in github, let me try

update 2

Invitation has been sent to you.

@barthy1
Copy link
Contributor Author

barthy1 commented Sep 9, 2020

@ozbillwang I am ok to support you with multi-arch bugs/features for https://github.com/alpine-docker/git
Invitation is accepted.

@barthy1
Copy link
Contributor Author

barthy1 commented Sep 9, 2020

So, do you feel that this PR can be merged?

@ozbillwang
Copy link
Contributor

@barthy1

Yes, let's merge it.

@ozbillwang ozbillwang merged commit 7f4a7b5 into alpine-docker:master Sep 11, 2020
@ozbillwang
Copy link
Contributor

@barthy1

Please review the build jobs, they are fine, but just double check

https://travis-ci.org/github/alpine-docker/git/builds

@barthy1
Copy link
Contributor Author

barthy1 commented Sep 11, 2020

I reviewed the build jobs, lgtm.
I also verified s390x and amd64 parts of alpine/git:latest, alpine/git:v2.26.2 and alpine/git:1.0.18. All images are accessible and runnable for both architectures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants