Skip to content

Commit a1aa13c

Browse files
committed
Add Gradle installation to the container image
Closes gh-19
1 parent ea13888 commit a1aa13c

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

ci/images/ci-image/Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ ADD get-crac-jdk-url.sh /get-crac-jdk-url.sh
55
ADD get-docker-url.sh /get-docker-url.sh
66
ADD get-ytt-url.sh /get-ytt-url.sh
77
ADD get-docker-compose-url.sh /get-docker-compose-url.sh
8+
ADD get-gradle-url.sh /get-gradle-url.sh
89
RUN ./setup.sh
910

1011
ENV JAVA_HOME /opt/crac-jdk
11-
ENV PATH $JAVA_HOME/bin:/opt/ytt/bin:/opt/docker-compose/bin:$PATH
12+
ENV PATH $JAVA_HOME/bin:/opt/ytt/bin:/opt/docker-compose/bin:/opt/gradle/bin:$PATH
1213
ENV GRADLE_OPTS -Dorg.gradle.project.buildDir=/tmp/gradle-build
1314
RUN git config --global --add safe.directory /workspace
1415
ADD docker-lib.sh /docker-lib.sh

ci/images/get-gradle-url.sh

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
set -e
3+
4+
VERSION="8.3"
5+
echo "https://services.gradle.org/distributions/gradle-$VERSION-bin.zip"

ci/images/setup.sh

+8-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export ARCH=$(uname -m)
99

1010
export DEBIAN_FRONTEND=noninteractive
1111
apt-get update
12-
apt-get install --no-install-recommends -y tzdata ca-certificates net-tools libxml2-utils git curl libudev1 libxml2-utils iptables iproute2 jq unzip build-essential libz-dev libfreetype-dev nano
12+
apt-get install --no-install-recommends -y tzdata ca-certificates net-tools libxml2-utils git curl libudev1 libxml2-utils iptables iproute2 jq unzip build-essential libz-dev libfreetype-dev nano libarchive-tools
1313
ln -fs /usr/share/zoneinfo/UTC /etc/localtime
1414
dpkg-reconfigure --frontend noninteractive tzdata
1515
rm -rf /var/lib/apt/lists/*
@@ -51,7 +51,12 @@ curl --location $DOCKER_COMPOSE_URL > /opt/docker-compose/bin/docker-compose
5151
chmod +x /opt/docker-compose/bin/docker-compose
5252

5353
###########################################################
54-
# GRADLE ENTERPRISE
54+
# GRADLE
5555
###########################################################
56+
GRADLE_URL=$( /get-gradle-url.sh )
57+
mkdir -p /opt/gradle
58+
cd /opt/gradle
59+
curl -L $GRADLE_URL | bsdtar --strip-components=1 -xvf-
60+
chmod +x /opt/gradle/bin/gradle
5661
mkdir ~/.gradle
57-
echo 'systemProp.user.name=concourse' > ~/.gradle/gradle.properties
62+
echo 'systemProp.user.name=concourse' > ~/.gradle/gradle.properties

0 commit comments

Comments
 (0)