-
Notifications
You must be signed in to change notification settings - Fork 12
/
.gitlab-ci.yml
64 lines (60 loc) · 1.44 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
image: python:slim
stages:
- lint
- pages
salt-lint:
stage: lint
tags:
- docker
script:
- pip install salt-lint
- salt-lint --json --severity $(find . -name \*.sls) > saltcodeclimate.json
only:
changes:
- formulas/**/*
- orch/**/*
- reactor/**/*
artifacts:
reports:
codequality: saltcodeclimate.json
when: always
pylint:
stage: lint
tags:
- docker
image: python:slim
before_script:
- pip install pylint_gitlab
script:
- pylint --exit-zero --output-format=text $(find ./_modules ./_runners ./_states -type f -name "*.py") | tee /tmp/pylint.txt
- pylint --exit-zero --output-format=pylint_gitlab.GitlabCodeClimateReporter $(find ./_modules ./_runners ./_states -type f -name "*.py") >> codeclimate.json
artifacts:
reports:
codequality: codeclimate.json
when: always
only:
changes:
- _grains/**/*
- _modules/**/*
- _runners/**/*
- _states/**/*
pages:
tags:
- docker-gcc
stage: pages
image:
name: antora/antora:latest
entrypoint: [/bin/sh, -c]
script:
- echo 'nav:' >> docs/antora.yml
- echo ' - modules/documentation/nav.adoc' >> docs/antora.yml
- antora site.yml --stacktrace
- echo '<html><meta http-equiv="refresh" content="0; url=./docs/latest/index.html"/></html>' > public/index.html
artifacts:
expire_in: 3 month
paths:
- public
only:
changes:
- site.yml
- docs/**/*