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:
1
Jenkinsfile
vendored
1
Jenkinsfile
vendored
@@ -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
15
ci/installGit.sh
Normal 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
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user