Prechádzať zdrojové kódy

HUE-8865 [ci] Provide auto push to master when tests pass

Romain 6 rokov pred
rodič
commit
f0f3902d15
1 zmenil súbory, kde vykonal 36 pridanie a 0 odobranie
  1. 36 0
      .circleci/config.yml

+ 36 - 0
.circleci/config.yml

@@ -97,3 +97,39 @@ jobs:
       - store_artifacts:
           path: test-reports
           destination: test-reports
+
+  commit:
+    docker:
+      - image: circleci/python:3.6.1
+
+    working_directory: ~/repo
+
+    steps:
+      - checkout
+
+      - add_ssh_keys:
+          fingerprints:
+            - "8c:68:29:28:04:80:38:31:c0:59:d9:3d:65:3e:b7:8c"
+
+      - run:
+          name: push to master
+          command: |
+            git push origin HEAD:master
+
+
+workflows:
+  version: 2
+  run-tests-and-rebase-master:
+    jobs:
+      - build:
+          filters:
+            branches:
+              ignore:
+                - master
+      - commit:
+          requires:
+            - build
+          filters:
+            branches:
+              only:
+                - /.*ci-commit-master.*/