summaryrefslogtreecommitdiffstats
path: root/.circleci
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2017-07-25 21:19:54 +0200
committerGitHub <noreply@github.com>2017-07-25 21:19:54 +0200
commitea1d22b3f6151d7316ef73c4b4f08a4c8b591c72 (patch)
tree3eb14bab0b3a6389dc69cdbf0160b12a3aed287a /.circleci
parenta01545cbec992560a5bfe402cf395aabb97d5cfd (diff)
downloadbugzilla-ea1d22b3f6151d7316ef73c4b4f08a4c8b591c72.tar.gz
bugzilla-ea1d22b3f6151d7316ef73c4b4f08a4c8b591c72.tar.xz
Bug 1380531 - Write initial CircleCI configuration for BMO
This is the first (working) iteration of a configuration that allows CircleCI to build 'bmo' docker images that are runnable. Some other changes were required for this: 1. The base image used in Dockerfile was changed from centos:6.7 to mozillabteam/bmo-base:slim. This is a new version of (github) mozilla-bteam/docker-bmo-base which is much smaller, and includes all the system RPMs and other bits that our bmo Dockerfile expects. 2. init.pl mistakenly had '--no-assets' which is not currently a checksetup.pl option. 3. 901-secure-mail-loop.t (which checks for an infinite loop) had to have its timeout increased because CircleCI sometimes is quite slow. 4. version.txt // __version__ now includes build information from CircleCI environmental variables
Diffstat (limited to '.circleci')
-rw-r--r--.circleci/config.yml25
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