我已经配置了 CodePipeline 来构建和部署 NPM 项目。
管道确实从 CodeCommit 加载源并使用 CodeBuild 构建它。两个不同的阶段。
但是,作为发布版本的步骤,我想增加版本(npm 版本补丁)。
这在 CodeBuild 步骤中失败: npm WARN 生命周期 [project@version]~postversion:无法在 wd %s %s (wd=%s) [project@version] git Push && git Push --tags/codebuild/output/src334032561/src 中运行
我已将 IAM 服务角色配置为具有 git 推送权限。
最佳答案
我不认为这是由许可引起的。您可以尝试使用 CodeCommit 存储库创建独立的 CodeBuild 项目并运行构建吗?
检查此线程 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.
关于git - 无法将更改从 AWS CodeBuild 推送到 AWS CodeCommit,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49901538/