-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from CodinGame/builder-runner
Prepare for new builder-runner api
- Loading branch information
Showing
4 changed files
with
31 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM openjdk:8-jdk | ||
FROM codingame/java-compiler | ||
|
||
MAINTAINER CodinGame <[email protected]> | ||
|
||
|
@@ -16,6 +16,8 @@ ENV MAVEN_CONFIG "$USER_HOME_DIR/.m2" | |
|
||
COPY settings.xml $USER_HOME_DIR/.m2/ | ||
|
||
COPY ./build.sh /project/build | ||
COPY ./docker-entrypoint.sh / | ||
|
||
ENTRYPOINT ["/docker-entrypoint.sh"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Exit as soon as a command return status != 0 | ||
set -e | ||
|
||
SRC_DIR=${1:-/project/target} | ||
TARGET_DIR=${2:-/project/target/jars} | ||
|
||
# Create target dir | ||
mkdir -p ${TARGET_DIR} | ||
|
||
cd ${SRC_DIR} | ||
|
||
# Build the project: create all the jar files | ||
mvn clean install jar:test-jar -DskipTests | ||
# Copy the jar files into the target directory | ||
find ${SRC_DIR} -name "*.jar" -not -path "${TARGET_DIR}/*" -exec cp {} ${TARGET_DIR} \; | ||
# Copy all the dependencies into the target directory | ||
mvn dependency:copy-dependencies -DoutputDirectory=${TARGET_DIR} | ||
|
||
# Clean all except jars | ||
shopt -s extglob | ||
rm -rf !("jars") | ||
|
||
# Clean .m2 directory | ||
rm -rf ${HOME}/.m2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,3 @@ | ||
#!/usr/bin/env bash | ||
|
||
SRC_DIR=${1:-/project/source} | ||
TARGET_DIR=${2:-/project/target} | ||
|
||
cd ${SRC_DIR} | ||
|
||
# Build the project: create all the jar files | ||
mvn clean install jar:test-jar -DskipTests | ||
# Copy the jar files into the target directory | ||
find . -name "*.jar" -exec cp {} ${TARGET_DIR} \; | ||
# Copy all the dependencies into the target directory | ||
mvn dependency:copy-dependencies -DoutputDirectory=${TARGET_DIR} | ||
/project/build /project/source |