Adopt UID/GID to GCP.
This commit is contained in:
4
Jenkinsfile
vendored
4
Jenkinsfile
vendored
@@ -25,7 +25,7 @@ pipeline {
|
||||
|
||||
steps {
|
||||
script {
|
||||
def image = docker.build("springci/spring-data-release-tools:0.17", "ci")
|
||||
def image = docker.build("springci/spring-data-release-tools:0.18", "ci")
|
||||
docker.withRegistry('', 'hub.docker.com-springbuildmaster') {
|
||||
image.push()
|
||||
}
|
||||
@@ -41,7 +41,7 @@ pipeline {
|
||||
|
||||
agent {
|
||||
docker {
|
||||
image 'springci/spring-data-release-tools:0.17'
|
||||
image 'springci/spring-data-release-tools:0.18'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,17 +1,20 @@
|
||||
FROM ubuntu:23.04
|
||||
|
||||
# Bake a container using sdkman to get all the needed JDKs.
|
||||
#
|
||||
|
||||
ARG USER_UID="1001"
|
||||
ARG USER_GID="1001"
|
||||
ARG USER_UID="1100"
|
||||
ARG USER_GID="1100"
|
||||
ARG USER_NAME="jenkins"
|
||||
|
||||
RUN groupadd -g $USER_GID $USER_NAME && \
|
||||
useradd -m -g $USER_GID -u $USER_UID $USER_NAME
|
||||
|
||||
COPY java-init.sh /home/jenkins/java-init.sh
|
||||
COPY java-tools.properties /home/jenkins/java-tools.properties
|
||||
|
||||
RUN set -eux; \
|
||||
touch /etc/apt/apt.conf.d/99verify-peer.conf && \
|
||||
chown $USER_UID:$USER_GID /home/jenkins && \
|
||||
chown -R $USER_UID:$USER_GID /home/jenkins/* && \
|
||||
touch /etc/apt/apt.conf.d/99verify-peer.conf && \
|
||||
echo >>/etc/apt/apt.conf.d/99verify-peer.conf "Acquire { https::Verify-Peer false }" && \
|
||||
sed -i -e 's/archive.ubuntu.com/atl.mirrors.clouvider.net\/ubuntu/g' /etc/apt/sources.list && \
|
||||
sed -i -e 's/security.ubuntu.com/atl.mirrors.clouvider.net\/ubuntu/g' /etc/apt/sources.list && \
|
||||
@@ -24,12 +27,10 @@ RUN set -eux; \
|
||||
|
||||
USER $USER_UID:$USER_GID
|
||||
|
||||
COPY java-init.sh /temp/java-init.sh
|
||||
COPY java-tools.properties /temp/java-tools.properties
|
||||
|
||||
RUN curl -s "https://get.sdkman.io" | bash
|
||||
|
||||
RUN bash -c "cd /temp && \
|
||||
RUN bash -c "cd /home/jenkins && \
|
||||
chmod a+x /home/jenkins/java-init.sh && \
|
||||
./java-init.sh && \
|
||||
rm -rf $HOME/.sdkman/archives/* && \
|
||||
rm -rf $HOME/.sdkman/tmp/*"
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
# Utility to install Java and Maven into the build container image #
|
||||
####################################################################
|
||||
|
||||
echo $HOME
|
||||
source $HOME/.sdkman/bin/sdkman-init.sh
|
||||
JAVA_TOOLS_PROPERTIES=java-tools.properties
|
||||
|
||||
|
||||
Reference in New Issue
Block a user