Sure, here's my jenkins pipeline script
node {
//URL to Github repository https://github.com/<owner>/<repo>
def GITHUB_REPO_URL="https://github.com/Bigguy98/AssetManagement"
def GITHUB_BRANCH="master"
//Retrieve ENV ID values for DEV and Staging from "Download attributes from API" json file
def VELOCITY_ENV_ID_DEV="9a2062d9-dd5c-4866-93b0-a57fa7535d77"
def VELOCITY_ENV_ID_STAGING="12f789ed-e9ba-4485-a4f6-ee43dfa3de3e"
//VELOCITY_APP_NAME must match your Velocity pipeline application name
def VELOCITY_APP_NAME="ASMModule01"
//Do not change below this line.
def GIT_COMMIT
stage ('cloning the repository'){
currentBuild.displayName = "2.1.1.${BUILD_NUMBER}"
majorVersion="${BUILD_NUMBER}"
def scm = git branch: "${GITHUB_BRANCH}", url: "${GITHUB_REPO_URL}"
GIT_COMMIT = sh(returnStdout: true, script: "git rev-parse HEAD").trim()
echo "GIT_COMMIT=${GIT_COMMIT}"
}
stage ("Build") {
echo "Building ${VELOCITY_APP_NAME} (Build:${currentBuild.displayName}, GIT_COMMIT:${GIT_COMMIT})"
step([$class: 'UploadBuild',
tenantId: "5ade13625558f2c6688d15ce",
revision: "${GIT_COMMIT}",
appName: "${VELOCITY_APP_NAME}",
versionName:"${currentBuild.displayName}",
requestor: "admin",
status: "success",
name: "upload build asm",
id: "${currentBuild.displayName}",
appId: "109d65fc-a45e-4577-98b1-b75e7f4ec226"
])
}
}
And this is attributes API I got from Velocity
{
"pipelineId": "c5cc6f20-aa0e-4100-aab6-1d45b71f72cf",
"tenantId": "5ade13625558f2c6688d15ce",
"environments": [
{
"name": "Input",
"id": "0c7ab5a5-5b9b-4c40-9ad9-ad5dfb5e2e3a"
},
{
"name": "DEV",
"id": "9a2062d9-dd5c-4866-93b0-a57fa7535d77"
},
{
"name": "Staging",
"id": "12f789ed-e9ba-4485-a4f6-ee43dfa3de3e"
},
{
"name": "PROD",
"id": "0ba3657c-33b1-45e6-9b4b-aea4b869dc01"
}
],
"applications": [
{
"name": "ASMModule01",
"id": "109d65fc-a45e-4577-98b1-b75e7f4ec226"
}
]
}
If you need anything else, please tell me.
Thanks for your time!
------------------------------
Tung Vu Thanh
------------------------------
Original Message:
Sent: Mon March 13, 2023 03:23 AM
From: Osman Burucu
Subject: I need help to push Jenkins build to UrbanCode Velocity
No shouls not be a problem. Please could you also show the jenkins pipeline with the code? maybe there is something different?
------------------------------
Osman Burucu
Product Manager UrbanCode Family
IBM
Vienna
00431211454746
Original Message:
Sent: Thu March 09, 2023 02:47 AM
From: Tung Vu Thanh
Subject: I need help to push Jenkins build to UrbanCode Velocity
By the way, I'm using UrbanCode Velocity CE, does this cause any effect?
------------------------------
Tung Vu Thanh
Original Message:
Sent: Mon March 06, 2023 10:17 PM
From: Tung Vu Thanh
Subject: I need help to push Jenkins build to UrbanCode Velocity
Yeah i've checked it, the app name exist in pipeline view, you can see below

------------------------------
Tung Vu Thanh
Original Message:
Sent: Mon March 06, 2023 07:17 AM
From: Osman Burucu
Subject: I need help to push Jenkins build to UrbanCode Velocity
have you checked if the velocity app name exists in the pipeline view in velocity?
------------------------------
Osman Burucu
Product Manager UrbanCode Family
IBM
Vienna
00431211454746
Original Message:
Sent: Mon February 27, 2023 01:37 AM
From: Tung Vu Thanh
Subject: I need help to push Jenkins build to UrbanCode Velocity
Yes i did, that where i got Integration ID and Integration Token for my Jenkins server configuration.

Any other ideas?
Thanks for replying!
------------------------------
Tung Vu Thanh
Original Message:
Sent: Fri February 24, 2023 10:15 AM
From: Muriel VIALE
Subject: I need help to push Jenkins build to UrbanCode Velocity
Hello there, you said you configured the velocity plugin in Jenkins, but did you also configure a Jenkins integration in Velocity ?

Muriel
------------------------------
Muriel VIALE
Technical Pre-sale consultant
IBM
La Gaude
(049) 211-4264
Original Message:
Sent: Thu February 23, 2023 05:46 AM
From: Tung Vu Thanh
Subject: I need help to push Jenkins build to UrbanCode Velocity
Hello everyone, wish you guys a good day.
I'm facing an issue when trying to push Jenkins build to UrbanCode Velocity.
For Jenkins server, I've installed UrbanCode Velocity plugin and configured connection to Velocity server.

Then, I created a Jenkins pipeline with script to push Jenkins build to Velocity
stage ("Build") { echo "Building ${VELOCITY_APP_NAME} (Build:${currentBuild.displayName}, GIT_COMMIT:${GIT_COMMIT})" step([$class: 'UploadBuild', tenantId: "<tenantId>", revision: "${GIT_COMMIT}", appName: "${VELOCITY_APP_NAME}", versionName:"${currentBuild.displayName}", requestor: "admin", status: "success", name: "upload build asm", id: "${currentBuild.displayName}", appId: "<appId>" ]) }
And got message on Jenkins
> Could not upload builds to Velocity as there is no configuration specified.

Does anyone know how to fix this?
Thanks you for your time!
------------------------------
Tung Vu Thanh
------------------------------