add tests to pipeline
This commit is contained in:
parent
227a1e8b27
commit
d64c9faf30
|
@ -1,4 +1,7 @@
|
|||
properties([disableConcurrentBuilds()])
|
||||
|
||||
node('linux') {
|
||||
|
||||
def image_name = 'statusteam/universal-links-handler'
|
||||
def commit
|
||||
def image
|
||||
|
@ -12,6 +15,12 @@ node('linux') {
|
|||
image = docker.build(image_name + ':' + commit)
|
||||
}
|
||||
|
||||
stage('Tests') {
|
||||
image.withRun('-p 8080:80 -e PORT=80') { c ->
|
||||
sh 'tests/run.sh -u 127.0.0.1:8080'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Publish') {
|
||||
withDockerRegistry([
|
||||
credentialsId: "dockerhub-statusteam-auto", url: ""
|
||||
|
|
|
@ -48,3 +48,5 @@ Then you can run `bash tests/run.sh -u localhost:8080` or to run against against
|
|||
Uses the awesome `https://github.com/robwhitby/shakedown`
|
||||
|
||||
## Deployment
|
||||
|
||||
The code is automatically deployed when pushed to master
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
#!/bin/bash
|
||||
|
||||
source tests/shakedown.sh
|
||||
|
||||
until $(curl --output /dev/null --silent --head --fail $BASE_URL/health); do
|
||||
printf '.'
|
||||
sleep 1
|
||||
done
|
||||
|
||||
shakedown GET /.well-known/assetlinks.json
|
||||
status 200
|
||||
content_type 'application/json'
|
||||
|
|
Loading…
Reference in New Issue