-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (61 loc) · 2.38 KB
/
Copy pathmule-debug.yml
File metadata and controls
71 lines (61 loc) · 2.38 KB
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
##########################################################################
# CICD Pipeline
##########################################################################
name: Debug
on:
workflow_call:
env:
CONFIGURATIONS_REPOSITORY: common-configurations
GLOBAL_CONFIGURATION: _global.yml
SECRETS_AZURE_KEYVAULT: CoveredCA-KV-Mulesoft
MESSAGE_SERVICE_TRIGGER_DEPLOYMENT: The build job triggered the deployment
jobs:
Debug:
name: Build
runs-on: ubuntu-latest
# Assigning permissions to jobs - https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
permissions:
actions: write
checks: write
contents: write
deployments: write
id-token: write
issues: write
discussions: write
packages: write
pages: write
pull-requests: write
repository-projects: write
security-events: write
statuses: write
steps:
- name: Get token from Github App
id: app-token
uses: CoveredCA/common-devops/packages/app-token@main
with:
client-id: ${{ secrets.MULESOFT_GITHUBAPP_CLIENTID}}
privatekey: ${{ secrets.MULESOFT_GITHUBAPP_PRIVATEKEY }}
- name: Get service configuration
uses: CoveredCA/common-devops/packages/configuration-service@main
- name: Create a deployment issue
id: create-deployment-issue
if: "env.configuration_environments != '' && !contains(env.service_version, 'snapshot')"
env:
GITHUB_TOKEN: ${{ env.github_automationbot_token }}
shell: bash
run: |
echo " "
echo "***********************************************"
echo "Create Deployment Issue "
echo "***********************************************"
echo " "
echo " Create issue for deployment in the first environment from list: $configuration_environments"
# Environment list to an array
read -a array <<< "$configuration_environments"
echo " Environment to deploy the application: ${array[0]}"
gh -R "${{ github.repository }}" issue create \
-t "Deployment ${array[0]} ${{ env.service_name }} ${{ env.service_version }}" \
-a "${{ github.triggering_actor}}" \
-b "${{ env.MESSAGE_SERVICE_TRIGGER_DEPLOYMENT }}" \
-l "deployment" \
-p "${{ env.deployment_project }}"