Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Dynamic Pipeline based on repository content

Georg Duemlein June 3, 2024

Kia ora,

Do you have any examples or pointers of creating a Dynamic Pipeline that responds to the repository's contents?

I want to add terraform-related steps if a folder `iac` is in the repository.

I am not quite sure which parts of the documentation can help me here.

Ngā mihi

 

1 answer

1 accepted

Suggest an answer

Log in or Sign up to answer
0 votes
Answer accepted
Edmund Munday
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 11, 2024

Hi @Georg Duemlein - great question!

The Code Search API is definitely the way to go for that. You can make a search in a particular repo (or across multiple repos) using a Glob style search syntax and look for your `iac` directory when your Dynamic Pipeline runs.

Another option if you want to implement logic only when that `iac` directory is updated is to look at the diff stat of the Pull Request for Pipelines that are triggered against PR's.

We recently ran a webinar on this exact topic, using it to implement selective test execution. The full code for that webinar's app is available here and we'll have the recording published on Youtube within a few days.

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events