-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
94 lines (85 loc) · 2.29 KB
/
.gitlab-ci.yml
File metadata and controls
94 lines (85 loc) · 2.29 KB
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
---
include:
- project: nofusscomputing/projects/gitlab-ci
ref: development
file:
- template/automagic.gitlab-ci.yaml
variables:
GIT_SUBMODULE_STRATEGY: normal
GIT_SYNC_URL: "https://$GITHUB_USERNAME_ROBOT:$GITHUB_TOKEN_ROBOT@github.com/NoFussComputing/ansible_playbooks.git"
MY_PROJECT_ID: "46364551"
PAGES_ENVIRONMENT_PATH: projects/ansible/playbooks/
ANSIBLE_FORCE_COLOR: 'true'
GIT_SUBMODULE_DEPTH: 1
Prepare:
stage: test
image: nofusscomputing/ansible-ee:dev
before_script:
# - export ANSIBLE_ROLES_PATH=test/roles
- ansible-galaxy install -r test/roles/requirements.yaml -p test/roles/
script:
- ansible-playbook test/test.yaml -vvv --tags prepare
dependencies: []
artifacts:
untracked: false
when: always
expire_in: "1 year"
paths:
- "scratchpad/"
- "test/"
rules:
- if: $CI_COMMIT_BRANCH
when: always
- when: never
Tests:
stage: test
image: nofusscomputing/ansible-ee:dev
needs:
- job: Prepare
artifacts: true
variables:
ANSIBLE_FORCE_COLOR: 'false'
GIT_STRATEGY: none
script:
- ansible-playbook test/test.yaml -vvv --tags $NFC_JOB_TAG
parallel:
matrix:
- NFC_JOB_TAG: unit
# - NFC_JOB_TAG: functional
artifacts:
untracked: false
when: always
expire_in: "1 year"
reports:
junit:
- "$CI_PROJECT_DIR/scratchpad/*.junit.xml"
rules:
- if: $CI_COMMIT_BRANCH
when: on_success
- when: never
execution_environment.Submodule.Deploy:
extends: .submodule_update_trigger
variables:
SUBMODULE_UPDATE_TRIGGER_PROJECT: nofusscomputing/projects/ansible/execution_environment
GIT_COMMIT_TYPE: feat
GIT_COMMIT_TYPE_CATEGORY: $CI_PROJECT_NAME
Website.Submodule.Deploy:
extends: .submodule_update_trigger
variables:
SUBMODULE_UPDATE_TRIGGER_PROJECT: nofusscomputing/infrastructure/website
GIT_COMMIT_TYPE: feat
environment:
url: https://nofusscomputing.com/$PAGES_ENVIRONMENT_PATH
name: Documentation
rules:
- if: # condition_dev_branch_push
$CI_COMMIT_BRANCH == "development" &&
$CI_PIPELINE_SOURCE == "push"
exists:
- '{docs/**,pages/**}/*.md'
changes:
paths:
- '{docs/**,pages/**}/*.md'
compare_to: 'master'
when: always
- when: never