generated from nimblehq/git-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
101 lines (99 loc) · 3.36 KB
/
action.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
name: Deploy to CloudHub 1.0
description: Deploy to CloudHub 1.0 with Maven
inputs:
use_artifact:
description: Download artifact
default: 'true'
artifact_name:
description: Artifact name
default: build-artifacts
mule_file_path:
description: Mule file path
required: true
connected_app_client_id:
description: CloudHub connected app client ID
required: true
connected_app_client_secret:
description: CloudHub connected app client secret
required: true
platform_client_id:
description: Anypoint Platform Client ID
required: false
platform_client_secret:
description: Anypoint Platform Client Secret
required: false
cloudhub_environment:
description: CloudHub environment
required: true
business_group_id:
description: Business group ID
required: true
cloudhub_region:
description: CloudHub region
required: true
default: ap-southeast-1
cloudhub_application_name:
description: CloudHub application name
required: true
mule_runtime_version:
description: Mule runtime version
required: true
default: 4.4.0
encryption_key:
description: Encryption key for secure properties
required: true
nexus_username:
description: Nexus username
required: false
nexus_password:
description: Nexus password
required: false
new_relic_api_key:
description: NewRelic Api Key
required: false
maven_settings_path:
description: Maven settings file path
required: true
default: .maven/settings.xml
number_of_workers:
description: Number of workers
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)
required: false
default: 'MICRO'
http_log_level:
description: HTTP Log Level (OFF, FATAL, ERROR, WARN, INFO, DEBUG, TRACE, ALL)
required: false
default: 'OFF'
runs:
using: composite
steps:
- name: Download artifact
uses: actions/download-artifact@v4
if: inputs.use_artifact == 'true'
with:
name: ${{ inputs.artifact_name }}
- name: Deploy to CloudHub 1.0
shell: bash
run: |
artifactName=${{ inputs.mule_file_path }}
mvn deploy --settings ${{ inputs.maven_settings_path }} -DskipTests -DmuleDeploy -Dartifact=${artifactName} -DencryptionKey=${ENCRYPTION_KEY}
env:
CONNECTED_APP_CLIENT_ID: ${{ inputs.connected_app_client_id }}
CONNECTED_APP_CLIENT_SECRET: ${{ inputs.connected_app_client_secret }}
PLATFORM_CLIENT_ID: ${{ inputs.platform_client_id }}
PLATFORM_CLIENT_SECRET: ${{ inputs.platform_client_secret }}
CLOUDHUB_ENVIRONMENT: ${{ inputs.cloudhub_environment }}
BUSINESS_GROUP_ID: ${{ inputs.business_group_id }}
CLOUDHUB_REGION: ${{ inputs.cloudhub_region }}
CLOUDHUB_APPLICATION_NAME: ${{ inputs.cloudhub_application_name }}
MULE_RUNTIME_VERSION: ${{ inputs.mule_runtime_version }}
ENCRYPTION_KEY: ${{ inputs.encryption_key }}
NEXUS_USERNAME: ${{ inputs.nexus_username }}
NEXUS_PASSWORD: ${{ inputs.nexus_password }}
NEW_RELIC_API_KEY: ${{ inputs.new_relic_api_key }}
NUMBER_OF_WORKERS: ${{ inputs.number_of_workers }}
WORKER_TYPE: ${{ inputs.worker_type }}
HTTP_LOG_LEVEL: ${{ inputs.http_log_level }}