[JIRA] (JENKINS-41257) Environment variables assigned to existing script variables

1 view
Skip to first unread message

kzantow@cloudbees.com (JIRA)

unread,
Jan 20, 2017, 9:31:03 AM1/20/17
to jenkinsc...@googlegroups.com
Keith Zantow created an issue
 
Jenkins / Bug JENKINS-41257
Environment variables assigned to existing script variables
Issue Type: Bug Bug
Assignee: Andrew Bayer
Components: pipeline-model-definition-plugin
Created: 2017/Jan/20 2:30 PM
Priority: Minor Minor
Reporter: Keith Zantow

This pipeline script appears to be attempting to assign the value for what should be a User variable in the script environment to an existing groovy script variable, resulting in this error: you tried to assign a value to the class 'hudson.model.User' @ line 11, column 5.

Perhaps this is expected behavior? I would assume these variables should be in the context of env. Maybe this is a special case?

pipeline {
  agent any
  stages {
    stage('Build') {
      steps {
        sh('mvn package')
      }
    }
  }
  environment {
    User = 'asdf'
  }
}
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

andrew.bayer@gmail.com (JIRA)

unread,
Jan 20, 2017, 1:16:02 PM1/20/17
to jenkinsc...@googlegroups.com
Andrew Bayer commented on Bug JENKINS-41257
 
Re: Environment variables assigned to existing script variables

Ah, so the problem is that User is, well, hudson.model.User. I'll see if I can work around that...

andrew.bayer@gmail.com (JIRA)

unread,
Jan 20, 2017, 1:22:04 PM1/20/17
to jenkinsc...@googlegroups.com

And I can't! That'll fail before it ever gets to anything I control. Grr.

bitwiseman@gmail.com (JIRA)

unread,
Oct 22, 2019, 11:25:22 PM10/22/19
to jenkinsc...@googlegroups.com
Liam Newman closed an issue as Won't Fix
 

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