summary refs log tree commit diff
path: root/.circleci/config.yml
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2018-09-27 15:07:41 +0100
committerGitHub <noreply@github.com>2018-09-27 15:07:41 +0100
commitb5c976347b734bb5f208bd6a2f3928917c1738fb (patch)
treece9b34be78896a7c3aa027bb0532d5b5bf1c6310 /.circleci/config.yml
parentMerge pull request #3967 from matrix-org/rav/federation_handler_cleanups (diff)
parentDo the changelog.d dance (diff)
downloadsynapse-b5c976347b734bb5f208bd6a2f3928917c1738fb.tar.xz
Merge pull request #3946 from matrix-org/michaelkaye/automate_docker_hub_upload
Build and push docker image to hub automatically
Diffstat (limited to '.circleci/config.yml')
-rw-r--r--.circleci/config.yml26
1 files changed, 26 insertions, 0 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml
index 521aca22ef..3cb14793fc 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -1,5 +1,21 @@
 version: 2
 jobs:
+  dockerhubuploadrelease:
+    machine: true
+    steps:
+      - checkout
+      - run: docker build -f docker/Dockerfile -t matrixdotorg/synapse:$CIRCLE_TAG .
+      - run: docker login --username $DOCKER_HUB_USERNAME --password $DOCKER_HUB_PASSWORD
+      - run: docker push matrixdotorg/synapse:$CIRCLE_TAG
+  dockerhubuploadlatest:
+    machine: true
+    steps:
+      - checkout
+      - run: docker build -f docker/Dockerfile -t matrixdotorg/synapse:$CIRCLE_SHA1 .
+      - run: docker login --username $DOCKER_HUB_USERNAME --password $DOCKER_HUB_PASSWORD
+      - run: docker tag matrixdotorg/synapse:$CIRCLE_SHA1 matrixdotorg/synapse:latest
+      - run: docker push matrixdotorg/synapse:$CIRCLE_SHA1
+      - run: docker push matrixdotorg/synapse:latest
   sytestpy2:
     machine: true
     steps:
@@ -131,3 +147,13 @@ workflows:
           filters:
             branches:
               ignore: /develop|master|release-.*/
+      - dockerhubuploadrelease:
+          filters:
+            tags:
+              only: /^v[0-9].[0-9]+.[0-9]+(.[0-9]+)?/
+            branches:
+              ignore: /.*/
+      - dockerhubuploadlatest:
+          filters:
+            branches:
+              only: master