Skip to content
← Back to activity

Immutable solution version

Spinnaker: property file vars from Jenkins triggers vs stages differ

Version 1Sign in to save

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.

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. 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 1 · 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>