Skip to content
Snippets Groups Projects
Commit e926a170 authored by Brice Copy's avatar Brice Copy
Browse files

Add versioning and gitflow support

parent fb78b883
No related branches found
No related tags found
No related merge requests found
Pipeline #1114026 passed
......@@ -17,25 +17,21 @@ RUN add-apt-repository \
$(lsb_release -cs) \
stable"
# This query the list of available docker version
# RUN apt-get update && apt-cache madison docker-ce
RUN apt-get update && echo "List of available Docker versions ( we are using ${DOCKER_VERSION} )" && apt-cache madison docker-ce
RUN apt-get update && apt-get install -y docker-ce-cli=${DOCKER_VERSION}
RUN apt-get install -y docker-ce-cli=${DOCKER_VERSION}
RUN curl -o /tmp/cern-root-ca-2.crt "https://cafiles.cern.ch/cafiles/certificates/CERN%20Root%20Certification%20Authority%202.crt" && \
curl -o /tmp/cern-ca.crt "https://cafiles.cern.ch/cafiles/certificates/CERN%20Certification%20Authority.crt" && \
curl -o /tmp/cern-ca-1.crt "https://cafiles.cern.ch/cafiles/certificates/CERN%20Certification%20Authority(1).crt"
RUN keytool -noprompt -import -keystore $JAVA_HOME/jre/lib/security/cacerts -storepass changeit -alias CERN_ROOT_CA_2 -file "/tmp/cern-root-ca-2.crt" && \
keytool -noprompt -import -keystore $JAVA_HOME/jre/lib/security/cacerts -storepass changeit -alias CERN_CA -file "/tmp/cern-ca.crt" && \
keytool -noprompt -import -keystore $JAVA_HOME/jre/lib/security/cacerts -storepass changeit -alias CERN_CA_1 -file "/tmp/cern-ca-1.crt"
curl -o /tmp/cern-ca-1.crt "https://cafiles.cern.ch/cafiles/certificates/CERN%20Certification%20Authority(1).crt" && \
keytool -noprompt -import -keystore $JAVA_HOME/jre/lib/security/cacerts -storepass changeit -alias CERN_ROOT_CA_2 -file "/tmp/cern-root-ca-2.crt" && \
keytool -noprompt -import -keystore $JAVA_HOME/jre/lib/security/cacerts -storepass changeit -alias CERN_CA -file "/tmp/cern-ca.crt" && \
keytool -noprompt -import -keystore $JAVA_HOME/jre/lib/security/cacerts -storepass changeit -alias CERN_CA_1 -file "/tmp/cern-ca-1.crt" && \
rm /tmp/*.crt
RUN mkdir -p /opt
ADD src/main/java/SSLPoke.java /opt
RUN cd /opt && javac SSLPoke.java && java SSLPoke repository.cern.ch 443
# RUN rm -f /tmp/*.crt
# TODO : Clean up the APT cache too
\ No newline at end of file
RUN rm -rf /var/lib/apt/lists/
# Maven Docker in Docker
An Alpine Linux + Docker + Maven image to perform Docker-in-Docker builds on CERN Gitlab.
\ No newline at end of file
An official Maven Debian + Docker + CERN CA certificates image to perform Docker-in-Docker builds on CERN Gitlab.
The image build is provided :
* As a baseline image, with default build arguments hard-coded in the provided Dockerfile. Consult the Dockerfile to know the current configuration.
* As a Maven-enabled image with support for branching, parameters and releases (thank to the maven-dockerfile-plugin).
*Important Note :* The Gitlab CI only performs a baseline build in the master branch. The baseline is used to rebuild all other images so pick a sensible default.
# How to update the baseline
Simply update the Dockerfile build arguments' default values, and commit to the master branch. NOTE : The baseline is used to rebuild all other images so pick a sensible default.
# How to provide alternate images
Using gitflow, you can create a new *support* branch, it will automatically be picked up and deployed as a new docker image.
To name your support branch, please follow the convention <maven-version>-<docker-client-version>-<jdk-version> (with or without the SNAPSHOT suffix).
For instance :
* 3.5.3-19.0.3-jdk8
* 3.6.0-19.0.3.2-jdk11
......@@ -4,10 +4,14 @@
<groupId>cern.ics.swinfra</groupId>
<artifactId>mvn-dind</artifactId>
<version>1.0-SNAPSHOT</version>
<version>3.5.3-19.0.3-jdk8</version>
<description>A Maven + Docker DIND image to build images.</description>
<scm>
<developerConnection>scm:git:ssh://git@gitlab.cern.ch/industrial-controls/sw-infra/mvn-dind.git</developerConnection>
</scm>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
......@@ -22,6 +26,20 @@
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>com.e-gineering</groupId>
<artifactId>gitflow-helper-maven-plugin</artifactId>
<version>2.2.0</version>
<executions>
<execution>
<goals>
<goal>enforce-versions</goal>
<goal>tag-master</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment