generated from nimblehq/git-template
-
Notifications
You must be signed in to change notification settings - Fork 0
138 lines (132 loc) · 4.86 KB
/
shared_deploy_cloudhub_1_0.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
name: Deploy to CloudHub 1.0
on:
workflow_call:
inputs:
cloudhub_region:
type: string
required: true
cloudhub_environment:
type: string
required: true
cloudhub_application_name:
type: string
mule_runtime_version:
type: string
required: true
default: 4.4.0
maven_settings_path:
description: Maven settings file path
type: string
required: true
default: .maven/settings.xml
checkout_ref:
description: The reference used for actions/checkout.
type: string
required: true
number_of_workers:
description: Number of workers
type: string
required: false
default: '1'
worker_type:
description: Size of each worker (MICRO - 0.1 vCores - default), SMALL - 0.2, MEDIUM - 1, LARGE - 2, XLARGE - 4, XXLARGE - 8, 4XLARGE - 16)
type: string
required: false
default: 'MICRO'
http_log_level:
description: HTTP Log Level (OFF, FATAL, ERROR, WARN, INFO, DEBUG, TRACE, ALL)
type: string
required: false
default: 'OFF'
intentional_http_log_level:
description: Intentionally or manually added HTTP Log Level (OFF, FATAL, ERROR, WARN, INFO, DEBUG, TRACE, ALL)
type: string
required: false
default: 'OFF'
disable_log4j2_file_appender:
description: Disable Log4j2 File Appender
type: boolean
required: false
default: false
timeout_minutes:
description: The maximum number of minutes to let a job run before GitHub automatically cancels it.
type: number
required: false
default: 15
java_version:
description: The Java version used to set up the Mulesoft environment.
type: number
required: false
secrets:
CONTD_APP_CLIENT_ID:
required: true
CONTD_APP_CLIENT_SECRET:
required: true
PLATFORM_CLIENT_ID:
required: false
PLATFORM_CLIENT_SECRET:
required: false
BUSINESS_GROUP_ID:
required: true
ENCRYPTION_KEY:
required: true
NEXUS_USERNAME:
required: false
NEXUS_PASSWORD:
required: false
NEW_RELIC_API_KEY:
required: false
jobs:
deploy:
name: Build and deploy
runs-on: ubuntu-latest
timeout-minutes: ${{ inputs.timeout_minutes }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ inputs.checkout_ref }}
- name: Comment out Log4j2 File Appender
if: inputs.disable_log4j2_file_appender == 'true'
shell: bash
run: |
perl -0777 -pe 's/<AppenderRef ref="file" \/>/<!-- <AppenderRef ref="file" \/> -->/g' -i.bak src/main/resources/log4j2.xml
cat src/main/resources/log4j2.xml
- name: Set up Mulesoft environment
uses: nimblehq/mulesoft-actions/[email protected]
with:
java_version: ${{ inputs.java_version }}
- name: Build with Maven
uses: nimblehq/mulesoft-actions/[email protected]
id: build
with:
use_artifacts: false
connected_app_client_id: ${{ secrets.CONTD_APP_CLIENT_ID }}
connected_app_client_secret: ${{ secrets.CONTD_APP_CLIENT_SECRET }}
business_group_id: ${{ secrets.BUSINESS_GROUP_ID }}
nexus_username: ${{ secrets.NEXUS_USERNAME }}
nexus_password: ${{ secrets.NEXUS_PASSWORD }}
maven_settings_path: ${{ inputs.maven_settings_path }}
- name: Deploy to CloudHub
uses: nimblehq/mulesoft-actions/[email protected]
with:
connected_app_client_id: ${{ secrets.CONTD_APP_CLIENT_ID }}
connected_app_client_secret: ${{ secrets.CONTD_APP_CLIENT_SECRET }}
platform_client_id: ${{ secrets.PLATFORM_CLIENT_ID }}
platform_client_secret: ${{ secrets.PLATFORM_CLIENT_SECRET }}
cloudhub_environment: ${{ inputs.cloudhub_environment }}
cloudhub_region: ${{ inputs.cloudhub_region }}
business_group_id: ${{ secrets.BUSINESS_GROUP_ID }}
cloudhub_application_name: ${{ inputs.cloudhub_application_name }}
use_artifact: false
mule_file_path: ${{ steps.build.outputs.mule_file_path }}
mule_runtime_version: ${{ inputs.mule_runtime_version }}
encryption_key: ${{ secrets.ENCRYPTION_KEY }}
nexus_username: ${{ secrets.NEXUS_USERNAME }}
nexus_password: ${{ secrets.NEXUS_PASSWORD }}
new_relic_api_key: ${{ secrets.NEW_RELIC_API_KEY }}
maven_settings_path: ${{ inputs.maven_settings_path }}
number_of_workers: ${{ inputs.number_of_workers }}
worker_type: ${{ inputs.worker_type }}
http_log_level: ${{ inputs.http_log_level }}
intentional_http_log_level: ${{ inputs.intentional_http_log_level }}