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

Pipeline for releasing Docker init container #116

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

kilmajster
Copy link

@kilmajster kilmajster commented Oct 25, 2021

Hi, I've created Github action based pipeline that allows to promote release by Github release form. It adds built jar file into Github release and also creates and publishes init container into Docker hub. To make this 100% working you'd need to have account on Docker hub and create repo for this project, then create token that will allow the pipeline to publish image into Docker hub. Token from Docker hub should be added to this Github repo as repository secret called DOCKER_HUB_TOKEN. Working test release can be found in my fork here
If you need more details about configuration, just let me know :)

Regards, Łukasz Włódarczyk

Motivation

#34

What

Pipeline that publishes jar into Github releases and init container into Docker hub

Why

To allow using this provider with Helm charts

How

Release process with this pipeline looks like following:

  1. You create new tag using standard Github release mechanism, e.g. tag = 2.5.3
  2. Pipeline is executing tests
  3. Pipeline sets project version based on git tag and build jar
  4. Jar file is added into Github release
  5. Jar file is added into Docker image
  6. Docker image is tagged same as Github tag and also as latest
  7. Docker images are pushed into Docker hub

Verification Steps

You can verify that jar is added into Github release in my fork here
To verify if docker container contains jar file you can do following:

docker run --rm -it --entrypoint sh kilmajster/keycloak-metrics-spi

# then into docker container
 cd keycloak-metrics-spi
 ls -al
 
 # and also for eg. to verify if version is set correctly
 
 unzip keycloak-metrics-spi-2.5.3.jar
 
 ...
 
 cat META-INF/MANIFEST.MF

Checklist:

  • Code has been tested locally by PR requester
  • Changes have been successfully verified by another team member

Progress

  • Finished task

Additional Notes

@pb82
Copy link
Contributor

pb82 commented Nov 2, 2021

thanks @kilmajster , this is really nice! I'll have a look through it this week and hopefully we can merge it.

@kilmajster
Copy link
Author

Do Jankinsfile will be still needed with this pipeline or I can remove it as well?

@sbaerlocher
Copy link

@kilmajster @pb82 Is there already more infos what this PR can be merged?

@kilmajster
Copy link
Author

Hi @sbaerlocher, this PR seems to be little bit forgotten ;) I merged it with upstream and promoted test release to confirm that is still working (pipeline: https://github.com/kilmajster/keycloak-metrics-spi/runs/5828438512?check_suite_focus=true and docker: https://hub.docker.com/repository/docker/kilmajster/keycloak-metrics-spi). I am not a member of the project so I can't merge it.

@pb82 I saw that pom.xml was added, if you are switching to this project to maven I can change this pipeline to maven one. Also in my similar personal project I got pipeline that is able to release artifact to maven central, so if you are interested in such mechanism I will be happy to help with this :)

@james-callahan
Copy link

I'd love to see this (or something like it) merged.

It looks like it needs a rebase at the moment?

# Conflicts:
#	README.md
#	build.gradle
#	gradle.properties
@kilmajster
Copy link
Author

kilmajster commented Jun 5, 2023

is up to date now :)

@james-callahan
Copy link

is up to date now :)

Looks like it may need to be rebased again since the 4.0.0 release

@diversit would you be able to review/merge this?
It'd be a huge help for us manage a deployment of keycloak-metrics-spi

@diversit
Copy link
Contributor

diversit commented Aug 9, 2023 via email

@james-callahan
Copy link

I am happy to review but I’m on holiday now so that would be end of august earliest.

It's the end of August now :)
@diversit would you be able to review? Do you need @kilmajster to rebase?

@diversit
Copy link
Contributor

diversit commented Aug 29, 2023 via email

# Conflicts:
#	build.gradle
#	gradle.properties
#	pom.xml
@kilmajster
Copy link
Author

I've synced my changes with an upstream and also bumped java version to 17 in the release job - here is a pipeline I ran to promote test release with my personal docker hub creds https://github.com/kilmajster/keycloak-metrics-spi/actions/runs/6016566819/job/16320824108

@james-callahan
Copy link

@diversit ping?

@lerminou
Copy link

hi, any news for this topic ?

@alexted
Copy link

alexted commented Nov 7, 2024

@kilmajster Is this PR still relevant?

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.

7 participants