-
Notifications
You must be signed in to change notification settings - Fork 24
146 lines (143 loc) · 4.18 KB
/
build.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
---
name: CI
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
env:
PY_COLORS: 1
ANSIBLE_FORCE_COLOR: 1
ANSIBLE_STDOUT_CALLBACK: yaml
jobs:
lint:
if: ${{ !contains(github.head.ref, 'dependabot') }}
runs-on: ubuntu-latest
container: leandelivery/docker-ansible-ci:ansible-7
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Lints
run: |
git clone https://github.com/lean-delivery/ansible-lint-rules.git ~/ansible-lint-rules
yamllint . -c .yamllint
# ansible-lint . -c .ansible-lint # https://github.com/lean-delivery/ansible-role-sonarqube/issues/3023
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
all-sonar-latest:
needs: lint
runs-on: ubuntu-latest
timeout-minutes: 30
container: leandelivery/docker-ansible-ci:ansible-7
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Prepare
run: |
ansible --version
ansible-lint --version
molecule --version
rm -rf molecule/resources/provisioning
git clone https://github.com/lean-delivery/ansible-molecule-drivers.git molecule/resources/provisioning
- name: Molecule
run: molecule test -s default
ubuntu1804-sonar:
needs: lint
strategy:
matrix:
sonar_version:
- '10.7.0.96327'
- '10.6.0.92116'
- '10.5.1.90531'
- '10.4.1.88267'
- '10.3.0.82913'
- '10.2.1.78527'
- '10.1.0.73491'
- '10.0.0.68432'
- '9.9.8.100196'
- '8.9.10.61524'
fail-fast: false
runs-on: ubuntu-latest
timeout-minutes: 30
container: leandelivery/docker-ansible-ci:ansible-7
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Prepare
run: |
ansible --version
ansible-lint --version
molecule --version
rm -rf molecule/resources/provisioning
git clone https://github.com/lean-delivery/ansible-molecule-drivers.git molecule/resources/provisioning
- name: Molecule
run: molecule test -s base
env:
SONAR_VERSION: ${{ matrix.sonar_version }}
ubuntu1804-sonar-7:
needs: lint
strategy:
matrix:
sonar_version:
- '7.9.6'
fail-fast: false
runs-on: ubuntu-latest
timeout-minutes: 30
container: leandelivery/docker-ansible-ci:ansible-7
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Prepare
run: |
ansible --version
ansible-lint --version
molecule --version
rm -rf molecule/resources/provisioning
git clone https://github.com/lean-delivery/ansible-molecule-drivers.git molecule/resources/provisioning
- name: Molecule
run: molecule test -s java11
env:
SONAR_VERSION: ${{ matrix.sonar_version }}
ubuntu1804-ansible:
needs: lint
strategy:
matrix:
ansible_version:
- 6
fail-fast: false
runs-on: ubuntu-latest
timeout-minutes: 30
container: leandelivery/docker-ansible-ci:ansible-${{ matrix.ansible_version }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Prepare
run: |
ansible --version
ansible-lint --version
molecule --version
rm -rf molecule/resources/provisioning
git clone https://github.com/lean-delivery/ansible-molecule-drivers.git molecule/resources/provisioning
- name: Molecule
run: molecule test -s default