[SUCS Devel] [Git][sucssite/doorkey][master] Add CI/CD to doorkey

Imran Hussain (@imranh) imranh at sucs.org
Fri Dec 31 17:47:29 GMT 2021



Imran Hussain pushed to branch master at sucssite / doorkey


Commits:
7486ecd8 by Imran Hussain at 2021-12-31T17:47:09+00:00
Add CI/CD to doorkey

- - - - -


2 changed files:

- + .gitlab-ci.yml
- + public/pull.php


Changes:

=====================================
.gitlab-ci.yml
=====================================
@@ -0,0 +1,24 @@
+stages:
+  - test
+  - deploy
+
+
+#before_script:
+
+php-syntax-check:
+  stage: test
+  script:
+   - apt-get clean
+   - apt-get update
+   - apt-get install -y php-cli
+   - php -l public/index.php
+   - php -l public/pull.php
+
+deploy-live:
+  stage: deploy
+  image: curlimages/curl:7.80.0
+  script:
+   - curl --fail-with-body https://doorkey.sucs.org/pull.php
+  only:
+   - master
+  environment: live


=====================================
public/pull.php
=====================================
@@ -0,0 +1,14 @@
+<?php
+
+exec("cd ..; git reset --hard HEAD; git pull", $retArr, $retVal);
+
+if ($retVal == 0) {
+	print("ok");
+	exit(0);
+}
+
+print("not ok\n");
+var_dump($retArr);
+var_dump($retVal);
+
+?>
\ No newline at end of file



View it on GitLab: https://projects.sucs.org/sucssite/doorkey/-/commit/7486ecd8269400c4354ebacd3cd52ff7e2e5c341

-- 
View it on GitLab: https://projects.sucs.org/sucssite/doorkey/-/commit/7486ecd8269400c4354ebacd3cd52ff7e2e5c341
You're receiving this email because of your account on projects.sucs.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sucs.org/pipermail/devel/attachments/20211231/0fb57d7e/attachment-0001.html>


More information about the Devel mailing list