Skip to content

Commit

Permalink
Merge pull request #334 from Kong/chore/ci-retry
Browse files Browse the repository at this point in the history
chore(ci) add some naive retries to our CI
  • Loading branch information
hutchic authored Sep 23, 2020
2 parents 398a640 + 06bd830 commit ca84a4d
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 ca84a4d

Please sign in to comment.