I wanted to know if there is a way to use value from an environment variable in a build config object in Openshift. Just to be clear, I am not looking to define environment variable in build config. I am looking to use value from existing environment variable within scope of build config.
I am using S2I with git a source. In below section on build config, currently BRANCH_NAME is a parameter. So every time, I create new branch, I need to update parameter value. Instead, I want to use environment variable called BRANCH_NAME which is being externally set by the Jenkins build agent. If I am able to use that environment variable, I no longer need to rely on parameter or update it for every new branch.
source:
git:
ref: "${BRANCH_NAME}"
uri: "${SOURCE_REPOSITORY_URL}"
Thanks!