Browse Source

Skip CI Docker Image builds on Greenkeeper branches

We most likely will not want these Docker images and they can fail due
to characters in branch names that are not valid in Docker image tags.

Note: because CircleCI appears to allow only using sh, rather than bash,
we use the method from https://stackoverflow.com/questions/229551/string-contains-in-bash/20460402#2046040

Fixes https://github.com/pelias/api/issues/975
pull/983/head
Julian Simioni 7 years ago
parent
commit
d298ef495a
No known key found for this signature in database
GPG Key ID: 6DAD08919FDBF563
  1. 5
      .circleci/docker.sh

5
.circleci/docker.sh

@ -6,6 +6,11 @@ DATE=`date +%Y-%m-%d`
DOCKER_REPOSITORY="pelias"
DOCKER_PROJECT="${DOCKER_REPOSITORY}/${CIRCLE_PROJECT_REPONAME}"
# skip builds on greenkeeper branches
if [ "${CIRCLE_BRANCH##greenkeeper}" ]; then
exit 0
fi
# the name of the image that represents the "branch", that is an image that will be updated over time with the git branch
# the production branch is changed to "latest", otherwise the git branch becomes the name of the version
if [[ "${CIRCLE_BRANCH}" == "production" ]]; then

Loading…
Cancel
Save