-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
ubuntu
jenkins 2.249.3
jdk8
There are 2 questions :
1。 pipeline/freestylejob cannot get empty param value。 2。 pipeline under docker agent can get empty param value。
I define the pipelie with parameter like below
parameters {
string(name: 'ANDROID_PLATFORM', defaultValue: '')
}
in stage i try to print this parameter 'ANDROID_PLATFORM', like below
stage("0.clean ws") {
steps {
sh '''#!/bin/bash
env
'''
}
}
start this pipeline with empty string ANDROID_PLATFORM, the env command not print this value.
in python code i try to get ANDROID_PLATFORM like this
os.environ.get("ANDROID_PLATFORM")
but this return None.I want this return "", an empty string value。
workaround in python maybe work well like this:
os.environ.get("ANDROID_PLATFORM", "")
- relates to
-
JENKINS-65014 Job save removes obligatory <defaultValue> of <hudson.model.StringParameterDefinition>
- Resolved