Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion dd-java-agent/instrumentation/cics-9.1/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,18 @@ ext {
cicsSdkName = 'CICS_TG_SDK_91_Unix'
}

def massArtifactUrl = { String upstreamArtifactUrl ->
def massReadUrl = providers.environmentVariable('MASS_READ_URL').orNull
if (massReadUrl == null) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Treat blank MASS_READ_URL as unset

If a CI job or local shell exports MASS_READ_URL as an empty or whitespace-only value, orNull still returns that value and this helper routes the Ivy repository to /internal/artifact/public.dhe.ibm.com/... instead of falling back to the IBM URL. That makes CICS SDK resolution fail in environments where the variable is defined but intentionally empty; the other MASS helpers in this repo guard this by trimming and treating blank values as absent.

Useful? React with 👍 / 👎.

return "https://${upstreamArtifactUrl}"
}
def baseUrl = massReadUrl.endsWith('/') ? massReadUrl : "${massReadUrl}/"
return "${baseUrl}internal/artifact/${upstreamArtifactUrl}"
}

repositories {
ivy {
url = 'https://public.dhe.ibm.com/software/htp/cics/support/supportpacs/individual/'
url = massArtifactUrl('public.dhe.ibm.com/software/htp/cics/support/supportpacs/individual/')
patternLayout {
artifact '[module].[ext]'
}
Expand Down