Skip to content
This repository was archived by the owner on Feb 11, 2025. It is now read-only.

Commit 5c4ee4d

Browse files
authored
Merge pull request #31 from fullstack-devops/bugfix/some-improvements
add detect-setup + polishing flavours
2 parents 51b4b7a + e15125f commit 5c4ee4d

File tree

5 files changed

+36
-6
lines changed

5 files changed

+36
-6
lines changed

images/base/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ RUN mkdir /helper-scripts \
2626
&& mkdir -p /kaniko/workspace
2727

2828
# Copy image helper scripts
29+
COPY ./helper-scripts/detect-setup.sh /helper-scripts/detect-setup.sh
2930
COPY ./helper-scripts/gh-entrypoint.sh /helper-scripts/gh-entrypoint.sh
3031
COPY ./helper-scripts/kaniko-wrapper.sh /helper-scripts/kaniko-wrapper.sh
3132
COPY ./helper-scripts/translate-aarch.sh /helper-scripts/translate-aarch.sh
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
3+
CA_FILE="/etc/ssl/certs/ca-certificates.crt"
4+
5+
# yarn
6+
if command -v yarn -v &> /dev/null; then
7+
echo "add $CA_FILE to yarn"
8+
yarn config set cafile $CA_FILE
9+
fi
10+
11+
# java
12+
if command -v java --version &> /dev/null; then
13+
echo "add $CA_FILE to yarn"
14+
keytool -importcert -alias $CA_FILE -keystore /usr/lib/jvm/adoptopenjdk-8-hotspot-amd64/jre/lib/security/cacerts -storepass changeit -file $CA_FILE -noprompt
15+
fi
16+
17+
# maven
18+
if command -v mvn -v &> /dev/null; then
19+
if [ -f /mnt/dynamic/settings.xml ]; then
20+
echo "linking settings.xml from /mnt/dynamic/settings.xml to ${HOME}/.m2/settings.xml"
21+
ln -s /mnt/dynamic/settings.xml ${HOME}/.m2/settings.xml
22+
fi
23+
fi

images/base/helper-scripts/gh-entrypoint.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ echo "Connecting runner to: $RUNNER_URL"
5151
echo "Individual Runner Name: $HOSTNAME"
5252
echo "Runner Home: $RUNNER_HOME"
5353

54+
echo "Running setup fpr installed software..."
55+
/helper-scripts/detect-setup.sh
56+
5457
${RUNNER_HOME}/config.sh \
5558
--name $HOSTNAME \
5659
--token $REG_TOKEN \

images/maven-adopt-8-ng/Dockerfile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,15 @@ FROM ghcr.io/fullstack-devops/github-actions-runner:latest-base
33
USER root
44
# install packages along with jq so we can parse JSON
55
# add additional packages as necessary
6-
ARG PACKAGES="openjdk-11-jdk maven nodejs ansible"
6+
ARG PACKAGES="adoptopenjdk-8-hotspot xmlstarlet maven nodejs ansible"
77
ARG PACKAGES_PYTHON="kubernetes"
88

99
## ansible keys
10-
RUN wget -O - https://packages.adoptium.net/artifactory/api/gpg/key/public | apt-key add -
11-
RUN echo "deb https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | tee /etc/apt/sources.list.d/adoptium.list
10+
RUN wget -O - https://packages.adoptium.net/artifactory/api/gpg/key/public | apt-key add - \
11+
&& echo "deb https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | tee /etc/apt/sources.list.d/adoptium.list
12+
## adoptopenjdk keys
13+
RUN wget -qO - https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | apt-key add - \
14+
&& echo "deb https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/ focal main" >> /etc/apt/sources.list
1215

1316
RUN apt-get update \
1417
&& add-apt-repository -y --update ppa:ansible/ansible \
@@ -17,7 +20,7 @@ RUN apt-get update \
1720
&& rm -rf /var/lib/apt/lists/* \
1821
&& apt-get clean
1922

20-
ENV GH_RUNNER_LABELS="ubuntu-20.04,maven,openjdk-11,nodejs,go,yarn,helm,ansible"
23+
ENV GH_RUNNER_LABELS="ubuntu-20.04,maven,openjdk-8,nodejs,go,yarn,helm,ansible"
2124
# https://github.com/helm/helm/releases
2225
ARG HELM_VERSION=3.8.1
2326

images/maven-temurin-11/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ ARG PACKAGES="temurin-11-jdk maven nodejs ansible"
77
ARG PACKAGES_PYTHON="kubernetes"
88

99
## ansible keys
10-
RUN wget -O - https://packages.adoptium.net/artifactory/api/gpg/key/public | apt-key add -
11-
RUN echo "deb https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | tee /etc/apt/sources.list.d/adoptium.list
10+
RUN wget -O - https://packages.adoptium.net/artifactory/api/gpg/key/public | apt-key add - \
11+
&& echo "deb https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | tee /etc/apt/sources.list.d/adoptium.list
1212

1313
RUN apt-get update \
1414
&& add-apt-repository -y --update ppa:ansible/ansible \

0 commit comments

Comments
 (0)