Reputation: 23
I have configured a CodePipeline to build and deploy a NPM project.
The pipeline doenloads the source from CodeCommit and builds it using CodeBuild. Two different stages.
However as a post version step, I want to increment the version (npm version patch).
This is failing in the CodeBuild step: npm WARN lifecycle [project@version]~postversion: cannot run in wd %s %s (wd=%s) [project@version] git push && git push --tags /codebuild/output/src334032561/src
I've already configured the IAM service role to have git push permissions.
Upvotes: 2
Views: 2430
Reputation: 346
I don't think this was caused by permission. Can you try creating a standalone CodeBuild project with CodeCommit repo and running a build?
Check this thread https://forums.aws.amazon.com/thread.jspa?threadID=251732
CodePipeline downloads the source as a zip from the source provider rather than doing a Git clone, which means the .git folder won't be retained and git commands like the one you're running won't work.
Upvotes: 3