diff --git a/Jenkinsfile b/Jenkinsfile index 9be07891..a1995342 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -47,6 +47,9 @@ pipeline { PRIVATE_KEY_FILE = credentials('kong.private.gpg-key.asc') PRIVATE_KEY_PASSPHRASE = credentials('kong.private.gpg-key.asc.password') } + options { + retry(2) + } steps { sh 'echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin || true' sh 'while /bin/bash -c "ps aux | grep [a]pt-get"; do sleep 5; done' @@ -67,6 +70,9 @@ pipeline { PATH = "/home/ubuntu/bin/:${env.PATH}" GITHUB_SSH_KEY = credentials('github_bot_ssh_key') } + options { + retry(2) + } steps { sh 'echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin || true' sh 'while /bin/bash -c "ps aux | grep [a]pt-get"; do sleep 5; done' @@ -87,6 +93,9 @@ pipeline { PATH = "/home/ubuntu/bin/:${env.PATH}" GITHUB_SSH_KEY = credentials('github_bot_ssh_key') } + options { + retry(2) + } steps { sh 'echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin || true' sh 'while /bin/bash -c "ps aux | grep [a]pt-get"; do sleep 5; done' @@ -111,6 +120,9 @@ pipeline { DOCKER_REPOSITORY = "kong/kong-build-tools-private" KONG_PACKAGE_NAME = "kong-enterprise-edition-fips" } + options { + retry(2) + } steps { sh 'echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin || true' sh 'while /bin/bash -c "ps aux | grep [a]pt-get"; do sleep 5; done' @@ -145,6 +157,9 @@ pipeline { PRIVATE_KEY_FILE = credentials('kong.private.gpg-key.asc') PRIVATE_KEY_PASSPHRASE = credentials('kong.private.gpg-key.asc.password') } + options { + retry(2) + } steps { sh 'echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin || true' sh 'while /bin/bash -c "ps aux | grep [a]pt-get"; do sleep 5; done' @@ -165,6 +180,9 @@ pipeline { AWS_ACCESS_KEY = "instance-profile" GITHUB_SSH_KEY = credentials('github_bot_ssh_key') } + options { + retry(2) + } steps { sh 'echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin || true' sh 'while /bin/bash -c "ps aux | grep [a]pt-get"; do sleep 5; done' @@ -185,6 +203,9 @@ pipeline { GITHUB_SSH_KEY = credentials('github_bot_ssh_key') PATH = "/home/ubuntu/bin/:${env.PATH}" } + options { + retry(2) + } steps { sh 'mkdir -p /home/ubuntu/bin/' sh 'echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin || true' diff --git a/dockerfiles/Dockerfile.openresty b/dockerfiles/Dockerfile.openresty index b434f475..1c4dd014 100644 --- a/dockerfiles/Dockerfile.openresty +++ b/dockerfiles/Dockerfile.openresty @@ -75,7 +75,8 @@ COPY lua-kong-nginx-module /distribution/lua-kong-nginx-module COPY lua-resty-lmdb /distribution/lua-resty-lmdb ARG DEBUG=1 -RUN DEBUG="${DEBUG}" /tmp/build-openresty.sh +ENV DEBUG $DEBUG +RUN /tmp/build-openresty.sh || /tmp/build-openresty.sh RUN sed -i 's/\/tmp\/build//' `grep -l -I -r '\/tmp\/build' /tmp/build/` || true