Permalink
Browse files
Starting and stopping container as part of tests
- Loading branch information
Showing
with
22 additions
and
0 deletions.
-
+8
−0
Jenkinsfile
-
+6
−0
bin/ci-run.sh
-
+8
−0
bin/ci-stop.sh
|
@@ -34,9 +34,17 @@ node { |
|
|
sh "rm -f ./debug" |
|
|
handleError(message) |
|
|
} |
|
|
stage 'Start container' |
|
|
|
|
|
sh 'bin/ci-run.sh' |
|
|
|
|
|
stage 'Tests' |
|
|
|
|
|
sh 'bin/test.sh' |
|
|
// should build a finally construct here |
|
|
stage 'Stop container' |
|
|
|
|
|
sh 'bin/ci-stop.sh' |
|
|
|
|
|
stage 'Push' |
|
|
|
|
|
|
|
@@ -0,0 +1,6 @@ |
|
|
#!/bin/bash |
|
|
|
|
|
# This file will run a container in the background |
|
|
source common.bash . |
|
|
|
|
|
docker run -d --name=$imagename -p 80:80 -p 443:443 $maintainer/$imagename
|
|
|
@@ -0,0 +1,8 @@ |
|
|
#!/bin/bash |
|
|
|
|
|
# This file will run a container in the background |
|
|
source common.bash . |
|
|
|
|
|
echo "Cleaning up Docker image($maintainer/$imagename)" |
|
|
docker stop $imagename >> /dev/null |
|
|
docker rm $imagename |