grouper-users - Re: [grouper-users] git commands for building docker image
Subject: Grouper Users - Open Discussion List
List archive
- From: "Redman, Chad" <>
- To: Cisco ROS <>
- Subject: Re: [grouper-users] git commands for building docker image
- Date: Fri, 18 Sep 2020 04:38:10 +0000
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=unc.edu; dmarc=pass action=none header.from=unc.edu; dkim=pass header.d=unc.edu; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yMM056vxjC5y02Hzv7MSObn9h8tXWnh3u2V7CwsQh90=; b=hL87HoYszdKqJjeX5ecIKzglAIgjF7aey4EBzpjYgTIeh1fu1KqXwmtsjNggapN9Xjz5hVCaM85zkKFyO1TLR/xpb/EgWVwoZS+94sl2XQZt60e34xWZYVPXiZX1QJBsvJRNYD2FVj2v2sNicpNt4XExn+x/9vIqeas0QtVb9xNGYCJRKzSr6dg3XyDQq9VtQwQQoV72cn3tnZoWymvP/4nxlqzBthgW3Hz0lkPcOQAoUWleT4occlmnKibJZ/zryKFXCVHmrNe2y6mGQ05dM2RtvW/VOGs9+V0JR8vccRuUfKWtG/SAxSv9xGG0OsQj0wWqFw9KqoxZHpLqExx6QA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dxZ+4OOyBQ2FfSEtr/nqWPepYOSw96+p9muzUdjZbDXoRQwOqUDr5rmfgHmRS2gNNg+gXu+KkU3nobS8RD+gwduQ5DcVSBqfqNaJEqkBhD70P5rsX67LkcLvSo8nIh1p1TOJjkUqFlWOFlCCTVNNjrfLrypE1aBOKBqHj65bClDjYuKrUhTc3OIhf89amsj5QCWyyDOD2H5hxeF7IwOL0zdsJ35DNcCv+utU478S7uXUH25Bj+3O2ZCgk1qBL9E+Iug1Pc3BpuxJrxj76x4njGBPXI5I31fV5A1M6B+IDz0mO52gSJj3VsQ1o/EuRfnoN5jk3b/YVGjw61Xrd08gBQ==
The original message didn't get to my inbox, so I'm copy/pasting it from the web archive.
You should consider these as two independent projects. The Grouper build and the Docker image build aren't normally merged into a single project. The code bases are orthogonal to each other, plus they have different tags and branch names which will make it
difficult to get the right branches in both projects at the same time.
If you build Grouper as it exists in the repository, it will be a "2.5.0-SNAPSHOT" version. When a release is ready, a Jenkins job will replace the version number in the pom.xml files on the fly, and then publish the packaged jars to Maven repositories.
So the Grouper version that the Docker build depends on doesn't even really exist, except as a tag on a specific commit. Anyway, here is what is involved in building both projects.
Grouper:
git clone https://github.com/Internet2/grouper.git
git checkout GROUPER_2_5_BRANCH
(this should automatically associate with the remote branch; i.e. "Branch 'GROUPER_2_5_BRANCH' set up to track remote branch 'GROUPER_2_5_BRANCH' from 'origin'.")
cd grouper
mvn -f grouper-parent clean install
(this will build version 2.5.0-SNAPSHOT of all the relevant jar files; the result of the install phase will copy the jars into your .m2 cache directory, but the implied package step will also put them into */target subdirectories)
Docker
cd ..
git clone https://github.internet2.edu/docker/grouper.git grouper-container
cd grouper-container
git checkout 2.5.35
(this should automatically associate with the remote branch; i.e. "Branch '2.5.35' set up to track remote branch '2.5.35' from 'origin'.")
docker build --tag=my-grouper/grouper:latest .
(will create a docker image my-grouper/grouper:latest)
Note that the docker build won't be using the Grouper jars you just built. It will pull the 2.5.35 versions from a Maven repository.
-Chad
---- Original Message ----
Hi,
Mike Porter
Anyone know how the series of git commands to pull grouper and docker/grouper together such that I can run maven to build the application and then docker build to make the image? I am having trouble getting the two repositories to work together.
Probably something simple. New to docker, new to git. However, I am uncomfortable running an image I do not know how to build. I'm a little surprised there is not an easily accessible document explaining this.
Right now I have:
git clone https://github.com/Internet2/grouper.git/
cd grouper
git remote add -f docker/grouper https://github.internet2.edu/docker/grouper.git
git merge docker/grouper/master --allow-unrelated-histories
There were some unmerged changes, so I did:
git add README.md
git add .gitignore
git commit
cd grouper
git remote add -f docker/grouper https://github.internet2.edu/docker/grouper.git
git merge docker/grouper/master --allow-unrelated-histories
There were some unmerged changes, so I did:
git add README.md
git add .gitignore
git commit
However, I now want to check out 2.5.33. Just checking out 2.5.33 pulls the files for docker/grouper and removes the application directores. Checking out GROUPER_2_5_BRANCH leaves me something kinda 2.5ish I guess. But the Dockerfile has a 2.4.0 version
in it, so clearly I have not created something that makes grouper and docker/grouper work correctly.
Thanks,
Mike
(302) 831-3747
- [grouper-users] git commands for building docker image, Michael Porter, 09/14/2020
- <Possible follow-up(s)>
- Re: [grouper-users] git commands for building docker image, Redman, Chad, 09/18/2020
- Re: [grouper-users] git commands for building docker image, Michael Porter, 09/21/2020
- Re: [grouper-users] git commands for building docker image, Redman, Chad, 09/23/2020
- Re: [grouper-users] git commands for building docker image, Michael Porter, 09/21/2020
Archive powered by MHonArc 2.6.19.