aws-codepipeline

Code build continues after build fails

家住魔仙堡 提交于 2019-12-31 08:36:23
问题 I'm building a CI/CD pipeline using git, codebuild and elastic beanstalk. During codebuild execution when build fails due to syntax error of a test case, I see codebuild progress to next stage and ultimatly go on to produce the artifacts. My understanding was if the build fails, execution should stop. is this a correct behavior ? Please see the buildspec below. version: 0.2 phases: install: commands: - echo Installing package.json.. - npm install - echo Installing Mocha... - npm install -g

CloudFormation to setup CodePipeline/CodeBuild to deploy SAM application

馋奶兔 提交于 2019-12-21 06:57:40
问题 I have successfully setup CodePipeline and CodeBuild to deploy my SAM applications. But now I want to convert this to CloudFormation. How do I do this? I followed the steps here http://docs.aws.amazon.com/lambda/latest/dg/automating-deployment.html I am stuck at the CodeBuild part of the CloudFormation template ... 回答1: If you're looking for an example of how to set up CodePipeline and CodeBuild using Cloudformation, I'd recommend checking out this example template from one of my colleagues,

Conditionally create CodePipeline actions based on CloudFormation conditions

[亡魂溺海] 提交于 2019-12-20 21:01:42
问题 Enable / disable sections of a CloudFormation for CodePipeline using Conditionals: This creates a manual notification action once staging has been built and passed Runscope tests: - InputArtifacts: [] Name: !Join ["",[!Ref GitHubRepository, "-prd-approval"]] ActionTypeId: Category: Approval Owner: AWS Version: '1' Provider: Manual OutputArtifacts: [] Configuration: NotificationArn: !GetAtt ["SNSApprovalNotification", "Outputs.SNSTopicArn"] ExternalEntityLink: OutputTestUrl RunOrder: 3 How to

AWS CodePipeline adding artifacts to S3 in less useful format than running steps individually

跟風遠走 提交于 2019-12-19 05:00:14
问题 I've set up a CodePipeline with the end goal of having a core service reside on S3 as a private maven repo for other pipelines to rely on. When the core service is updated and pushed to AWS CodeCommit, the pipeline should run, test it, build a jar using a maven docker image, then push the resulting jar to S3 where it can be accessed by other applications as needed. Unfortunately, while the CodeBuild service works exactly how I want it to, uploading XYZCore.jar to /release on the bucket, the

AWS CodePipeline Doesn't upload artifacts to AWS S3

扶醉桌前 提交于 2019-12-14 03:42:03
问题 As an effort to automate the (Android) build and test process, I configured an AWS code pipeline that will 1st get the code from GitHub and trigger a build (via aws codebuild ) Build is shown as completed successfully but the artifacts (apk file) generated as a result of the build process isn't uploaded to the s3 bucket (public bucket). The logs clearly say the upload is successful as seen in the screenshots attached The codepipeline as well shows everything is successful as attached However,

Find which resource triggered CodePipeline when multiple resources from CodeCommit

江枫思渺然 提交于 2019-12-13 03:28:02
问题 I'm using AWS and created a CodePipeline using multiple resources (CodeCommit). I properly getting events like this: {'CodePipeline.job': {'id': '... In this event I can find the latest commit for each CodeCommit resource but I did not find how I can determine which specific resource triggered the CodePipeline execution. Is it something doable ? Thanks for your help. 回答1: It is not supported yet, but will be in the future. Right now, maybe you could work around by tracking the eventname of

Working with manual approvals for multiple builds in AWS CodePipeline

冷暖自知 提交于 2019-12-12 08:06:45
问题 We have a CodePipeline set up to do a build, deploy to a QA ECS environment, then a manual approval step to deploy to Prod. What gets confusing though, is when there are several builds running one after another. Several builds get deployed to QA in sequence, but then the Approval button seems to approve them one at a time, and it's not clear which build you're approving when you click on it. What I would like to be able to do is to approve the latest build, in case the earlier builds had

Does AWS SAM CodePipelines do whole rebuild per commit?

做~自己de王妃 提交于 2019-12-11 14:48:27
问题 I am building a distributed app in AWS consisting of base resource (iam etc), data-warehousing but mostly serverless resources like lambdas, sns, mongodb,.. For deploying this over an OTAP I am looking into AWS tooling for this, mostly outlined here. This means that the 1 repo in CodeCommit will trigger the CodePipeline, which will have these components in de right places (realizing order control): deploying CF stacks using CodeBuild to package (AWS sam package) a SAM resource-> for every SAM

AWS CodePipeline: Get CloudFormation outputs in CodeBuild

冷暖自知 提交于 2019-12-11 08:53:30
问题 I'm learning some DevOps techniques using AWS CodePipeline (Cloudformation and CodeBuild). My (simplified) pipeline is this: Push to github repo triggers pipeline CloudFormation builds/updates backend infrastructure CodeBuild does some additional work At the moment, CloudFormation outputs the following: Outputs: RestApiId: Value: !Ref ApiGateway Description: 'API Id' Question: How can I get the ApiGateway ID in CloudBuild? 回答1: According to: https://docs.aws.amazon.com/AWSCloudFormation

How do you handle config files for AWS CodePipelines?

不想你离开。 提交于 2019-12-11 08:07:11
问题 I am on a team of developers using Git as our version control. We want to have a minimum of 3 stages of our development process: staging, dev, and production. The only thing that should change between these stages is a single config file, to tell the Serverless framework what to name the lambda functions, S3 buckets, and any other resource that needs to be created for the CloudFormation stack. However, this makes source control a bit harder. If we put the config files directly in the source