Skip to content

Commit

Permalink
chore(ci) add some naive retries to our CI
Browse files Browse the repository at this point in the history
  • Loading branch information
hutchic committed Sep 23, 2020
1 parent f6715f7 commit 06bd830
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 8 deletions.
33 changes: 25 additions & 8 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ pipeline {
DOCKERHUB = credentials('dockerhub')
DOCKER_CLI_EXPERIMENTAL = "enabled"
}
options {
timeout(time: 120, unit: 'MINUTES')
parallelsAlwaysFailFast()
retry(2)
}
stages {
stage('Build Kong') {
when {
Expand Down Expand Up @@ -54,8 +59,11 @@ pipeline {
}
steps {
sh 'echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin || true'
sh 'git clone --single-branch --branch $KONG_SOURCE https://github.com/Kong/kong.git $KONG_SOURCE_LOCATION'
sh 'make test-kong'
retry(2) {
sh 'make cleanup'
sh 'git clone --single-branch --branch $KONG_SOURCE https://github.com/Kong/kong.git $KONG_SOURCE_LOCATION'
sh 'make test-kong'
}
}
}
stage('postgres') {
Expand All @@ -69,8 +77,11 @@ pipeline {
}
steps {
sh 'echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin || true'
sh 'git clone --single-branch --branch $KONG_SOURCE https://github.com/Kong/kong.git $KONG_SOURCE_LOCATION'
sh 'make test-kong'
retry(2) {
sh 'make cleanup'
sh 'git clone --single-branch --branch $KONG_SOURCE https://github.com/Kong/kong.git $KONG_SOURCE_LOCATION'
sh 'make test-kong'
}
}
}
stage('postgres plugins') {
Expand All @@ -85,8 +96,11 @@ pipeline {
}
steps {
sh 'echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin || true'
sh 'git clone --single-branch --branch $KONG_SOURCE https://github.com/Kong/kong.git $KONG_SOURCE_LOCATION'
sh 'make test-kong'
retry(2) {
sh 'make cleanup'
sh 'git clone --single-branch --branch $KONG_SOURCE https://github.com/Kong/kong.git $KONG_SOURCE_LOCATION'
sh 'make test-kong'
}
}
}
stage('cassandra') {
Expand All @@ -100,8 +114,11 @@ pipeline {
}
steps {
sh 'echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin || true'
sh 'git clone --single-branch --branch $KONG_SOURCE https://github.com/Kong/kong.git $KONG_SOURCE_LOCATION'
sh 'make test-kong'
retry(2) {
sh 'make cleanup'
sh 'git clone --single-branch --branch $KONG_SOURCE https://github.com/Kong/kong.git $KONG_SOURCE_LOCATION'
sh 'make test-kong'
}
}
}
}
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ cleanup-tests:
ifneq ($(RESTY_IMAGE_BASE),src)
docker-compose -f test/kong-tests-compose.yaml down
docker-compose -f test/kong-tests-compose.yaml rm -f
docker volume prune -f
endif

cleanup: cleanup-tests cleanup-build
Expand Down

0 comments on commit 06bd830

Please sign in to comment.