-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
71 lines (68 loc) · 2.15 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
Build container:
stage: build
rules:
- if: $CI_PIPELINE_SOURCE == "web" && $CI_COMMIT_BRANCH == 'main'
when: manual
- if: ($CI_PIPELINE_SOURCE != "schedule") && $CI_COMMIT_BRANCH == 'main'
changes:
- Dockerfile
- requirements.dev.txt
- requirements.prod.txt
image: docker-private.gesis.intra/gesis/dc:5.7
services:
- name: docker-private.gesis.intra/gesis/dind:5.5
alias: docker
dependencies: []
script:
- docker build --no-cache --pull -t docker-private-snapshots.gesis.intra/gesis/ilcm/orc2-status-bot:latest .
- docker push docker-private-snapshots.gesis.intra/gesis/ilcm/orc2-status-bot:latest
black:
stage: test
rules:
- if: (($CI_PIPELINE_SOURCE != "schedule") && $CI_COMMIT_BRANCH == 'main') || $CI_PIPELINE_SOURCE == 'merge_request_event'
changes:
- test/**/*
image: docker-private-snapshots.gesis.intra/gesis/ilcm/orc2-status-bot:latest
dependencies: []
script:
- black --check test
pylint:
stage: test
rules:
- if: (($CI_PIPELINE_SOURCE != "schedule") && $CI_COMMIT_BRANCH == 'main') || $CI_PIPELINE_SOURCE == 'merge_request_event'
changes:
- test/**/*
image: docker-private-snapshots.gesis.intra/gesis/ilcm/orc2-status-bot:latest
dependencies: []
script:
- pylint test/*.py
Test https://notebooks.gesis.org:
stage: deploy
variables:
BINDER_HUB_URL: https://notebooks.gesis.org/binder/
JUPYTER_HUB_URL: https://notebooks.gesis.org/binder/jupyter/
rules:
- if: $CI_PIPELINE_SOURCE == "push"
- if: $CI_PIPELINE_SOURCE == "web"
- if: $CI_PIPELINE_SOURCE == "pipeline"
- if: $CI_PIPELINE_SOURCE == "schedule"
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
changes:
- test/**/*
image:
name: docker-private-snapshots.gesis.intra/gesis/ilcm/orc2-status-bot:latest
dependencies: []
script:
- openssl s_client -connect notebooks.gesis.org:443
- |
pytest \
--binder-url $BINDER_HUB_URL \
--hub-url $JUPYTER_HUB_URL \
--log-level=INFO \
--log-cli-level=INFO \
test
artifacts:
paths:
- build.log
expire_in: 1 day
expose_as: build log