- 최신
- 최다 투표
- 가장 많은 댓글
Hello!
Sorry for taking so long to reply.
I don't think there's a reasonable way to do this. Even if you could figure it out in a CodeBuild step, how would you stop the pipeline? Mark the build as failed? That would make it hard to figure out if the build actually failed or it just failed to stop the pipeline.
If you're using event based pipelines (and you should be) you might be able to use something in the Cloudwatch event (https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/EventTypes.html#codecommit_event_type) used by your Cloudwatch Event rule to cause your pipeline to start. For example, you could put each service on a different branch, or have a git tag for each service. More information is here: https://docs.aws.amazon.com/codepipeline/latest/userguide/triggering.html
However, I would recommend putting each micro-service in a different repository. That way you won't have to solve this problem. I think you might be doing this because you have some shared libraries used across multiple micro-services. I would recommend putting those in their own repositories too, and combining the micro-service package with the library packages using CodePipeline and CodeBuild.
So for example, in micro-service A's pipeline, you'd have a source action for micro-service-a-repo, and a source action for shared-library-1-repo, and have them both as a input artifacts for CodeBuild step that would build them into a single output artifact.
Let me know if you have any more questions!
Matthew
관련 콘텐츠
- AWS 공식업데이트됨 2년 전