How to make CodePipeline watch a sepecific folder of CodeCommit?
Asked Answered
E

3

6

I have set a pipeline that watchs a codeCommit repository with a given branch and it works perfectly.

I want to restrict my pipeline to watch only a folder on my repo. Imagine my repo contains two folders : fold1 and fold2. As per now, any commit on fold1 or fold2 triggers the pipeline. I want to restrict it to only changes on fold1.

I haven't found anyway in AWS documentation to do this. Obviously, I can split into two repositories which an option that I prefer to avoid since all code goes togather.

Evans answered 29/8, 2019 at 14:45 Comment(0)
B
3

CodePipeline doesn't currently have this feature. The best workaround would be to have your build task figure out which folders have changed and fail the build if nothing has changed. CodePipeline won't promote changes that fail the build.

since all code goes togather.

If the code depends on each other then it could actually be desirable to always release the software regardless of what changed. CodePipeline is a continuous delivery product and in continuous delivery it's highly desirable to have changes quickly and frequently deployed.

Buttermilk answered 9/9, 2019 at 18:9 Comment(1)
Can you recommend a way to easily check if nothing in a folder has changed?Fib
P
0

Refer the following guide provided by AWS - https://docs.aws.amazon.com/prescriptive-guidance/latest/patterns/automatically-detect-changes-and-initiate-different-codepipeline-pipelines-for-a-monorepo-in-codecommit.html

Phagy answered 19/7, 2023 at 12:56 Comment(1)
As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.Fortis
E
-1

I came to the same conclusion. In my case I have split folders into multiple repos and have created cloudformation scripts to easily create multiple pipelines.

Evans answered 11/9, 2019 at 12:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.