nightly-cod-platform-deploy #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@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 |