cancel
Showing results for 
Search instead for 
Did you mean: 
smi-andrew
Flight Engineer
Flight Engineer
  • 400 Views

Running template with specific git branch doesn't work

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.

 

 

Labels (3)
0 Kudos
9 Replies
Travis
Moderator
Moderator
  • 353 Views

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.

Screenshot 2026-02-03 at 4.06.31 PM.png

Screenshot 2026-02-03 at 4.08.05 PM.png

Travis Michette, RHCA XIII
https://rhtapps.redhat.com/verify?certId=111-134-086
SENIOR TECHNICAL INSTRUCTOR / CERTIFIED INSTRUCTOR AND EXAMINER
Red Hat Certification + Training
0 Kudos
smi-andrew
Flight Engineer
Flight Engineer
  • 346 Views

os_template_1.jpg

os_project_1.jpg

0 Kudos
smi-andrew
Flight Engineer
Flight Engineer
  • 346 Views

Do I need to use Branch  OVerride when specifying it in the project?  I thought that was to override it at the template...

0 Kudos
Travis
Moderator
Moderator
  • 343 Views

@smi-andrew -

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.

Travis Michette, RHCA XIII
https://rhtapps.redhat.com/verify?certId=111-134-086
SENIOR TECHNICAL INSTRUCTOR / CERTIFIED INSTRUCTOR AND EXAMINER
Red Hat Certification + Training
0 Kudos
smi-andrew
Flight Engineer
Flight Engineer
  • 341 Views

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.

0 Kudos
Travis
Moderator
Moderator
  • 340 Views

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.

Travis Michette, RHCA XIII
https://rhtapps.redhat.com/verify?certId=111-134-086
SENIOR TECHNICAL INSTRUCTOR / CERTIFIED INSTRUCTOR AND EXAMINER
Red Hat Certification + Training
0 Kudos
smi-andrew
Flight Engineer
Flight Engineer
  • 339 Views

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.

0 Kudos
Travis
Moderator
Moderator
  • 337 Views

So it works now?

Travis Michette, RHCA XIII
https://rhtapps.redhat.com/verify?certId=111-134-086
SENIOR TECHNICAL INSTRUCTOR / CERTIFIED INSTRUCTOR AND EXAMINER
Red Hat Certification + Training
0 Kudos
smi-andrew
Flight Engineer
Flight Engineer
  • 336 Views

Nope.  But I'm not specifying the branch in the template.  Just the project with teh specific branch.

0 Kudos
Join the discussion
You must log in to join this conversation.