-
Notifications
You must be signed in to change notification settings - Fork 4
43 lines (38 loc) · 1.82 KB
/
nightly-cod-platform-deploy.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
name: nightly-cod-platform-deploy
on:
schedule:
- cron: "15 6 * * 1-5"
jobs:
nightly-cod-platform-deploy:
runs-on: "ubuntu-latest"
if: github.event.pull_request.base.repo.name == 'centreon'
env:
GH_TOKEN: ${{ github.token }}
steps:
- name: Checkout sources
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Check the status of the last nightly
id: check-latest-nightly-status
uses: ./.github/actions/check-latest-nightly-status
- name: Deploy the potential Centreon-on-Demand nightly instance of the day
if: ${{ steps.check-latest-nightly-status.outputs.last_nightly_result == 'success' }}
run: |
set -x
echo "[INFO]: Deploying a nightly CoD instance with the latest developments."
curl --fail \
-s \
-o /dev/null \
-X POST \
-H "Authorization: Bearer ${{ secrets.CENTREON_TECHNIQUE_PAT }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/centreon/centreon-on-demand/actions/workflows/deploy.yml/dispatches \
-d '{"ref": "main", "inputs":{"bu":"RD", \
"deployment_profile":"Standard profile", \
"poller_number":"1", \
"instance_features":"Alma9 - MariaDB", \
"centreon_branch":"develop", \
"custom_centreon_web_admin_password":"${{ secrets.COD_NIGHTLY_INSTANCE_ADMIN_PWD }}", \
"configured_resources":"false", \
"install_business_modules":"false" }}'
-w %http_code
shell: bash