I am trying to run a job using a specific git branch or feature branch and it keeps running MAIN in Ansible Automation Platform 2.5 (containerized). I have created a new project with the specific git branch, and created a new template. But whenever I go to run the template it just runs the main branch. I am not seeing ANY of the changes I committed to the branch.
In the newly created projected I have Clean, Delete, and Update on Launch selected. I am the only one working on this branch.
Some more details might help to actually see the project and the template via screenshots. I here is a screenshot that allows you to pick a branch on running. Keep in mind, the synchronization of the project needs to happen with the correct branch.
Do I need to use Branch OVerride when specifying it in the project? I thought that was to override it at the template...
You should not need that "No". We are using it in some of our items so we can go between branches at will and it makes it easy. What is important for you is to ensure that the project and the job template have the same branch.
One other thing you can do too is if you have access to your controller, you can login and go to the directory on there where it downloads your Github repository and view what is there. You can also look in the Jobs and log where it synchronized your project before running the job template. Those are the places I would check first.
Just checked the source control update job and it did download the correct branch. I have already logged into the server and checked the contents of the project. It is correct. I see the changes I made. Right now, the changes I made were to add 2 debug lines. And they are not being executed upon.
One other thing to try ... since you don't have branch override specified, remove the branch information for your template. You have a branch specified already for your project. See what that does.
In the AAP Template, where I put os_Branch1 that should be referencing the actual project. Which would be os_Branch1. That was my fault.
So it works now?
Nope. But I'm not specifying the branch in the template. Just the project with teh specific branch.
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.