Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Updating tests
Jim Van Fleet committed Aug 31, 2016
1 parent 7935104 commit 055a388
Showing 2 changed files with 27 additions and 1 deletion.
15 changes: 14 additions & 1 deletion Jenkinsfile
@@ -12,7 +12,6 @@ node {
credentialsId: "jenkins-github-access-token" ])
sh 'mv ./bin/* ../bin/.'
}
sh 'rm -rf tmp'

stage 'Setting build context'

@@ -44,6 +43,10 @@ node {
sh "rm -f ./debug"
handleError(message)
}

stage 'Start'

sh 'bin/start.sh'

stage 'Tests'

@@ -54,8 +57,14 @@ node {
def message = "BUILD ERROR: There was a problem building ${imagename}:${tag}. \n\n ${error_details}"
sh "rm -f ./debug"
handleError(message)
} finally {
sh 'bin/stop.sh'
}

stage 'Stop'

sh 'bin/stop.sh'

stage 'Push'

docker.withRegistry('https://registry.hub.docker.com/', "dockerhub-$maintainer") {
@@ -66,6 +75,10 @@ node {
stage 'Notify'

slackSend color: 'good', message: "$maintainer/$imagename:$tag pushed to DockerHub"

stage 'Cleanup'

sh 'rm -rf tmp'

}

13 changes: 13 additions & 0 deletions tests/running.bats
@@ -0,0 +1,13 @@
#!/usr/bin/env bats

load ../common

# Assumes process is running

@test "MySQL user running process" {
docker exec -i $imagename ps -u mysql
}

@test "Creates root account and database" {
docker exec -i $imagename mysql -u root --password="123321" -e 'show tables' registry
}

0 comments on commit 055a388

Please sign in to comment.