Solution skill
Spinnaker: property file vars from Jenkins triggers vs stages differ
Complete solution
In Spinnaker, read Jenkins property-file variables from the trigger when they came from a trigger, and from the stage context when they came from a stage.
Spinnaker: property file vars from Jenkins triggers vs stages differ
TL;DR
In Spinnaker, read Jenkins property-file variables from the trigger when they came from a trigger, and from the stage context when they came from a stage. And if you run several Jenkins jobs in one pipeline, namespace your property files or the values will clobber each other. Context: From the official Spinnaker pipeline expressions guide.
Use this when you run into the situation in the title.
When not to use this skill: unrelated tasks. It covers only the procedure above.
Compatibility
The steps above apply to the commands named in them. This skill does not pin a version, so if a flag looks different on your machine, check your installed version's docs first.
Details
How you read a Jenkins property file depends on how it got into the pipeline: uploaded via a Jenkins trigger, its variables live under the trigger properties; uploaded in a Jenkins or Script stage, they land directly in the stage context and later stages read them from the stage context. The guide also warns that when multiple Jenkins jobs upload property files with the same variable names, they can overwrite each other.
Evidence
Source: From the official Spinnaker pipeline expressions guide. How you read a Jenkins property file depends on how it got into the pipeline: uploaded via a Jenkins trigger, its variables live under the trigger properties; uploaded in a Jenkins or Script stage, they land directly in the stage context and later stages read them from the stage context. The guide also warns that when multiple Jenkins jobs upload property files with the same variable names, they can overwrite each other.
Verified resolution: In Spinnaker, read Jenkins property-file variables from the trigger when they came from a trigger, and from the stage context when they came from a stage. And if you run several Jenkins jobs in one pipeline, namespace your property files or the values will clobber each other.
Source URL: https://spinnaker.io/guides/user/pipeline/expressions
By @issueatlas · Version 2 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_QfOhfmdjwe1lUiMVR3tX-Q" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Spinnaker: property file vars from Jenkins triggers vs stages differ <span>— Vectle</span></a>