forked from SAP/devops-docker-node-browsers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
runTests.sh
executable file
·25 lines (18 loc) · 865 Bytes
/
runTests.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash -ex
DOCKERFILE_PATH=${1:-.}
# Start a local registry, to which we push the images built in this test, and from which they will be consumed in the test
docker run -d -p 5000:5000 --restart always --name registry registry:2 || true
docker build -t localhost:5000/ppiper/node-browsers:latest ${DOCKERFILE_PATH}
docker tag localhost:5000/ppiper/node-browsers:latest ppiper/node-browsers:latest
docker push localhost:5000/ppiper/node-browsers:latest
git clone https://github.com/piper-validation/cloud-s4-sdk-book.git -b validate-node-browsers test-project
pushd test-project
docker run -v //var/run/docker.sock:/var/run/docker.sock -v $(pwd):/workspace -v /tmp \
-e BRANCH_NAME=master \
-e CASC_JENKINS_CONFIG=/workspace/jenkins.yml -e HOST=$(hostname) \
ppiper/jenkinsfile-runner
popd
function cleanup {
rm -rf test-project
}
trap cleanup EXIT