mirror of
https://github.com/status-im/universal-links-handler.git
synced 2025-02-20 14:48:13 +00:00
add tests to pipeline
This commit is contained in:
parent
227a1e8b27
commit
d64c9faf30
9
Jenkinsfile
vendored
9
Jenkinsfile
vendored
@ -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
|
||||
|
6
tests/run.sh
Normal file → Executable file
6
tests/run.sh
Normal file → Executable file
@ -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'
|
||||
|
0
tests/shakedown.sh
Normal file → Executable file
0
tests/shakedown.sh
Normal file → Executable file
Loading…
x
Reference in New Issue
Block a user