-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.gitlab-ci.yml
79 lines (69 loc) · 2.02 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
72
73
74
75
76
77
78
79
variables:
ANSIBLE_FORCE_COLOR: 'true'
stages:
- test
- build-and-deploy
.run_on_dockerhost: &run_on_dockerhost
tags:
- docker20
before_script:
- docker login -u gitlab-ci-token -p ${CI_JOB_TOKEN} ${CI_REGISTRY}
image: gitlab.aimms.com:5050/other/dockerdev/documentation:latest
linkcheck:
<<: *run_on_dockerhost
stage: test
variables:
SPHINX_IGNORE_EXTERNAL_LINKS: "true"
script:
- python3 -msphinx -W --keep-going -b linkcheck . _build/linkcheck
linkcheck_external:
<<: *run_on_dockerhost
stage: test
script:
- python3 -msphinx -W --keep-going -b linkcheck . _build/linkcheck
allow_failure: true
spellcheck:
<<: *run_on_dockerhost
stage: test
script:
- python3 --version
- pip freeze
- python3 -msphinx -W --keep-going -b spelling . _build/spelling
build:
<<: *run_on_dockerhost
stage: test
script:
- sphinx-build -W --keep-going -b html . _build/html
artifacts:
paths:
- _build/html/**/*
deploy:
<<: *run_on_dockerhost
stage: build-and-deploy
rules:
- if: $CI_COMMIT_BRANCH == "master"
when: on_success
- when: never
script:
- sphinx-build -b html . _build/html
- bash load_ssh_key_for_deploy.sh
- rsync -rt _build/html/ [email protected]:/home/aimms/www/documentation.aimms.com
retry: 1
internal_documentation_deploy:
<<: *run_on_dockerhost
stage: build-and-deploy
script:
- sphinx-build -b html . _build/html
- bash load_ssh_key_for_deploy.sh
- ssh [email protected] mkdir -p /home/aimms/www/documentation-staging/${CI_COMMIT_BRANCH}
- rsync -r --omit-dir-times --delete-excluded _build/html/ [email protected]:/home/aimms/www/documentation-staging/${CI_COMMIT_BRANCH}
az_deploy:
<<: *run_on_dockerhost
stage: build-and-deploy
rules:
- if: $CI_COMMIT_BRANCH == "master"
when: on_success
- when: never
script:
- sphinx-build -b html . _build/html
- az storage copy -s '_build/html' --recursive --destination-container '$web' -- --overwrite=true --as-subdir=false