File tree 1 file changed +56
-0
lines changed
1 file changed +56
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ # / trigger local ci test run
3
+
4
+
5
+ . rd_versions.sh
6
+
7
+
8
+ set -euo pipefail
9
+ IFS=$' \n\t '
10
+ readonly ARGS=(" $@ " )
11
+ DOCKER_DIR=$PWD /test/docker
12
+
13
+ usage () {
14
+ grep ' ^#/' < " $0 " | cut -c4- # prints the #/ lines above as usage info
15
+ }
16
+ die (){
17
+ echo >&2 " $@ " ; exit 2
18
+ }
19
+
20
+ check_args (){
21
+ if [ ${# ARGS[@]} -gt 0 ] ; then
22
+ DOCKER_DIR=$1
23
+ fi
24
+ }
25
+ copy_jar (){
26
+ local FARGS=(" $@ " )
27
+ local DIR=${FARGS[0]}
28
+ local -a VERS=( $( rd_get_version ) )
29
+ local JAR=rundeck-launcher-${VERS[0]} -${VERS[2]} .jar
30
+ local buildJar=$PWD /rundeck-launcher/launcher/build/libs/$JAR
31
+ test -f $buildJar || die " Jar file not found $buildJar "
32
+ mkdir -p $DIR
33
+ cp $buildJar $DIR /rundeck-launcher.jar
34
+ echo $DIR /$JAR
35
+ }
36
+ run_tests (){
37
+ local FARGS=(" $@ " )
38
+ local DIR=${FARGS[0]}
39
+
40
+ cd $DIR
41
+ bash $DIR /test.sh
42
+ }
43
+ run_docker_test (){
44
+ local FARGS=(" $@ " )
45
+ local DIR=${FARGS[0]}
46
+ local launcherJar=$( copy_jar $DIR ) || die " Failed to copy jar"
47
+ run_tests $DIR
48
+ }
49
+
50
+
51
+ main () {
52
+ check_args
53
+ run_docker_test $DOCKER_DIR
54
+ }
55
+ main
56
+
You can’t perform that action at this time.
0 commit comments