I found a solution.
I put "input" in "script".
value2, value3, value4 and value5 are "predicted value".
It's fine for me.
---
env['value1'] = 'initial value'
pipeline {
agent none
stages {
stage('prediction') {
agent {
label 'master'
}
steps {
script {
env['value1'] = sh(script: 'echo predicted value',
returnStdout: true).trim()
}
}
}
stage('execution') {
steps {
script {
def values = input(
message: 'setting',
parameters: [
string(name: 'value2', defaultValue: env['value1']),
string(name: 'value3', defaultValue: env.value1)
]
)
build(job: 'job', parameters: [
string(name: 'value4', value: values.value2),
string(name: 'value5', value: values.value3)
])
}
}
}
}
}
---
--
Kiyoshi Ohgishi
>>> <
https://groups.google.com/d/msgid/jenkinsci-users/58c0b7e4-4083-40b2-940a-ff32b8b11c53n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>
>>
>> --
>> Yannick LACAUTE
>> Consultant indépendant
>> 39 rue de Wattignies, 75012 Paris
>> Tel : 06 16 85 95 76
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
jenkinsci-use...@googlegroups.com.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/jenkinsci-users/90f1d477-e049-41c1-92e0-218915b02372n%40googlegroups.com.
>