Skip to content

Commit

Permalink
Improve GitLab CI
Browse files Browse the repository at this point in the history
  • Loading branch information
rgaiacs committed Jan 3, 2025
1 parent 9850e9a commit 60b4269
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
inputs:
Expand All @@ -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:
Expand Down Expand Up @@ -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/

0 comments on commit 60b4269

Please sign in to comment.