-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
executable file
·62 lines (55 loc) · 1.67 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
---
stages:
- pre-commit
- build-docs
- publish
- trigger-upload
include:
- project: saltstack/pop/cicd/ci-templates
file: /docswork/url-tester-brok.yml
- project: saltstack/pop/cicd/ci-templates
file: /docswork/publish-docs-gitlab.yml
- project: saltstack/pop/cicd/ci-templates
file: /docswork/salt-publish-docs-release.yml
variables:
CICD_UPSTREAM_PATH: "saltstack/open/docs/salt-user-guide"
url-tester-brok:
stage: pre-commit
pre-commit:
stage: pre-commit
image: python:3.8-bullseye
variables:
PRE_COMMIT_HOME: "${CI_PROJECT_DIR}/pre-commit-cache"
cache:
key: pre-commit-cache
paths:
- pre-commit-cache/
script:
- pip install -U pip setuptools wheel
- pip install -r requirements-dev.txt
- wget https://github.com/errata-ai/vale/releases/download/v2.10.5/vale_2.10.5_Linux_64-bit.tar.gz -O - | tar xz -C /usr/local/bin/ vale
- wget https://github.com/vmware-tanzu/carvel-vendir/releases/download/v0.22.0/vendir-linux-amd64 -O /usr/local/bin/vendir && chmod 0755 /usr/local/bin/vendir
- pre-commit install
- pre-commit run -a -v --color always
build-docs-html:
stage: build-docs
image: python:3.8
script:
- apt update && apt install python3-enchant -y
- pip install -U pip setuptools wheel nox
- nox -e 'docs-html(clean=True)'
- mv docs/_build/html html
artifacts:
paths:
- html
expire_in: 30 days
pages:
stage: publish
variables:
CICD_DOCS_VERSION_LATEST: latest
publish-docs:
stage: trigger-upload
variables:
CICD_S3_DEST_PATH: "docs.saltproject.io/salt/user-guide/"
rules:
- if: '$CI_COMMIT_BRANCH == "master" && $CI_PROJECT_PATH == $CICD_UPSTREAM_PATH'