From dc94726c20f8c05a5b041bd0e5e7fd5cd27e0dc2 Mon Sep 17 00:00:00 2001 From: aptt Date: Thu, 16 Jan 2025 12:53:26 +0100 Subject: [PATCH 1/4] =?UTF-8?q?chore(ci):=20=F0=9F=A4=96=20add=20gitlab=20?= =?UTF-8?q?deployment=20test=20job?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/continuousIntgration.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/continuousIntgration.yml b/.github/workflows/continuousIntgration.yml index 6612d95..4d8306d 100644 --- a/.github/workflows/continuousIntgration.yml +++ b/.github/workflows/continuousIntgration.yml @@ -59,3 +59,16 @@ jobs: - run: pnpm install # script - run: pnpm -C frontend build + + test_gitlab_deployment: + runs-on: ubuntu-latest + env: + GITLAB_DEPLOYMENT_TRIGGER_TOKEN: ${{ secrets.GITLAB_DEPLOYMENT_TRIGGER_TOKEN }} + steps: + - run: | + curl -X POST \ + --fail \ + -F token="$GITLAB_DEPLOYMENT_TRIGGER_TOKEN" \ + -F "ref=main" \ + -F "variables[TEST_VARIABLE]=hello from github!" \ + https://gitlab.appswithlove.net/api/v4/projects/3937/trigger/pipeline From b1b71d56c790ac970ff1ac5b35a502e486ef246e Mon Sep 17 00:00:00 2001 From: aptt Date: Thu, 16 Jan 2025 13:10:34 +0100 Subject: [PATCH 2/4] =?UTF-8?q?chore(ci):=20=F0=9F=A4=96=20require=20linti?= =?UTF-8?q?ng=20&=20build=20before=20triggering=20gitlab?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/continuousIntgration.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/continuousIntgration.yml b/.github/workflows/continuousIntgration.yml index 4d8306d..62f74a7 100644 --- a/.github/workflows/continuousIntgration.yml +++ b/.github/workflows/continuousIntgration.yml @@ -61,6 +61,9 @@ jobs: - run: pnpm -C frontend build test_gitlab_deployment: + needs: + - lint_frontend + - build_frontend runs-on: ubuntu-latest env: GITLAB_DEPLOYMENT_TRIGGER_TOKEN: ${{ secrets.GITLAB_DEPLOYMENT_TRIGGER_TOKEN }} From 242d7630f758e16c5935f0192bce763341a26b5d Mon Sep 17 00:00:00 2001 From: aptt Date: Thu, 16 Jan 2025 13:10:55 +0100 Subject: [PATCH 3/4] =?UTF-8?q?chore(ci):=20=F0=9F=A4=96=20only=20trigger?= =?UTF-8?q?=20gitlab=20on=20main?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/continuousIntgration.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/continuousIntgration.yml b/.github/workflows/continuousIntgration.yml index 62f74a7..f6d503b 100644 --- a/.github/workflows/continuousIntgration.yml +++ b/.github/workflows/continuousIntgration.yml @@ -75,3 +75,4 @@ jobs: -F "ref=main" \ -F "variables[TEST_VARIABLE]=hello from github!" \ https://gitlab.appswithlove.net/api/v4/projects/3937/trigger/pipeline + if: github.ref == 'refs/heads/main' From bbec8d239b4fc25627ef420b04562e9d2e2cfbcb Mon Sep 17 00:00:00 2001 From: aptt Date: Thu, 16 Jan 2025 13:12:46 +0100 Subject: [PATCH 4/4] =?UTF-8?q?chore(ci):=20=F0=9F=A4=96=20rename=20gitlab?= =?UTF-8?q?=20trigger=20job=20&=20remove=20test=20variable?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/continuousIntgration.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/continuousIntgration.yml b/.github/workflows/continuousIntgration.yml index f6d503b..897100a 100644 --- a/.github/workflows/continuousIntgration.yml +++ b/.github/workflows/continuousIntgration.yml @@ -60,7 +60,7 @@ jobs: # script - run: pnpm -C frontend build - test_gitlab_deployment: + trigger_gitlab_deployment: needs: - lint_frontend - build_frontend @@ -73,6 +73,5 @@ jobs: --fail \ -F token="$GITLAB_DEPLOYMENT_TRIGGER_TOKEN" \ -F "ref=main" \ - -F "variables[TEST_VARIABLE]=hello from github!" \ https://gitlab.appswithlove.net/api/v4/projects/3937/trigger/pipeline if: github.ref == 'refs/heads/main'