From 34804f8d1de8cc503e4f9a81e17e0c69bd91ad1b Mon Sep 17 00:00:00 2001 From: Imran Hussain Date: Mon, 1 Jul 2019 17:03:22 +0100 Subject: [PATCH 1/5] SUCS Site auto deploy on push --- .gitlab-ci.yml | 12 ++++++++---- htdocs/pull.php | 5 +++++ 2 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 htdocs/pull.php diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0dbc258..d6c849a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -33,18 +33,22 @@ js-syntax-check: - npm install -g jshint - find htdocs/js/ -name *.js ! -name jquery* | xargs -n 1 jshint --verbose -fake-deploy-beta: +deploy-beta: stage: deploy script: - - echo "Hello World!" + - apt update + - apt install curl + - curl https://beta.sucs.org/pull.php only: - beta environment: beta -fake-deploy-live: +deploy-live: stage: deploy script: - - echo "Hello World!" + - apt update + - apt install curl + - curl https://sucs.org/pull.php only: - sucs-site environment: live \ No newline at end of file diff --git a/htdocs/pull.php b/htdocs/pull.php new file mode 100644 index 0000000..1f6d0c2 --- /dev/null +++ b/htdocs/pull.php @@ -0,0 +1,5 @@ + \ No newline at end of file -- GitLab From 94fccbb18d4ea2cf2939f1cb3942ae915284104f Mon Sep 17 00:00:00 2001 From: Imran Hussain Date: Mon, 1 Jul 2019 17:11:32 +0100 Subject: [PATCH 2/5] non-interactive! need a -y in gitlab-ci! --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d6c849a..7639f8a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -37,7 +37,7 @@ deploy-beta: stage: deploy script: - apt update - - apt install curl + - apt install -y curl - curl https://beta.sucs.org/pull.php only: - beta @@ -47,7 +47,7 @@ deploy-live: stage: deploy script: - apt update - - apt install curl + - apt install -y curl - curl https://sucs.org/pull.php only: - sucs-site -- GitLab From 8c489c75f2d45e8cff4327b6ae449a9221bfbcca Mon Sep 17 00:00:00 2001 From: Imran Hussain Date: Mon, 1 Jul 2019 17:39:03 +0100 Subject: [PATCH 3/5] throw in a --insecure as the LE cert not trusted by this docker container --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7639f8a..1d5d539 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -38,7 +38,7 @@ deploy-beta: script: - apt update - apt install -y curl - - curl https://beta.sucs.org/pull.php + - curl --insecure https://beta.sucs.org/pull.php only: - beta environment: beta @@ -48,7 +48,7 @@ deploy-live: script: - apt update - apt install -y curl - - curl https://sucs.org/pull.php + - curl --insecure https://sucs.org/pull.php only: - sucs-site environment: live \ No newline at end of file -- GitLab From 503dc539b015bc38bfa43870477cfcf09a9741d1 Mon Sep 17 00:00:00 2001 From: Imran Hussain Date: Tue, 2 Jul 2019 09:34:45 +0100 Subject: [PATCH 4/5] Revert "throw in a --insecure as the LE cert not trusted by this docker container" This reverts commit 8c489c75f2d45e8cff4327b6ae449a9221bfbcca --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1d5d539..7639f8a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -38,7 +38,7 @@ deploy-beta: script: - apt update - apt install -y curl - - curl --insecure https://beta.sucs.org/pull.php + - curl https://beta.sucs.org/pull.php only: - beta environment: beta @@ -48,7 +48,7 @@ deploy-live: script: - apt update - apt install -y curl - - curl --insecure https://sucs.org/pull.php + - curl https://sucs.org/pull.php only: - sucs-site environment: live \ No newline at end of file -- GitLab From 56268f161e4f2c75fa6afc3928d7aab8d5e48697 Mon Sep 17 00:00:00 2001 From: Imran Hussain Date: Tue, 2 Jul 2019 09:41:18 +0100 Subject: [PATCH 5/5] make the pull script do errors better --- htdocs/pull.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/htdocs/pull.php b/htdocs/pull.php index 1f6d0c2..b70f210 100644 --- a/htdocs/pull.php +++ b/htdocs/pull.php @@ -1,5 +1,14 @@ \ No newline at end of file -- GitLab