Skip to content

Build OCI image for each supported Erlang major version #3143

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

Merged
merged 4 commits into from
Jun 24, 2021
Merged

Conversation

ansd
Copy link
Member

@ansd ansd commented Jun 24, 2021

As requested by @gerhard in #2777 (comment), auto-build OCI images for both Erlang 23 and 24.

Therefore, this job will create two images

  1. for minimum required OTP
  2. for maximum supported OTP

Each image will have two tags

  1. git commit sha (i.e. the tip of the branch as requested by @michaelklishin)
  2. branch name (this stable tag gets used for example in https://github.com/rabbitmq/cluster-operator/blob/a74ec732f31303c1e94f3ec30f3eb77961113c96/.github/workflows/pr.yml#L55).

For example, for Git commit SHA 1111aaa and branch name main, the following two docker images and four tags will be pushed to DockerHub:

  • 1111aaa-otp-min (image 1)
  • main-otp-min (image 1)
  • 1111aaa-otp-max (image 2)
  • main-otp-max (image 2)

(While we could have used tag main-otp-24.0.2 instead of main-otp-max, I prefer the latter option since we can use that stable tag when specifying the RabbitMQ image in pipelines or LREs.)

Needs to be backported to v3.9.x and v3.8.x.

ansd added 2 commits June 24, 2021 13:48
Command `make push` pushes an image tagged VERSION where VERSION in our
oci.yaml corresponds to the Git commit SHA.

`make push IMAGE_TAG=<additional tag>` pushes two images:
1. tag VERSION
2. tag <additional tag> (branch name in oci.yaml)

Before this commit, the same image got pushed 3 times as seen in
https://github.com/rabbitmq/rabbitmq-server/pull/3137/checks?check_run_id=2885095969:
docker push ***/rabbitmq:46f6d81ad06a9b0b34a791a7fd078c45d66e1196
docker push ***/rabbitmq:46f6d81ad06a9b0b34a791a7fd078c45d66e1196
docker push ***/rabbitmq:46f6d81ad06a9b0b34a791a7fd078c45d66e1196
docker push ***/rabbitmq:faster-binding-recovery

After this commit we expect the follwing pushes:
docker push ***/rabbitmq:46f6d81ad06a9b0b34a791a7fd078c45d66e1196
docker push ***/rabbitmq:faster-binding-recovery
1. with minimum required Erlang
2. with maximum supported Erlang
@lhoguin
Copy link
Contributor

lhoguin commented Jun 24, 2021

Hm maybe instead of min/max we could have max, max-1 and max-2. We currently support only 23 and 24 but I think that is unusual and we typically support up to 3 major versions?

ansd added 2 commits June 24, 2021 16:20
as suggested by @lhoguin.

Right now (June 2021), we support only Erlang 23 and 24.
In future, we might support 3 Erlang major versions.
This is useful when iterating on and testing the oci.yaml.
@ansd
Copy link
Member Author

ansd commented Jun 24, 2021

Good idea @lhoguin. I pushed a commit implementing that.

@ansd ansd changed the title Build OCI images with min and max supported OTP versions Build OCI image for each supported Erlang major version Jun 24, 2021
@michaelklishin
Copy link
Collaborator

We support two series and when we can, three for a 3 month long transition period. Still, N and N-1 is a good naming pattern to follow 👍

@gerhard
Copy link
Contributor

gerhard commented Jun 24, 2021

This is awesome! Thank you @ansd 👏

cc @Zerpet for the big-picture OCI view

@gerhard gerhard merged commit f46a267 into master Jun 24, 2021
@gerhard gerhard deleted the oci-matrix branch June 24, 2021 15:56
@gerhard
Copy link
Contributor

gerhard commented Jun 24, 2021

Can someone backport to v3.9.x & v3.8.x please?

ansd added a commit to rabbitmq/cluster-operator that referenced this pull request Jun 25, 2021
rabbitmq/rabbitmq-server#3143 enables us to
run system tests against latest rabbitmq-server master ensuring we're
compatible with our Erlang supported versions as documented in
https://www.rabbitmq.com/which-erlang.html
ansd pushed a commit that referenced this pull request Jun 25, 2021
Build OCI image for each supported Erlang major version

(cherry picked from commit f46a267)
ansd pushed a commit that referenced this pull request Jun 25, 2021
Build OCI image for each supported Erlang major version

(cherry picked from commit f46a267)
@ansd
Copy link
Member Author

ansd commented Jun 25, 2021

Backported to v3.9.x and v3.8.x.

gerhard added a commit that referenced this pull request Jun 28, 2021
It includes the Erlang/OTP version since #3143

Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
gerhard added a commit that referenced this pull request Jun 29, 2021
It includes the Erlang/OTP version since #3143

Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants