summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2017-10-02 21:45:40 +0200
committerGitHub <noreply@github.com>2017-10-02 21:45:40 +0200
commit083318d1babfefeb935223a53038a960b82a860c (patch)
treeafbecf359524caf3d5898c3bf1d49250dea2cf81
parent2a226d140f9b8dd023b745e287204cf76dfe2142 (diff)
downloadbugzilla-083318d1babfefeb935223a53038a960b82a860c.tar.gz
bugzilla-083318d1babfefeb935223a53038a960b82a860c.tar.xz
add support for building based on tags/branches
-rw-r--r--.circleci/config.yml30
1 files changed, 19 insertions, 11 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml
index 30bc162c8..a6339fdbc 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -60,15 +60,16 @@ jobs:
name: install git and ssh
command: apk update && apk add git openssh-client
- checkout
- - run: |
- docker build -t bmo .
+ - run: docker build -t bmo .
+ - deploy: |
if [[ -n "$DOCKERHUB_REPO" && -n "$DOCKER_USER" && -n "$DOCKER_PASS" ]]; then
- TAG="$CIRCLE_BRANCH"
- if [[ $TAG == "master" ]]; then
- docker tag bmo $DOCKERHUB_REPO:latest
+ TAG="${CIRCLE_TAG:-$CIRCLE_BRANCH}"
+ if [[ $TAG == "master" ]]; then
+ TAG=latest
+ fi
+ docker tag bmo $DOCKERHUB_REPO:$TAG
docker login -u "$DOCKER_USER" -p "$DOCKER_PASS"
- docker push $DOCKERHUB_REPO:latest
- fi
+ docker push $DOCKERHUB_REPO:$TAG
fi
test_sanity:
@@ -156,7 +157,7 @@ jobs:
workflows:
version: 2
- tests:
+ main:
jobs:
- test_sanity
- test_bmo
@@ -165,6 +166,13 @@ workflows:
- build:
requires:
- test_sanity
- - test_webservices
- - test_selenium
- - test_bmo
+ filters:
+ branches:
+ only:
+ - master
+ - development
+ - production
+ tags:
+ only:
+ - /release-[0-9]{6}\.[0-9]+/
+ - /test-[a-zA-Z0-9_-]+/ \ No newline at end of file