Configuration properties
- Check gate in HCL Accelerat
- Upload Build to HCL Accelerate
- Upload Deployment to HCL Accelerate
- Upload JUnit Results to HCL Accelerate
- Upload JUnit Metrics File to HCL Accelerate
Check gate in HCL Accelerate
The CheckGate class is used to check gates applied on a particular stage of the HCL Accelerate pipeline for a particular versionId of an application.
step($class: 'CheckGate',
pipelineId: "63a4591b-4d0d-4b8d-a6fb-4e9e7d79e754",
stageName: "DEV",
versionId: "NWZkOWUyZjYtOGE3Yy00NmJhLTlmZD-#48",
)
Pipeline script
Check gate input properties
Name |
Type |
Description |
Required |
Property name |
Pipeline ID |
String |
Pipeline ID from HCL Accelerate. |
Yes |
pipelineId |
Stage Name |
String |
Stage name of HCL Accelerate pipeline. |
Yes |
stageName |
Version ID |
String |
Version Id for particular application. |
Yes |
versionId |
Upload build to HCL Accelerate
The UploadBuild class is used to upload build data to HCL Accelerate. The revision parameter is important for linking the build to the work item via GitHub data (GIT_COMMIT in this case). The versionName is important for linking forward to deployments. The appName corresponds to the HCL Accelerate pipeline application name.
step($class: 'UploadBuild',
tenantId: "5ade13625558f2c6688d15ce",
revision: "${GIT_COMMIT}",
appName: "${ACCELERATE_APP_NAME}",
versionName:"${currentBuild.displayName}",
requestor: "admin",
id: "${currentBuild.displayName}"
)
Pipeline script
Upload build input properties
Name |
Type |
Description |
Required |
Property name |
Tenant Id |
String |
Tenant Id from HCL Accelerate. |
Yes |
tenantId |
Build Name |
String |
Build Name to display in HCL Accelerate. |
No |
name |
Version Name |
String |
For linking forward to deployments. |
No |
versionName |
Requestor |
String |
Requestor Name to display in HCL Accelerate. |
No |
requestor |
Revision |
String |
For linking the build to the work item via GitHub data. |
No |
revision |
Status |
String |
One of start, in_progress, success, or failure. |
No |
status |
Start Time |
String |
Start time for this step (Default: CurrentTime). |
No |
startTime |
End Time |
String |
EndTime for this step (Default: CurrentTime). |
No |
endTime |
App Name (one of three required) |
String |
HCL Accelerate pipeline application name. |
No |
appName |
App Id (one of three required) |
String |
HCL Accelerate pipeline application Id. |
No |
appId |
App External Id (one of three required) |
String |
HCL Accelerate pipeline application External Id. |
No |
appExtId |
Debug |
Boolean |
For Getting debug logs. |
No |
debug |
Fatal |
Boolean |
Fail build on failed upload, rather than just making build unstable. |
No |
fatal |
Upload deployment to HCL Accelerate
The UploadDeployment class is used to upload deployment data to HCL Accelerate. The versionName parameter is critical for linking to build data. The appName corresponds to the HCL Accelerate pipeline application name, while environmentName and environmentId are used to identify the deployment environment.
step([$class:
'UploadDeployment',
tenantId: "5ade13625558f2c6688d15ce",
versionName: "${currentBuild.displayName}",
versionExtId: "${currentBuild.displayName}",
type: 'Jenkins',
environmentId: "${ACCELERATE_ENV_ID_DEV}",
environmentName: 'DEV',
appName: "${ACCELERATE_APP_NAME}",
description: '[Description ex: Terraform Deployment]',
initiator: "admin",
result: 'true'
])
Pipeline script
Upload deployment input properties
Name |
Type |
Description |
Required |
Property name |
Tenant Id |
String |
Tenant Id from HCL Accelerate. |
Yes |
tenantId |
Name |
String |
Name to display in HCL Accelerate. |
No |
name |
Result |
String |
One of start, in_progress, success, or failure. |
No |
result |
Initiator |
String |
Initiator Name to display in HCL Accelerate |
No |
initiator |
Version Name |
String |
For linking to build data. |
No |
versionName |
Version External ID |
String |
For linking to build data. |
No |
versionExtId |
Type |
String |
Type of deployment job. |
Yes |
type |
Environment Name |
String |
To identify the deployment environment. |
No |
environmentName |
Environment ID |
String |
To identify the deployment environment. |
No |
environmentId |
ID |
String |
Unique Id for step. |
No |
id |
Description |
String |
Description of this step. |
No |
description |
Start Time |
String |
Start time for this step (Deafault: CurrentTime). |
No |
startTime |
End Time |
String |
EndTime for this step (Deafault: CurrentTime). |
No |
endTime |
App Name (one of three required) |
String |
HCL Accelerate pipeline application name. |
No |
appName |
App Id (one of three required) |
String |
HCL Accelerate pipeline application ID. |
No |
appId |
App External Id (one of three required) |
String |
HCL Accelerate pipeline application External ID. |
No |
appExtId |
Debug |
Boolean |
For Getting debug logs. |
No |
debug |
Fatal |
Boolean |
Fail build on failed upload, rather than just making build unstable. |
No |
fatal |
Upload JUnit results to HCL Accelerate
Type |
Description |
Required |
Property name |
java.util.Map<java.lang.String, java.lang.String> |
Upload JUnit Results to HCL Accelerate. |
Yes |
properties |
Upload metrics file to HCL Accelerate
The UploadMetricsFile class is used to upload metrics file into HCL Accelerate. The uploaded metrics file will be available in Insights in graphical form.
step($class: 'UploadMetricsFile',
tenantId: "5ade13625558f2c6688d15ce",
filePath: "junit.xml",
appName: "${ACCELERATE_APP_NAME}",
name:"Junit",
dataFormat: "junitXML",
pluginType: "junitXML",
testSetName: "Junit",
metricsRecordUrl: "${env.BUILD_URL}",
buildUrl: "${env.BUILD_URL}",
)
Pipeline script
Upload metrics file input properties
Name |
Type |
Description |
Required |
Property name |
Tenant Id |
String |
Tenant Id from HCL Accelerate. |
Yes |
tenantId |
Name |
String |
Name to display in HCL Accelerate. |
No |
name |
File Path |
String |
Path to metrics file. |
No |
filePath |
Test Set Name |
String |
Name to test set. |
No |
testSetName |
Environment |
String |
Environment name to display in HCL Accelerate |
Yes |
environment |
Combine Test Suites |
Boolean |
|
No |
combineTestSuites |
Fatal |
Boolean |
Fail build on failed upload, rather than just making build unstable. |
No |
fatal |
Plugin Type |
String |
Plugin type for metrics file. |
No |
pluginType |
Data Format |
String |
Data format of metrics file. |
Yes |
dataFormat |
Record Name |
String |
Record Name to display in HCL Accelerate. |
No |
recordName |
Metric Definition ID |
String |
Metric Definition ID from HCL Accelerate. |
No |
metricDefinitionId |
Description |
String |
Description of this step. |
No |
description |
Execution Date |
String |
Time of execution that produced test results. Should be in Epoch milliseconds. Defaults to current time. |
No |
executionDate |
Build ID |
String |
Build ID to display in HCL Accelerate |
No |
buildId |
App Name (one of three required) |
String |
HCL Accelerate pipeline application name. |
No |
appName |
App Id (one of three required) |
String |
HCL Accelerate pipeline application Id. |
No |
appId |
App External Id (one of three required) |
String |
HCL Accelerate pipeline application External Id. |
No |
appExtId |