From 50ce8ba6d79571c80ce4dd4befa46af24cb15427 Mon Sep 17 00:00:00 2001 From: David Ortiz Date: Fri, 13 Apr 2018 14:46:44 +0200 Subject: [PATCH] .circleci/config.yml: fix image tag in s2i-builder job The problem is that in PRs, `CIRCLE_BRANCH` includes a '/'. For example, for PR 567, it equals `pull/567`. That's an issue because in Docker, tags cannot contain '/'. This commits fixes the issue by using only the PR number. --- .circleci/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b928577a6..e8a36e0ab 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -33,7 +33,8 @@ jobs: - checkout - run: travis/install-s2i.sh /usr/local/bin # needs to be after checkout because it uses script from the repo - run: | - export IMAGE_NAME="quay.io/3scale/apicast:${CIRCLE_TAG:-${CIRCLE_BRANCH}}-builder" + export IMAGE_TAG=${CIRCLE_TAG:-${CIRCLE_PR_NUMBER:-${CIRCLE_BRANCH}}} + export IMAGE_NAME="quay.io/3scale/apicast:${IMAGE_TAG}-builder" make builder-image test-builder-image gateway-logs --keep-going make prove-docker make lint-schema