diff options
Diffstat (limited to '.circleci/config.yml')
-rw-r--r-- | .circleci/config.yml | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 000000000..18d282917 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,25 @@ +# References: +# 1. https://circleci.com/blog/how-to-build-a-docker-image-on-circleci-2-0/ +# 2. https://circleci.com/docs/2.0/building-docker-images/ +# + +version: 2 +jobs: + build: + working_directory: /app + docker: + - image: docker:17.06.1-ce + environment: + BMO_IMAGE_NAME: mozillabteam/bmo + steps: + - setup_remote_docker + - run: + name: install git and ssh + command: apk update && apk add git openssh-client + - checkout + - run: | + docker build -t $BMO_IMAGE_NAME:$CIRCLE_BRANCH . + if [[ -n "$DOCKER_USER" && -n "$DOCKER_PASS" ]]; then + docker login -u "$DOCKER_USER" -p "$DOCKER_PASS" + docker push $BMO_IMAGE_NAME:$CIRCLE_BRANCH + fi |