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

move to ghcr registry #382

Merged
merged 1 commit into from
Sep 5, 2023
Merged

Conversation

adityajoshi12
Copy link
Contributor

What this PR does / why we need it:

This PR will start using ghcr.io as the container registry. This will create the explorer and explorer-db container image.

Which issue(s) this PR fixes:

Fixes #348

Special notes for your reviewer:

Does this PR introduce a user-facing change?


Additional documentation, usage docs, etc.:


@adityajoshi12 adityajoshi12 requested a review from a team as a code owner April 16, 2023 13:31
@ArchanaArige
Copy link
Contributor

@vineeth2328 please look into this PR.

@adityajoshi12 adityajoshi12 self-assigned this Apr 20, 2023
@vineethboppudi
Copy link
Contributor

@vineeth2328 please look into this PR.

@ArchanaArige please add me to the reviewers list

context: .
file: ./postgres-Dockerfile
push: true
platforms: linux/amd64,linux/arm64,linux/arm/v7
Copy link
Contributor

Choose a reason for hiding this comment

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

I tried to run release.yaml pipeline and encountered with the below issue.
image

Can you please look into this issue

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed the linux/arm/v7 builds

file: ./Dockerfile
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.image_path_format.outputs.lowercase }}/explorer:${{ steps.vars.outputs.tag }}
Copy link
Member

Choose a reason for hiding this comment

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

Q: Can you please check the auto-version increment step as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

version is based on release tag, anytime a release tag is created, the same will be used as version.

Copy link
Contributor

Choose a reason for hiding this comment

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

Please dont merge this PR as there is a dependency on of the test-case(failing).

Comment on lines +12 to +14
push:
branches:
- main
Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @adityajoshi12 , As per yesterdays (23Aug2023) discussion on this PR, the image build should be triggered only whenever a new release happens(build-and-push-docker-release).
Please look into this and make changes accordingly. Thanks.

Copy link
Contributor Author

@adityajoshi12 adityajoshi12 Aug 24, 2023

Choose a reason for hiding this comment

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

There are two flow in this CI, one is(L62) when anything pushed to the main branch container images will be created with the latest tag, while the other flow(L84) will be invoked on the creation of tags and new container images will be created based on the tag

Copy link
Contributor

Choose a reason for hiding this comment

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

yes, as per the first workflow the image gets created whenever the code is pushed to main branch. As per discussion conclusion yesterday, the build image should happen whenever we create a new release.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

okay, I understood that, but does that mean we will not have images with latest tag.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can run the two workflows. With the first workflow, we would have the images with the latest tag and with the second work flow will have the images with the release tag. However the first - workflow shouldn't be triggered on every push to main. @adityajoshi12 @arsulegai @vineeth2328 Please suggest.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can have a seperate branch dev and all the new commit/PR can be merged to that branch (dev) and after sometime we can merge the dev branch to the main branch. And image with tag latest can be build with main branch

Copy link
Member

Choose a reason for hiding this comment

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

I agree @ArchanaArige , for the time being, let us have a human triggered workflow for the latest tag image creation. Re: Branching strategy, Manoj (mentee) is experimenting something similar and listing down advantages/disadvantages in terms of maintainability.

Copy link
Contributor

Choose a reason for hiding this comment

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

Will discuss about this one in the next call and make a decision. There are some other dependency PRs, once they are merged, then we can go ahead and merge this one too.

@adityajoshi12 adityajoshi12 force-pushed the docker-ci branch 3 times, most recently from 192531d to 078f722 Compare August 30, 2023 12:39
Signed-off-by: Aditya Joshi <adityaprakashjoshi1@gmail.com>
@ArchanaArige
Copy link
Contributor

Tested the PR with the new changes in the forked repo.
Steps:

  1. Copied the release.yaml in the forked repo.
  2. Created a new tag
  3. Then the images(explorer + explorer-db) got created with the release tag and latest tag
  4. Made some code changes and pushed to the main of same repo
  5. The workflow didnt get trigger and tried running it manually
  6. The observed result was "The job got skipped"
    For the manual triggering, the images are not getting created with latest tag. Please check and confirm.

@adityajoshi12
Copy link
Contributor Author

This is the expected behavior. The images will be created for release tags only. There is a check that looks for the tag and skips the workflow, if the tag is not present.

@ArchanaArige
Copy link
Contributor

This is the expected behavior. The images will be created for release tags only. There is a check that looks for the tag and skips the workflow, if the tag is not present.

ok. Thanks a lot @adityajoshi12.

@ArchanaArige ArchanaArige merged commit 898da7e into hyperledger-labs:main Sep 5, 2023
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.

moving container images from docker to ghcr registry
4 participants