Skip to content

nightly-cod-platform-deploy #88

nightly-cod-platform-deploy

nightly-cod-platform-deploy #88

name: nightly-cod-platform-deploy
on:
schedule:
- cron: "15 6 * * 1-5"
jobs:
nightly-cod-platform-deploy:
runs-on: "ubuntu-latest"
env:
GH_TOKEN: ${{ github.token }}
steps:
- name: Checkout sources
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- 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 -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/dispatches \
-d '{"event_type": "deploy-nightly-platform",
"client_payload": {
"bu": "RD",
"deployment_profile": "Standard profile",
"remote_server_number": 1,
"poller_number": 1,
"instance_features": "Alma9 - MariaDB",
"centreon_branch": "develop",
"custom_centreon_web_admin_password": "${{ secrets.COD_NIGHTLY_INSTANCE_ADMIN_PWD }}",
"configured_resources": "true",
"install_business_modules": "false"
}
}'
shell: bash