From 60b42696c8044b7a8a42b4711c546b907d6715bf Mon Sep 17 00:00:00 2001 From: Raniere Silva Date: Fri, 3 Jan 2025 09:34:30 +0100 Subject: [PATCH] Improve GitLab CI --- .gitlab-ci.yml | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e5af3e89c..ed5a35393 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -33,6 +33,10 @@ stages: rules: - if: $CI_SERVER_HOST == 'git.gesis.org' && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == 'main' +.gesis-push-gesis: + rules: + - if: $CI_SERVER_HOST == 'git.gesis.org' && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == 'gesis' + include: - component: $CI_SERVER_FQDN/rse/docker/images/ansible/ansible-lint@10.2.6 inputs: @@ -50,6 +54,7 @@ include: rules: - if: $CI_SERVER_HOST == "git.gesis.org" && $CI_PIPELINE_SOURCE == "merge_request_event" - if: $CI_SERVER_HOST == 'git.gesis.org' && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == 'main' + - if: $CI_SERVER_HOST == 'git.gesis.org' && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == 'gesis' .gesis helm deploy: image: @@ -107,27 +112,37 @@ gesis helm acceptance deploy: - !reference [.gesis-manual-web, rules] - !reference [.gesis-merge-request, rules] - !reference [.gesis-push-main, rules] + - !reference [.gesis-push-gesis, rules] variables: HELM_ENVIRONMENT: acceptance extends: - .gesis helm deploy -gesis helm production deploy: +.gesis helm production deploy: resource_group: production stage: deploy-production-helm rules: - !reference [.gesis-manual-web, rules] - !reference [.gesis-push-main, rules] + - !reference [.gesis-push-gesis, rules] variables: HELM_ENVIRONMENT: stage extends: - .gesis helm deploy +.smoke test: + stage: test-acceptance + variables: + INTERACTIVE_URL: url + script: + - curl $INTERACTIVE_URL + smoke test to acceptance cluster: stage: test-acceptance rules: - !reference [.gesis-manual-web, rules] - !reference [.gesis-merge-request, rules] - !reference [.gesis-push-main, rules] - script: - - curl https://notebooks-test.gesis.org/binder/ + - !reference [.gesis-push-gesis, rules] + variables: + INTERACTIVE_URL: https://notebooks-test.gesis.org/binder/