-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (67 loc) · 2.75 KB
/
workflow-jumpcloud-push.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
---
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