- Più recenti
- Maggior numero di voti
- Maggior numero di commenti
Yes you're right, defining a CodeCommit repo source in the console sets up the EventBridge Rule as I described anyway.
What's more relevant is that you'll get only one of SourceArtifacts or SourceArtifacts2 populated depending on which repo triggered the build. So you can't rely on either and may need to clone both repos as part of your CodeBuild setup, then access the files you need from these clones.
Do you want to actually trigger a build when repo B changes or just when repo A changes? If the latter then maybe an option is to just have repo A as a source, and have a CodeBuild step where you clone repo B and access the files you need.
The ideal would be to trigger a build both when one of the two changes: I need a new build when the code changes but also when a config param changes. But the important thing would be to have the build stage (Codebuilder) able "to see" both repos to actually build.
Ok then I would have repo A as the source for your pipeline, and create an EventBridge rule on events from repo B that triggers your pipeline when repo B changes.
https://docs.aws.amazon.com/codecommit/latest/userguide/monitoring-events.html
https://docs.aws.amazon.com/codeartifact/latest/ug/configure-service-events-codepipeline.html
I think this is not necessary. To trigger the pipeline I can just define two sources, and I did it. My problem here is in the builder itself.
What I am trying to do is to have Codebuilder to take the code from repoA, then the code from repoB, put them together and then run "npm run build" as defined in the buildspec file.
What is happening is that Codebuilder triggers the run but can't see the values from the .ini file in repoB, so it fails.
OK thanks for that. I guess I am going to add the .env to the repo, I can't see any other flexible solution for my use case.
thanks M
Contenuto pertinente
- AWS UFFICIALEAggiornata 2 anni fa
- AWS UFFICIALEAggiornata 2 anni fa
- AWS UFFICIALEAggiornata un anno fa