0

I am trying to set up a build project where I would be able to build various repos with the same build project and push them to the ECR.

Is it possible to make the repo source and branch of AWS CodeBuild project dynamic?

Can it be achieved by using AWS CLI to create the project with variables?

If yes, how can we go about achieving this?

1 Answer 1

2

Sadly, it can't be dynamic. The source must be known at CB project creation time. But you can create multiple secondary sources. So instead of only one bitbucket repo, you can create CB project witch has up to 12 secondary sources as well.

You can read more about this in Multiple input sources and output artifacts sample

Alternatively, you can create dynamically new CB project for each repo. But this will create new project for each repo, rather the re-use existing one for new source through some CB specific variable. Similarly, you could programmatically edit a given BP project and change its source to a new one.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.