Skip to content

collection-github-workflow-jumpcloud-push #129

collection-github-workflow-jumpcloud-push

collection-github-workflow-jumpcloud-push #129

---
name: collection-github-workflow-jumpcloud-push
# For further details please consult the documentation here:
# https://github.com/niall-byrne/ansible-workbench
# Begin Cookiecutter Template Content
on:
push:
paths:
- ".github/workflows/workflow-jumpcloud-push.yml"
- "roles/jumpcloud/*"
- "roles/jumpcloud/**/*"
schedule:
- cron: "0 6 * * 1"
workflow_dispatch:
# secrets:
# SLACK_WEBHOOK:
# description: "Optional, enables Slack notifications."
# required: false
jobs:
configuration:
uses: cicd-tools-org/cicd-tools/.github/workflows/job-00-generic-read_json_file.yml@main
with:
JSON_FILE_PATH: ".github/config/workflows/workflow-push.json"
scenarios:
needs: [configuration]
uses: cicd-tools-org/cicd-tools/.github/workflows/job-00-generic-identify_molecule_scenarios.yml@main
with:
MOLECULE_EXCLUSION_REGEX: ${{ fromJSON(needs.configuration.outputs.JSON_FILE_DATA).ci_molecule_excluded_scenarios_regex }}
MOLECULE_SCENARIO_PATH: "roles/jumpcloud/molecule"
start:
secrets:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
uses: cicd-tools-org/cicd-tools/.github/workflows/job-00-generic-notification.yml@main
with:
NOTIFICATION_EMOJI: ":vertical_traffic_light:"
NOTIFICATION_MESSAGE: "workflow has started!"
WORKFLOW_NAME: "jumpcloud"
molecule_test:
needs: [configuration, scenarios]
secrets:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
strategy:
fail-fast: true
matrix:
scenario: ${{ fromJSON(needs.scenarios.outputs.SCENARIOS) }}
platform: ${{ fromJSON(needs.configuration.outputs.JSON_FILE_DATA).ci_molecule_test_platforms }}
max-parallel: ${{ fromJSON(needs.configuration.outputs.JSON_FILE_DATA).ci_concurrency_limit }}
uses: cicd-tools-org/cicd-tools/.github/workflows/job-40-poetry-molecule_command.yml@main
with:
CONCURRENCY: ${{ fromJSON(needs.configuration.outputs.JSON_FILE_DATA).ci_concurrency_limit }}
MOLECULE_COMMAND: "test"
MOLECULE_SCENARIO: ${{ matrix.scenario }}
PLATFORM: ${{ matrix.platform }}
PYTHON_VERSIONS: ${{ toJSON(fromJSON(needs.configuration.outputs.JSON_FILE_DATA).ci_python_versions) }}
TARGET_PATH: "roles/jumpcloud"
VERBOSE_NOTIFICATIONS: ${{ fromJSON(needs.configuration.outputs.JSON_FILE_DATA).ci_verbose_notifications }}
WORKFLOW_NAME: "jumpcloud"
success:
needs: [molecule_test, start]
secrets:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
uses: cicd-tools-org/cicd-tools/.github/workflows/job-00-generic-notification.yml@main
with:
NOTIFICATION_EMOJI: ":checkered_flag:"
NOTIFICATION_MESSAGE: "workflow has completed successfully!"
WORKFLOW_NAME: "jumpcloud"
# End Cookiecutter Template Content