Details
-
Type:
Bug
-
Status: Open (View Workflow)
-
Priority:
Minor
-
Resolution: Unresolved
-
Component/s: atlassian-bitbucket-server-integration-plugin
-
Labels:
-
Environment:Jenkins 2.207
Bitbucket Server Integration 1.0.3
-
Similar Issues:
Description
When creating a pipeline build none of the options allow environment variables. The documentation I found at https://jenkins.io/doc/pipeline/steps/atlassian-bitbucket-server-integration/ states that the branch name should be able to use environment variable, however, it doesn't appear to mark it up.
Hard Coded Example:
branches: [[name: 'branchname']]
Results:
Produces a scan just on branch with name 'branchname'
Environment Example 1:
branches: [[name: '${ENV_VARNAME}']]
Result:
Produces a scan of all branches in all the repoisotry
Environment Example 2:
branches: [[name: '${env.ENV_VARNAME}']]
Result:
Stack Exception
Hi Bruce,
I wasn't able to reproduce this issue. I created an environment table similar to https://jenkins.io/doc/pipeline/tour/environment/ and the variable was substituted correctly. I notice in your example, you use single quotes- which when I did would attempt to scan for a branch named literally named ${ENV_VARNAME}, but with double quotes, the name was correctly substituted.
Could you possibly provide a more complete Jenkinsfile and a snippet from the build logs, so we can investigate further?