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



commit a393c452a76e2c50fb8a9bb26afcb6e97e4238ab
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]