-
Notifications
You must be signed in to change notification settings - Fork 6
165 lines (148 loc) · 5.94 KB
/
robot-nightly.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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
name: robot-nightly
run-name: nightly robot ${{ github.head_ref || github.ref_name }}
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
jobs:
dispatch-to-maintained-branches:
if: ${{ github.event_name == 'schedule' && github.ref_name == 'develop' }}
runs-on: ubuntu-22.04
steps:
- name: Checkout sources
uses: actions/checkout@v4
- run: |
gh workflow run robot-nightly.yml -r "dev-23.10.x"
gh workflow run robot-nightly.yml -r "dev-23.04.x"
gh workflow run robot-nightly.yml -r "dev-22.10.x"
gh workflow run robot-nightly.yml -r "dev-22.04.x"
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
get-version:
uses: ./.github/workflows/get-version.yml
veracode-analysis:
needs: [get-version]
uses: ./.github/workflows/veracode-analysis.yml
if: github.ref_name == 'develop'
with:
module_name: centreon-collect
major_version: ${{ needs.get-version.outputs.version }}
minor_version: ${{ needs.get-version.outputs.patch }}
img_version: ${{ needs.get-version.outputs.img_version }}
secrets:
veracode_api_id: ${{ secrets.VERACODE_API_ID_COLL }}
veracode_api_key: ${{ secrets.VERACODE_API_KEY_COLL }}
veracode_srcclr_token: ${{ secrets.VERACODE_SRCCLR_TOKEN }}
docker_registry_id: ${{ secrets.DOCKER_REGISTRY_ID }}
docker_registry_passwd: ${{ secrets.DOCKER_REGISTRY_PASSWD }}
#package:
# needs: [get-version]
# uses: ./.github/workflows/package-collect.yml
# with:
# version: ${{ needs.get-version.outputs.version }}.${{ needs.get-version.outputs.patch }}
# img_version: ${{ needs.get-version.outputs.img_version }}
# release: ${{ needs.get-version.outputs.release }}
# commit_hash: ${{ github.sha }}
# secrets: inherit
robot-test:
needs: [get-version]
strategy:
fail-fast: false
matrix:
include:
- distrib: el9
image: centreon-collect-alma9-test
package_extension: rpm
arch: amd64
database_type: mariadb
test_group_name: robot_test-mariadb-el9-amd64
tests_params: '{}'
- distrib: el9
image: centreon-collect-mysql-alma9-test
package_extension: rpm
arch: amd64
database_type: mysql
test_group_name: robot_test-mysql-el9-amd64
tests_params: '{}'
- distrib: bullseye
image: centreon-collect-debian-bullseye-arm64-test
package_extension: deb
arch: arm64
database_type: mariadb
test_group_name: robot_test-mariadb-el9-arm64
tests_params: '{}'
- distrib: el9
image: centreon-collect-alma9-test
package_extension: rpm
arch: amd64
database_type: mariadb
test_group_name: robot_test-mariadb-el9-amd64-grpc
tests_params: '{"default_transport":"grpc","default_bbdo_version":"3.1.0"}'
name: ${{ matrix.test_group_name }}
uses: ./.github/workflows/robot-test.yml
with:
distrib: ${{ matrix.distrib }}
arch: ${{ matrix.arch }}
image: ${{ matrix.image }}
image_test: ${{ matrix.image }}:${{ needs.get-version.outputs.test_img_version }}
image_version: ${{ needs.get-version.outputs.img_version }}
package_cache_key: cache-${{ github.sha }}-${{ matrix.package_extension}}-centreon-collect-${{ matrix.distrib }}-${{ matrix.arch }}-${{ github.head_ref || github.ref_name }}
package_cache_path: ./*.${{ matrix.package_extension}}
database_type: ${{ matrix.database_type }}
tests_params: ${{matrix.tests_params}}
test_group_name: ${{matrix.test_group_name}}
secrets:
registry_username: ${{ secrets.DOCKER_REGISTRY_ID }}
registry_password: ${{ secrets.DOCKER_REGISTRY_PASSWD }}
collect_s3_access_key: ${{ secrets.COLLECT_S3_ACCESS_KEY }}
collect_s3_secret_key: ${{ secrets.COLLECT_S3_SECRET_KEY }}
xray_client_id: ${{ secrets.XRAY_CLIENT_ID }}
xray_client_secret: ${{ secrets.XRAY_CLIENT_SECRET }}
deliver-rpm:
if: ${{ contains(fromJson('["unstable"]'), needs.get-version.outputs.stability) }}
needs: [robot-test, get-version]
runs-on: [self-hosted, common]
strategy:
matrix:
distrib: [el8, el9]
name: deliver ${{ matrix.distrib }}
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Publish RPM packages
uses: ./.github/actions/delivery
with:
module_name: collect
distrib: ${{ matrix.distrib }}
version: ${{ needs.get-version.outputs.version }}
artifactory_token: ${{ secrets.ARTIFACTORY_ACCESS_TOKEN }}
cache_key: cache-${{ github.sha }}-rpm-centreon-collect-${{ matrix.distrib }}-amd64-${{ github.head_ref || github.ref_name }}
stability: ${{ needs.get-version.outputs.stability }}
deliver-deb:
if: ${{ contains(fromJson('["unstable"]'), needs.get-version.outputs.stability) }}
needs: [robot-test, get-version]
runs-on: [self-hosted, common]
strategy:
matrix:
include:
- distrib: bullseye
arch: amd64
- distrib: bullseye
arch: arm64
name: deliver ${{ matrix.distrib }}
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Publish DEB packages
uses: ./.github/actions/delivery
with:
module_name: collect
distrib: ${{ matrix.distrib }}
version: ${{ needs.get-version.outputs.version }}
artifactory_token: ${{ secrets.ARTIFACTORY_ACCESS_TOKEN }}
cache_key: cache-${{ github.sha }}-deb-centreon-collect-${{ matrix.distrib }}-${{ matrix.arch }}-${{ github.head_ref || github.ref_name }}
stability: ${{ needs.get-version.outputs.stability }}