[JIRA] (JENKINS-42082) Unable to create variable with TEST in them [Declarative Pipeline - environment section]

4 views
Skip to first unread message

maqboolzee@yahoo.com (JIRA)

unread,
Feb 15, 2017, 6:31:02 PM2/15/17
to jenkinsc...@googlegroups.com
Zee Maqbool created an issue
 
Jenkins / Bug JENKINS-42082
Unable to create variable with TEST in them [Declarative Pipeline - environment section]
Issue Type: Bug Bug
Assignee: Unassigned
Components: pipeline-build-step-plugin
Created: 2017/Feb/15 11:30 PM
Priority: Minor Minor
Reporter: Zee Maqbool

I would like to keep track of BRANCH within pipeline and build certain stages for certain branches. For this purpose I defined a variable TEST_BRANCH='develop', but I get error :

groovy.lang.MissingPropertyException: No such property: TEST_BRANCH for class: groovy.lang.Binding
at groovy.lang.Binding.getVariable(Binding.java:63)

I thought I am not allowed to start variable name with TEST so I renamed the variable to BRANCH_TEST but I am still getting the same error. Can someone please clarify if there are any restriction on naming variables inside the environment section of pipeline.

pipeline
{
agent any

environment //Used within the pipeline

{ GIT_COMMIT = '' GIT_PROJECT = 'abc' GIT_REPO = 'repo1' APP_NAME = 'repo1' SERVER_NAME = 'xyz-web' GIT_BRANCH = env.BRANCH_NAME ?: 'develop' BRANCH_TEST = 'develop' ... }

...
}

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

maqboolzee@yahoo.com (JIRA)

unread,
Feb 17, 2017, 7:29:02 PM2/17/17
to jenkinsc...@googlegroups.com
Zee Maqbool commented on Bug JENKINS-42082
 
Re: Unable to create variable with TEST in them [Declarative Pipeline - environment section]

I m using BRANCH_DEV as variable name, if someone can confirm that BRANCH_TEST is not blocked it would be great

bitwiseman@gmail.com (JIRA)

unread,
Oct 22, 2019, 11:24:42 PM10/22/19
to jenkinsc...@googlegroups.com
Liam Newman closed an issue as Cannot Reproduce
 

Bulk closing resolved issues.

Change By: Liam Newman
Status: Resolved Closed
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages