amazon-web-services - AWS CloudFormation:如何在 AWS Pipeline 中使用 Github Enterprise 作为源
问题描述
在文档中,我们给出了以下示例:
AppPipeline:
Type: AWS::CodePipeline::Pipeline
Properties:
RoleArn:
Ref: CodePipelineServiceRole
Stages:
-
Name: Source
Actions:
-
Name: SourceAction
ActionTypeId:
Category: Source
Owner: AWS
Version: 1
Provider: S3
OutputArtifacts:
-
Name: SourceOutput
Configuration:
S3Bucket:
Ref: SourceS3Bucket
S3ObjectKey:
Ref: SourceS3ObjectKey
RunOrder: 1
我试图更新它以使用 GitHub 企业,但不幸的是它不起作用。有人可以展示如何正确配置它。这就是我尝试这样做的方式:
- Name: Source
Actions:
- Name: Source
RunOrder: 1
InputArtifacts: []
ActionTypeId:
Category: Source
Owner: ThirdParty
Provider: GitHubEnterpriseServer
Configuration:
Owner: !Sub ${GitHubRepositoryOwner}
Repo: !Sub ${GitHubRepositoryName}
Branch: !Sub ${GitHubIntegrationBranch}
OAuthToken: !Sub ${GitHubPersonalAccessToken}
PollForSourceChanges: false # Must be set to false when using webhooks
OutputArtifacts:
- Name: SourceArtifact
更新:
我发现 Github Enterprise 使用 codestar-connections。我已将代码编辑为如下所示:
Stages:
- Name: Source
Actions:
- InputArtifacts: []
ActionTypeId:
Version: '1'
Owner: AWS
Category: Source
Provider: CodeStarSourceConnection
OutputArtifacts:
- Name: SourceArtifact
RunOrder: 1
Configuration:
ConnectionArn: "arn:aws:codestar-connections:exxxxxxxxf382816da8"
FullRepositoryId: "https://github.xxxxxx/cloudformation"
BranchName: "main"
OutputArtifactFormat: "CODE_ZIP"
Name: ApplicationSource
我现在处理的问题是连接权限:
User: arn:aws:iam::xxxxxx is not authorized to perform: codestar-connections:PassConnection on resource:
解决方案
推荐阅读
- laravel - 作曲家更新失败
- r - 动态创建的辅助表中的闪亮观察事件
- php - PrestaShop 在 web 服务中返回 302
- html - 如何更改活动导航器的背景颜色
- c++ - 如何使用 std::string 作为 QHash 的键?
- python - Python字数(2个包含单词的文件)(1个用于字数的文件)(最后一个文件写在他里面字+计数)
- c# - 如何将登录密码保存到 xamarin 中的钥匙串
- node.js - 使用nodejs更新mongodb中的多个不同数组对象元素
- django - MEDIA_ROOT 问题
- python - TypeError: unhashable type: 'list' pandas python