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

Dockerfile to set up the environment needed to run a GWC release #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

aaime
Copy link
Member

@aaime aaime commented Aug 21, 2024

Here is a first tentative to make the GWC release process repeatable by others.
The Dockefile takes care of various "magic" bits that are needed to run the release scripts and the tools nowadays.

The image can be built using:

docker build -t gwc_release:0.1 .

and then run passing the git identifications as env vars:

docker run -it -e GIT_USERNAME="user" -e GIT_EMAIL="[email protected]" gwc_release:0.1

Once started, one has to hand-edit the /root/.m2/settings.xml file to add the repo.osgeo.org (maybe we could make this also as part of the docker run command above?).

Finally, in order to tag at the end, one needs to create a github personal access token that will be used as the password for that step (go to your user settings, developer settings, and create a persona access token). This could also be avoided by replacing with a step to copy over the identification certificate, and then checkout GWC using the ssh URL.

As a final note, running it as above, the container will cease to exist once one exists, which is annoying as one as to redo various things by hand, and the maven repository has to be filled again. Would be probably nicer if the docker container could just stay there, be stopped and restarted on a as-needed basis.

@jodygarnett @smithkm @petersmythe can you review and possibly help to make this better?

@petersmythe
Copy link

Once started, one has to hand-edit the /root/.m2/settings.xml file to add the repo.osgeo.org (maybe we could make this also as part of the docker run command above?).

@aaime which credentials are these? My personal credentials (peterafrigis), in which case, do I need to ask for write access to the GWC repo?

As a final note, running it as above, the container will cease to exist once one exists, which is annoying as one as to redo various things by hand, and the maven repository has to be filled again. Would be probably nicer if the docker container could just stay there, be stopped and restarted on a as-needed basis.

I will investigate and provide a solution.

I am still trying to get the ruby release.rb command to work - it appears as though git cannot check out the gwc branch.

I, [2024-09-17T10:17:30.505954 #110]  INFO -- : Starting Git
reset(["1.26.x"],"origin")
I, [2024-09-17T10:17:30.506174 #110]  INFO -- git: Reseting branches to upstream
I, [2024-09-17T10:17:30.509445 #110]  INFO -- : git '--git-dir=/root/geowebcache/.git' '--work-tree=/root/geowebcache' '-c' 'core.quotePath=true' '-c' 'color.ui=false' 'version'  2
>&1
I, [2024-09-17T10:17:30.512899 #110]  INFO -- : git '--git-dir=/root/geowebcache/.git' '--work-tree=/root/geowebcache' '-c' 'core.quotePath=true' '-c' 'color.ui=false' 'config' '--
list'  2>&1
I, [2024-09-17T10:17:31.236302 #110]  INFO -- : git '--git-dir=/root/geowebcache/.git' '--work-tree=/root/geowebcache' '-c' 'core.quotePath=true' '-c' 'color.ui=false' 'fetch' '--'
 'origin'  2>&1
I, [2024-09-17T10:17:31.236396 #110]  INFO -- git: Reseting 1.26.x
I, [2024-09-17T10:17:31.240990 #110]  INFO -- : git '--git-dir=/root/geowebcache/.git' '--work-tree=/root/geowebcache' '-c' 'core.quotePath=true' '-c' 'color.ui=false' 'checkout' '
1.26.x'  2>&1
Traceback (most recent call last):
        8: from ../gwc-release/release.rb:614:in `<main>'
        7: from ../gwc-release/release.rb:614:in `each'
        6: from ../gwc-release/release.rb:623:in `block in <main>'
        5: from ../gwc-release/release.rb:422:in `reset'
        4: from ../gwc-release/release.rb:422:in `each'
        3: from ../gwc-release/release.rb:424:in `block in reset'
        2: from /usr/local/bundle/gems/git-1.19.1/lib/git/base.rb:360:in `checkout'
        1: from /usr/local/bundle/gems/git-1.19.1/lib/git/lib.rb:824:in `checkout'
/usr/local/bundle/gems/git-1.19.1/lib/git/lib.rb:1223:in `command': git '--git-dir=/root/geowebcache/.git' '--work-tree=/root/geowebcache' '-c' 'core.quotePath=true' '-c' 'color.ui
=false' 'checkout' '1.26.x'  2>&1 (Git::FailedError)
status: pid 127 exit 1
output: "error: pathspec '1.26.x' did not match any file(s) known to git\\n"
root@92e1924f73d6:~/geowebcache# git branch
* main

@aaime
Copy link
Member Author

aaime commented Sep 17, 2024

The maven credentials are used for the OSGeo repository. I believe you have to use your OSGeo login there, and be enabled to deploy jars there (@jodygarnett set it up for me if I remember correctly).

About the ruby command... hum... the 1.26.x branch is still not there, are you following the instructions for the creating a new branch case?
That said, I don't remember using those recently myself either, @jodygarnett might have done it and maybe he remembers if there is any extra manual step to be carried out?

@petersmythe
Copy link

@jodygarnett @smithkm @petersmythe can you review and possibly help to make this better?

My input: aaime#1

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.

2 participants