У меня есть конвейерное задание, которое выглядит следующим образом.
pipeline {
agent {label 'XXXXXXX'}
stages {
stage("Get_ID"){
steps {
script {
def get_guid = powershell(returnStdout: true, script:'.\\Get_ID.ps1')
def guidObject = readJSON text:get_guid;
echo "buildguid:" + guidObject.buildguid;
}
}
}
}
}
вывод этого конвейера - ID
Теперь у меня есть конвейер-обертка, который вызывает конвейер выше, что яЯ хотел бы получить выходной конвейер выше и передать его другому конвейеру.
pipeline {
agent {label 'xxxxxxxxxxxxxxx'}
stage {
stage("Generate file"){
steps {
script {
def result = build job: 'Get-File', parameters: [[$class: 'StringParameterValue', name: 'server', value: "$server"]]
}
}
}
}
stage("Get_ID"){
steps{
build job: 'Get_ID'
}
}
stage("USE_ID"){
steps{
//Get the ID from the previous step and use it here.
build job: 'USE_ID'
}
}
}
}
Я был бы признателен за пример этого.