aws-codebuild

CodePipeline buildspec and multiple build actions

夙愿已清 提交于 2020-01-25 08:00:40
问题 A simple buildspec like: version: 0.2 phases: install: commands: - (cd lambda/src; npm install) - aws cloudformation package --template-file lambda/sam.yml --s3-bucket skynet-lambda --output-template-file SkynetLambdaPackaged.yml artifacts: type: zip files: - SkynetLambdaPackaged.yml Works fine when I have one action in my build stage. But what if I want to have more build actions for example: I want to build my api server and frontend files in parallel. How do I model this? UPDATE In

Errors on using CodeBuild for first time

别来无恙 提交于 2020-01-25 05:16:05
问题 When starting a code build as part of a simple code pipeline, I get the following error within a few seconds. Action execution failed Error calling startBuild: Cannot have more than 0 builds in queue for the account (Service: AWSCodeBuild; Status Code: 400; Error Code: AccountLimitExceededException; Request ID: 80bfxxxxx I have used the AWS Code pipeline wizard to create a simple build and deploy process, so I assume a misconfiguration did this. My question is what is the queue it refers to?

How to retrieve Secret Manager data in buildspec.yaml

坚强是说给别人听的谎言 提交于 2020-01-23 12:51:57
问题 Im working on creating the CodeBuild which is integrated with SonarQube, So I pass values and sonar credentials directly in my Buildspec.yaml Instead of Hardcoding directly, I tried to retrieve using the below command from SecretManager as it is mentioned in the below link. But it is not getting the correct values. it throws an error. Command : '{{resolve:secretsmanager:MyRDSSecret:SecretString:username}}' Link : https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic

Getting “Unable to recognize \”hello-k8s.yml\“: Unauthorized” error when running kubectl apply -f hello-k8s.yml in CodeBuild phase

戏子无情 提交于 2020-01-22 02:30:08
问题 I am new to Kubernetes and trying to create a AWS CodePipeline to deploy service to EKS stack. I am following this tutorial I have followed all the steps including creating a role and adding permissions, so that CodeBuild will be able to talk with EKS. The issue I am facing right now is when CodePipeline runs, it is failing for below command in the CodeBuild phase. kubectl apply -f hello-k8s.yml and giving this error [Container] 2019/12/04 07:41:43 Running command kubectl apply -f hello-k8s

AWS Codebuild fails while downloading source. Message: Access Denied

 ̄綄美尐妖づ 提交于 2020-01-14 07:25:07
问题 I created a CodeBuild Project that uses a docker image for node8. The purpose of this CodeBuild project is to do unit testing. It takes an input artifact from CodeCommit. And in the buildspec.yml it runs a test command. This is my (simple) buildspec file: version: 0.2 phases: install: commands: - echo "install phase started" - npm install - echo "install phase ended" pre_build: commands: - echo "pre_build aka test phase started" - echo "mocha unit test" - npm test - echo "mocha unit test

AWS Codebuild fails while downloading source. Message: reference not found

我的梦境 提交于 2020-01-13 17:07:29
问题 A CI/CD pipeline that utilizes AWS Codebuild that has been functioning normally for months suddenly started failing when build's are triggered using a git tag as the source version. Builds triggered via pull request (pr/#) continue to work correctly. Any help would be much appreciated! 回答1: I work on the CodeBuild team. We have rolled back a change that may have caused this behavior. If you try your build again, it should succeed. 来源: https://stackoverflow.com/questions/49564672/aws-codebuild

Wait for codebuild and get build result using aws cli or boto3

余生颓废 提交于 2020-01-07 06:27:09
问题 I want to wait for a codebuild build and get the result of the build using the aws cli or boto3. There does not seem to be any command for this. All I can do is list builds, but only the build-ids. There is not information about the build (if it is still running and what the build result is). 回答1: Pass the build ID to batch-get-builds: http://docs.aws.amazon.com/cli/latest/reference/codebuild/batch-get-builds.html 来源: https://stackoverflow.com/questions/44407953/wait-for-codebuild-and-get

npm build (nuxt build) does not create dist folder in amplify(aws codebuild) using nuxt spa mode

眉间皱痕 提交于 2020-01-06 03:52:27
问题 I want to create dist folder, after running 'npm build'(nuxt build) in amplify. I run npm build in my local(mac) , then dist folder is created. I run 'ls -a' after 'npm build' , then dist folder does not exist in amplify. > nuxt build 2019-08-20T01:49:08.598Z [INFO]: # Executing command: ls -a 2019-08-20T01:49:08.602Z [INFO]: . .. amplify.sh amplify.yml assets components .editorconfig .eslintrc.js .git .gitignore layouts middleware node_modules .nuxt nuxt.config.js package.json package-lock

AWS codebuild fails cant download source when initiated from codepipeline

拟墨画扇 提交于 2020-01-02 06:13:13
问题 I have a an AWS codebuild job that works fine when I initate manually as a root user. I have a codepipe line that should initiate the build job when codecommit merges into master. It fires the job and the build start but it fails when trying to download source. Ive attached full S3/codebuild/codecommit policies to the pipeline, but it still throws access denied. Which permissions am I missing? 回答1: This generally happens when you have a CodeBuild project already and you integrate it to the

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