• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

clareliguori/continuous-integration-rick: Demo that reports a custom-formatted R ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

clareliguori/continuous-integration-rick

开源软件地址:

https://github.com/clareliguori/continuous-integration-rick

开源编程语言:

JavaScript 100.0%

开源软件介绍:

I'm Continuous Integration Rick!

Demo that reports a custom-formatted Rick-and-Morty-themed build status to a GitHub pull request. Built on top of AWS Lambda. This example responds to CodeBuild build events in CloudWatch Events, but you can update it to report the status of any kind of job triggered by a pull request.

To install in your AWS account and GitHub account

First, set up a CodeBuild project that builds a repository in your GitHub account, with a GitHub webhook to trigger builds for pull requests. See directions here.

Create a custom OAuth application in your GitHub account:

  1. Go to https://github.com/settings/applications/new
  2. Use "I'M CONTINUOUS INTEGRATION RICK!" for the application name.
  3. Use any random URL for the homepage URL and callback URL.
  4. Use any Rick avatar image for the application logo
  5. Save the application's client ID and secret in a JSON file named cli-authorization.json with the format:
{
  "scopes": [
    "repo"
  ],
  "client_id": "myclientid",
  "client_secret": "myclientsecret"
}

Retrieve an OAuth token for the application:

  1. Run curl -X POST -H "X-GitHub-OTP: 123456" --user "$GITHUB_USERNAME:$GITHUB_PASSWORD" --data "@cli-authorization.json" https://api.github.com/authorizations. Note that the OTP is only necessary if you have MFA enabled for your account.
  2. Store the token (in the 'token' field of the response above) in Parameter Store: aws ssm put-parameter --name ci-rick-github-token --type SecureString --value <OAuth token>

Then spin up the stack in CloudFormation:

npm install

aws cloudformation package --template-file template.yml --s3-bucket <s3 bucket> --force-upload --output-template-file template-packaged.yml

aws cloudformation deploy --stack-name ci-rick --template-file template-packaged.yml --capabilities CAPABILITY_NAMED_IAM

Test Locally

sam local invoke -e test_event.json -n test_env_vars.json



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap