Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.

che #13813: Pushing rhel images to 'quay.io/openshiftio' and centos images to 'quay.io/eclipse-che' during the CI build #31

Merged
merged 1 commit into from
Jul 11, 2019

Conversation

ibuziuk
Copy link
Member

@ibuziuk ibuziuk commented Jul 11, 2019

What does this PR do?

Pushing rhel images to 'quay.io/openshiftio' and centos images to 'quay.io/eclipse-che' during the CI build

What issues does this PR fix or reference?

eclipse-che/che#13813

Should be merged only once dedicated cico job pr is merged - openshiftio/openshiftio-cico-jobs#1035

@ibuziuk
Copy link
Member Author

ibuziuk commented Jul 11, 2019

The only thing I'm not sure about - are we already pushing rhel (not centos) images to quay.io/openshiftio - https://quay.io/repository/openshiftio/che-devfile-registry?tab=tags ?
the image name is che-devfile-registry and I would expect that rhel image name would be rhel-che-devfile-registry

@ibuziuk ibuziuk changed the title rh-che #13813: Pushing rhel images to 'quay.io/openshiftio' and centos images to 'quay.io/eclipse-che' during the CI build che #13813: Pushing rhel images to 'quay.io/openshiftio' and centos images to 'quay.io/eclipse-che' during the CI build Jul 11, 2019
docker build -t ${IMAGE} -f ${DOCKERFILE} .

TAG=$(echo "$GIT_COMMIT" | cut -c1-"${DEVSHIFT_TAG_LEN}")

tag_push "${REGISTRY}/openshiftio/$IMAGE:$TAG"
tag_push "${REGISTRY}/openshiftio/$IMAGE:latest"
echo 'CICO: Image pushed, ready to update deployed app'
echo "CICO: Images pushed to 'quay.io/openshiftio', ready to update deployed app"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few suggestions:

  • I don't think you should login/push to quay.io/eclipse-che if the "$TARGET" == "rhel"
  • You don't need to the docker build twice
  • I would avoid tagging the images as latest because that should be done when we do the release of Che every 3 weeks (especially for eclipse-che org)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And do we really need to push centos images to both openshiftio and eclipse-che?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you should login/push to quay.io/eclipse-che if the "$TARGET" == "rhel"
You don't need to the docker build twice

Maybe I'm missing smth but in the issue description there is - Update che-devfile-registry-master CentOS CI job to push rhel images to quay.io/openshiftio and centos images to quay.io/eclipse-che and my understanding is that master CI job always build 'rhel for now, right?. So, I do not really understand how we can avoid building and pushing images twice if we want CentOS images beeing build as part of the same job

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is actually related to my question in my first question in the PR - #31 (comment)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If what you are saying was true ($TARGET is always "rhel") the script would build rhel images only (the script does only one docker build). But we know that this is not the case because we see that centos images are pushed to the registry right?

So I think that this script is called twice: once with not specific $TARGET and once with TARGET=rhel. And we should double check with SD team but I suspect that we (you and I) do not have the privileges to see the rhel images even if they are pushed in that org.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another thing I would add in this PR is an update to the README file to use the eclipse-che org images instead of the openshiftio.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I think that this script is called twice: once with not specific $TARGET and once with TARGET=rhel

@l0rd looks like this is the case (script is called twice with & without the target), because:

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ibuziuk
Copy link
Member Author

ibuziuk commented Jul 11, 2019

@l0rd PR has been updated:

I plan to add yet another commit with docs & build instructions but before want to clarify your point around latest tag.
Basically, all the instructions in Readme are currently depended on this tag: e.g.:

if brand-new quay.io/eclipse-che/che-devfile-registry will not contain the latest tag, which one should be used ?

@benoitf
Copy link
Contributor

benoitf commented Jul 11, 2019

centos images will be pushed to quay.io/eclipse-che/rhel-che-devfile-registry

why name is rhel-something if it's centos ?

@ibuziuk
Copy link
Member Author

ibuziuk commented Jul 11, 2019

@benoitf sorry, typo - updated

@benoitf
Copy link
Contributor

benoitf commented Jul 11, 2019

just a small note, on dockerhub we had eclipse/che-something as org was eclipse.
but on quay.io now with eclipse-che org, do we still che in image name ?

eclipse-che/che-devfile-registry --> eclipse-che/devfile-registry ?

@ibuziuk
Copy link
Member Author

ibuziuk commented Jul 11, 2019

@benoitf che-devfile-registry is the repo name so, I personally would expect to have the very same name for docker image, but I do understand your concern

@benoitf
Copy link
Contributor

benoitf commented Jul 11, 2019

@ibuziuk then it would mean quay org should the same than github org or that we move to eclipse-che org on github as well (it's possible to have its own 'eclipse' org so it could be a good idea as well so we cleary see only repositories linked to che)

@ibuziuk
Copy link
Member Author

ibuziuk commented Jul 11, 2019

@benoitf agree, https://quay.io/organization/eclipse would be more logical
@l0rd wdyt ?

Copy link
Contributor

@rhopp rhopp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@l0rd
Copy link
Contributor

l0rd commented Jul 11, 2019

I think eclipse organisation makes more sense as well. But didn't knew if we had the time to move to that org.

For the change to latest I am proposing to:

  1. stop tagging every build as latest (without actually changing the README etc...) => in this PR
  2. start tagging nightlies with the new cron job and update the README etc...to use nigthlies
  3. start tagging releases every 3 weeks as latest

But if you want to stay on the safe side (meaning that we want to make sure that the README will always point to the latest build) you should swap 1. and 2. and do that in separate PRs.

@l0rd
Copy link
Contributor

l0rd commented Jul 11, 2019

Anyway LGTM for the changes you have made so far

…s images to 'quay.io/eclipse-che' during the CI build

Signed-off-by: Ilya Buziuk <[email protected]>
@ibuziuk
Copy link
Member Author

ibuziuk commented Jul 11, 2019

I think eclipse organisation makes more sense as well. But didn't knew if we had the time to move to that org.

Indeed looks like we do not have time for moving from one org to anoter and setup ci bots for those

stop tagging every build as latest (without actually changing the README etc...) => in this PR

Done

@l0rd sounds good, so no docs update in this PR. Could you please approve if you are ok to merge it in the current state.

P.S.

So I think that this script is called twice: once with not specific $TARGET and once with TARGET=rhe

checked with SD and indeed ci_cmd command is executed twice (for rhel and centos builds) - https://github.com/openshiftio/openshiftio-cico-jobs/blob/master/devtools-ci-index.yaml#L880-L909

Copy link
Contributor

@l0rd l0rd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ibuziuk ibuziuk merged commit a09926b into eclipse-che:master Jul 11, 2019
@ibuziuk
Copy link
Member Author

ibuziuk commented Jul 11, 2019

https://quay.io/repository/eclipse-che/che-devfile-registry?tab=tags \o/
prod-preview has been also updated successfully \o/

monaka added a commit that referenced this pull request Apr 29, 2020
Ohrimenko1988 added a commit that referenced this pull request Jun 5, 2020
Signed-off-by: Ihor Okhrimenko <[email protected]>
sparkoo pushed a commit to sparkoo/che-devfile-registry that referenced this pull request Dec 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants