Add Bash shell script to install Git in the Docker Container created from the Eclipse-Temurin JDK 17 Docker Image used to run the SSDG Gradle build (check) in Jenkins CI.

This commit is contained in:
John Blum
2022-06-22 17:13:55 -07:00
parent 6d3ccf81e8
commit 78fa43f1d8
3 changed files with 17 additions and 0 deletions

1
Jenkinsfile vendored
View File

@@ -32,6 +32,7 @@ pipeline {
docker.image(p['docker.container.image.java.main']).inside(p['docker.container.inside.env.full']) {
withCredentials([GRADLE_ENTERPRISE_SECRET_ACCESS_KEY]) {
withEnv(["GRADLE_ENTERPRISE_ACCESS_KEY=${GRADLE_ENTERPRISE_ACCESS_KEY}"]) {
sh "echo 'Setup build environment...'"
sh "ci/setup.sh"

15
ci/installGit.sh Normal file
View File

@@ -0,0 +1,15 @@
#!/bin/bash -x
which git
git --version 2>1 /dev/null
gitVersionCommandReturnValue=$?
if test "$gitVersionCommandReturnValue" != 0
then
echo "Installing Git..."
apt-get -y update
apt-get -y install git
which git
git --version
fi

View File

@@ -8,4 +8,5 @@ echo "Logged into Jenkins CI as user [$USER] with home directory [$HOME] in the
chown -R 1001:1001 .
#echo "Logging into Docker..."
#docker login --username ${DOCKER_HUB_USR} --password ${DOCKER_HUB_PSW}
source ci/installGit.sh
exit 0