I am working on creating a freestyle CICD job that will build a GitHub project and deploy it on an environment.
We have an inventory that lists the branch name it should match and the QAEnvironment it needs to be deployed to.
We have two jobs, Job A builds and passed the branch name successfully but we need job A to also read the environment in the inventory file on Git and pass the QAEnvironment onto Job B. Job B should pick up the QAEnvironment that Job A had read from the inventory file and use it to deploy onto the appropriate environment.
I'm aware that the shell script environment is wiped out once the shell stops running, is there a workaround to this issue?
Thanks!