Answer the question
In order to leave comments, you need to log in
How to properly load yaml list in env?
Hello.
to have values from env.yml
project_name: adv
project_version: 1.4.1
stage("import common_vars") {
def cicd_store.common_envs = readYaml file: 'vault/common-envs/envs.yml'
cicd_store.common_envs.eachWithIndex { item,index ->
env."${item.key}" = "${item.value}"
}
}
[Pipeline] sh (hide)
+ printenv
project_name: adv
project_version: 1.4.1
project:
name: adv
version: 1.4.1
project=[name:adv, version:1.4.1]
project.name=adv
project.version=1.4.1
name=adv
version=1.4.1
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question