Skip to content

Commit 78b74b1

Browse files
committed
impl docker container for testing
1 parent 5035e00 commit 78b74b1

File tree

3 files changed

+54
-5
lines changed

3 files changed

+54
-5
lines changed

misc/Dockerfile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Base Image for kscript testing
2+
FROM ubuntu
3+
4+
## update apt cache
5+
RUN apt-get update
6+
7+
RUN apt-get install -y curl unzip zip wget git
8+
9+
## install java
10+
RUN apt-get install -y default-jdk
11+
12+
# Define commonly used JAVA_HOME variable
13+
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/
14+
15+
16+
# install sdkman (see http://sdkman.io/install.html)
17+
RUN bash -c "curl -s 'https://get.sdkman.io' | bash"
18+
19+
#tall kotlin and maven
20+
RUN /bin/bash -c 'source ~/.sdkman/bin/sdkman-init.sh && sdkman_auto_answer=true && sdk install kotlin && sdk install maven && sdk install gradle'

misc/docker_tests.sh

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
#!/usr/bin/env bash
22

3+
4+
35
# todo push image to docker registry
4-
docker run -it bioinfo_base
6+
cd ${KSCRIPT_HOME}/misc
7+
#docker build --no-cache -t kscript_tester .
8+
docker build -t kscript_tester .
9+
docker run -it kscript_tester
510

611
#curl -Lso /bin/kscript https://raw.githubusercontent.com/holgerbrandl/kscript/abb5f4c6ee72ec90d22c0fe913284e92363cad0e/kscript && chmod u+x /bin/kscript
7-
curl -Lso /bin/kscript https://www.dropbox.com/s/l5g8vr0wz78y3zy/kscript?dl=1 && chmod u+x /bin/kscript
12+
#curl -Lso /bin/kscript https://www.dropbox.com/s/l5g8vr0wz78y3zy/kscript?dl=1 && chmod u+x /bin/kscript
813

9-
kscript --help
10-
kscript --self-update
14+
#kscript --help
15+
#kscript --self-update
1116

1217

1318
## or using github repo
@@ -17,6 +22,13 @@ export KSCRIPT_HOME=$(pwd)
1722

1823
gradle shadowJar && cp build/libs/kscript-0.1-SNAPSHOT-all.jar kscript.jar
1924

25+
export PATH=$(pwd):${PATH}
2026
kscript --clear-cache
2127

22-
${KSCRIPT_HOME}/test/test_suite.sh
28+
wget https://raw.githubusercontent.com/lehmannro/assert.sh/master/assert.sh
29+
chmod u+x assert.sh
30+
31+
${KSCRIPT_HOME}/test/test_suite.sh
32+
33+
## copy newer jar into container
34+
#scp brandl@scicomp-mac-12-usb:/Users/brandl/projects/kotlin/kscript/kscript.jar .

misc/experimental/kscriptD

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env bash
2+
3+
4+
# version tag for backward compatibility with kscript v1.x
5+
KSCRIPT_VERSION=2.0
6+
7+
8+
## using shadow jar
9+
#echo $(kotlin -classpath /Users/brandl/projects/kotlin/kscript/build/libs/kscript-0.1-SNAPSHOT-all.jar kscript.app.KscriptKt "$@")
10+
11+
## using simple jar
12+
#kotlin -classpath /Users/brandl/projects/kotlin/kscript/build/libs/kscript-0.1-SNAPSHOT.jar kscript.app.KscriptKt "$@"
13+
14+
## todo inline jar
15+
16+
#exec $(kotlin -classpath /Users/brandl/projects/kotlin/kscript/build/libs/kscript-0.1-SNAPSHOT-all.jar kscript.app.KscriptKt "$@")
17+
exec $(kotlin -J-agentlib:jdwp=transport=dt_socket,server=n,address=scicomp-mac-12-usb.mpi-cbg.de:8765,suspend=y -classpath ../../kscript/build/libs/kscript-0.1-SNAPSHOT-all.jar kscript.app.KscriptKt "$@")

0 commit comments

Comments
 (0)