-
Bug
-
Resolution: Unresolved
-
Major
-
None
If I add an variable in the Jenkins configuration with a dollar sign in the content, then the variable is not injected. The console output says that the variable is unset because it is "unresolved":
[EnvInject] - Executing scripts and injecting environment variables after the SCM step. [EnvInject] - Injecting as environment variables the properties content ADMIN_PASS="pas$word" [EnvInject] - Variables injected successfully. [EnvInject] - Unset unresolved 'ADMIN_PASS' variable.
I've tried single quotes and double quotes, escaping with \$ and with $$, and nothing works: every time, the variable is unset. Help?
- duplicates
-
JENKINS-15751 Cannot escape dollar sign in Windows environment
-
- Reopened
-
-
JENKINS-13566 EnvInject is messing around with my TEMP variable when username contains a dollar sign
-
- Resolved
-
[JENKINS-13157] EnvInject cannot inject variables whose contents contain a dollar sign ($)
Description |
Original:
If I add an variable in the Jenkins configuration with a dollar sign in the content, then the variable is not injected. The console output says that the variable is unset because it is "unresolved": [EnvInject] - Executing scripts and injecting environment variables after the SCM step. [EnvInject] - Injecting as environment variables the properties content ADMIN_PASS="pas$word" [EnvInject] - Variables injected successfully. [EnvInject] - Unset unresolved 'ADMIN_PASS' variable. I've tried single quotes and double quotes, escaping with \$ and with $$, and nothing works: every time, the variable is unset. Help? |
New:
If I add an variable in the Jenkins configuration with a dollar sign in the content, then the variable is not injected. The console output says that the variable is unset because it is "unresolved": {code} [EnvInject] - Executing scripts and injecting environment variables after the SCM step. [EnvInject] - Injecting as environment variables the properties content ADMIN_PASS="pas$word" [EnvInject] - Variables injected successfully. [EnvInject] - Unset unresolved 'ADMIN_PASS' variable. {code} I've tried single quotes and double quotes, escaping with \$ and with $$, and nothing works: every time, the variable is unset. Help? |
Status | Original: Open [ 1 ] | New: In Progress [ 3 ] |
Resolution | New: Fixed [ 1 ] | |
Status | Original: In Progress [ 3 ] | New: Resolved [ 5 ] |
Link | New: This issue duplicates JENKINS-15751 [ JENKINS-15751 ] |
Resolution | Original: Fixed [ 1 ] | |
Status | Original: Resolved [ 5 ] | New: Reopened [ 4 ] |
Link |
New:
This issue duplicates |
Assignee | Original: Gregory Boissinot [ gbois ] | New: David Baumgold [ singingwolfboy ] |
Comment |
[ I tried the following evaluated groovy script with v1.92.1 of the plugin: {code:java} switch (ENV) { case 'DEV': def map = [WEB_SERVER: '<machine name>.', DB_SERVER: '<machine name>', DRIVE_LETTER: 'D$$'] return map break case 'TEST': def map = [WEB_SERVER: '<machine name>', DB_SERVER: '<machine name>', DRIVE_LETTER: 'D$$'] return map break default: def map = [WEB_SERVER: '', DB_SERVER: '', DRIVE_LETTER: ''] return map break } {code} which still didn't work. [EnvInject] - Injecting contributions. Building in workspace ... [EnvInject] - Unset unresolved 'DRIVE_LETTER' variable. ] |
Comment |
[ I tried the following evaluated groovy script with v1.92.1 of the plugin: {code:java} switch (ENV) { case 'DEV': def map = [WEB_SERVER: '<machine name>.', DB_SERVER: '<machine name>', DRIVE_LETTER: 'D$$'] return map break case 'TEST': def map = [WEB_SERVER: '<machine name>', DB_SERVER: '<machine name>', DRIVE_LETTER: 'D$$'] return map break default: def map = [WEB_SERVER: '', DB_SERVER: '', DRIVE_LETTER: ''] return map break } {code} which still didn't work. [EnvInject] - Injecting contributions. Building in workspace ... [EnvInject] - Unset unresolved 'DRIVE_LETTER' variable. ] |
Comment |
[ I tried the following evaluated groovy script with v1.92.1 of the plugin: {code:java} switch (ENV) { case 'DEV': def map = [WEB_SERVER: '<machine name>.', DB_SERVER: '<machine name>', DRIVE_LETTER: 'D$$'] return map break case 'TEST': def map = [WEB_SERVER: '<machine name>', DB_SERVER: '<machine name>', DRIVE_LETTER: 'D$$'] return map break default: def map = [WEB_SERVER: '', DB_SERVER: '', DRIVE_LETTER: ''] return map break } {code} which still didn't work when ENV = 'DEV' or 'TEST'. {code:java} [EnvInject] - Injecting contributions. Building in workspace ... [EnvInject] - Unset unresolved 'DRIVE_LETTER' variable. {code} ] |