[damned-lies/develop: 4/4] chore: add gitlab ci jobs to deploy




commit e06c21a75f732c2179f669bfcd185d8cfc6b8331
Author: Guillaume Bernard <associations guillaume-bernard fr>
Date:   Wed Jul 7 22:08:30 2021 +0200

    chore: add gitlab ci jobs to deploy

 .gitlab-ci.yml | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 3f5def8a..c4defcfd 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,6 +1,7 @@
 stages:
   - build
   - test
+  - deploy
 
 
 workflow:
@@ -121,3 +122,28 @@ code-string-changes:
     paths:
       - "${TRANSLATION_DIFF_PO_FILENAME}"
     when: on_failure
+
+
+.deploy-instance:
+  image: alpine
+  stage: deploy
+  before_script:
+    - apk --no-cache add curl
+
+
+deploy:stable:
+  extends: .deploy-instance
+  script:
+    - curl -X POST $OSCP_WEBHOOK_PROD
+  rules:
+    - if: '$CI_COMMIT_BRANCH == "master"'
+      when: on_success
+
+
+deploy:devel:
+  extends: .deploy-instance
+  script:
+    - curl -X POST $OSCP_WEBHOOK_TESTING
+  rules:
+    - if: '$CI_COMMIT_BRANCH == "develop"'
+      when: on_success


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]