-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
53 lines (44 loc) · 1.17 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
variables:
GIT_SUBMODULE_STRATEGY: normal
stages: # List of stages for jobs, and their order of execution
- build-page
- build-container
- run-test
docker:
stage: build-container
only:
- main
image: docker:latest
services:
- name: docker:dind
alias: docker
before_script:
- apk update && apk add git
- apt-get update -qq && apt-get install -y -qq git
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script:
- docker build --pull -t "$CI_REGISTRY_IMAGE:latest" .
- docker push "$CI_REGISTRY_IMAGE:latest"
test: # Test run
stage: run-test
image: python:3.8-buster
before_script:
- pip install -r requirements.txt
script:
- test/test_key_yaml.py
page: # This job runs in the build stage, which runs first.
stage: build-page
image: python:3.8-buster
before_script:
- pip install -r requirements.txt
artifacts:
paths:
- public
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
script:
- mkdir .public
- cp -r ./* .public
- rm -rf public
- mv .public public
- mkdocs build --strict --verbose