Merge pull request #144 from thomasleveil/travisci
[tests] Add test suite
diff --git a/Dockerfile b/Dockerfile
index 2d687f0..64d1fe3 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,6 +1,6 @@
FROM java:8-jdk
-RUN apt-get update && apt-get install -y wget git curl zip && rm -rf /var/lib/apt/lists/*
+RUN apt-get update && apt-get install -y wget git curl zip file && rm -rf /var/lib/apt/lists/*
ENV JENKINS_HOME /var/jenkins_home
ENV JENKINS_SLAVE_AGENT_PORT 50000
diff --git a/docker-compose.yml b/docker-compose.yml
new file mode 100644
index 0000000..5fe82ff
--- /dev/null
+++ b/docker-compose.yml
@@ -0,0 +1,9 @@
+master:
+ build: .
+ environment:
+ JAVA_OPTS: "-Djava.awt.headless=true"
+ ports:
+ - "50000:50000"
+ - "8080:8080"
+ volumes:
+ - /var/jenkins_home
diff --git a/plugins.sh b/plugins.sh
index 3413ce4..f0285bb 100755
--- a/plugins.sh
+++ b/plugins.sh
@@ -24,4 +24,11 @@
JENKINS_UC_DOWNLOAD=$JENKINS_UC/download
fi
curl -sSL -f ${JENKINS_UC_DOWNLOAD}/plugins/${plugin[0]}/${plugin[1]}/${plugin[0]}.hpi -o $REF/${plugin[0]}.jpi
+ if ls -l $REF/${plugin[0]}.jpi && file $REF/${plugin[0]}.jpi | grep 'Zip archive'
+ then
+ echo Download okay. ${plugin[0]}.jpi seems to be a Zip archive
+ else
+ echo "Downloading via '${cmd}' failed"
+ exit 3
+ fi
done < $1