Skip to content
This repository was archived by the owner on Dec 13, 2019. It is now read-only.

Commit 87aae3d

Browse files
committed
removed maven-no-jdk build
1 parent 258aac9 commit 87aae3d

File tree

4 files changed

+58
-13
lines changed

4 files changed

+58
-13
lines changed

.drone.yml

+12-12
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@ workspace:
44

55
pipeline:
66

7-
docker_maven-3.5-no-jdk:
8-
image: plugins/docker
9-
secrets: [ docker_username, docker_password ]
10-
repo: svenruppert/maven-3.5-no-jdk
11-
tags:
12-
- latest
13-
- 3.5.3
14-
dockerfile: images/maven-3.5-no-jdk/Dockerfile
15-
when:
16-
branches:
17-
include: master, develop, release/*
18-
exclude: feature/*
7+
# docker_maven-3.5-no-jdk:
8+
# image: plugins/docker
9+
# secrets: [ docker_username, docker_password ]
10+
# repo: svenruppert/maven-3.5-no-jdk
11+
# tags:
12+
# - latest
13+
# - 3.5.3
14+
# dockerfile: images/maven-3.5-no-jdk/Dockerfile
15+
# when:
16+
# branches:
17+
# include: master, develop, release/*
18+
# exclude: feature/*
1919

2020

2121
docker_maven-3.5-jdk-08:

images/maven-3.5-no-jdk/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ ENV MAVEN_CONFIG "$USER_HOME_DIR/.m2"
1818
COPY mvn-entrypoint.sh /usr/local/bin/mvn-entrypoint.sh
1919
COPY settings-docker.xml /usr/share/maven/ref/
2020

21-
#ENTRYPOINT ["/usr/local/bin/mvn-entrypoint.sh"]
21+
ENTRYPOINT ["/usr/local/bin/mvn-entrypoint.sh"]
2222
CMD ["mvn"]

images/mvn-entrypoint.sh

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#! /bin/bash -eu
2+
3+
set -o pipefail
4+
5+
# Copy files from /usr/share/maven/ref into ${MAVEN_CONFIG}
6+
# So the initial ~/.m2 is set with expected content.
7+
# Don't override, as this is just a reference setup
8+
copy_reference_file() {
9+
local root="${1}"
10+
local f="${2%/}"
11+
local logfile="${3}"
12+
local rel="${f/${root}/}" # path relative to /usr/share/maven/ref/
13+
echo "$f" >> "$logfile"
14+
echo " $f -> $rel" >> "$logfile"
15+
if [[ ! -e ${MAVEN_CONFIG}/${rel} || $f = *.override ]]
16+
then
17+
echo "copy $rel to ${MAVEN_CONFIG}" >> "$logfile"
18+
mkdir -p "${MAVEN_CONFIG}/$(dirname "${rel}")"
19+
cp -r "${f}" "${MAVEN_CONFIG}/${rel}";
20+
fi;
21+
}
22+
23+
copy_reference_files() {
24+
local log="$MAVEN_CONFIG/copy_reference_file.log"
25+
26+
if (sh -c "mkdir -p \"$MAVEN_CONFIG\" && touch \"${log}\"" > /dev/null 2>&1)
27+
then
28+
echo "--- Copying files at $(date)" >> "$log"
29+
find /usr/share/maven/ref/ -type f -exec bash -eu -c 'copy_reference_file /usr/share/maven/ref/ "$1" "$2"' _ {} "$log" \;
30+
else
31+
echo "Can not write to ${log}. Wrong volume permissions? Carrying on ..."
32+
fi
33+
}
34+
35+
export -f copy_reference_file
36+
copy_reference_files
37+
unset MAVEN_CONFIG
38+
39+
exec "$@"

images/settings-docker.xml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
4+
https://maven.apache.org/xsd/settings-1.0.0.xsd">
5+
<localRepository>/usr/share/maven/ref/repository</localRepository>
6+
</settings>

0 commit comments

Comments
 (0)