Questions tagged [aws-codebuild]

Describes Amazon Web Services CodeBuild questions and answers. Scope should be limited to AWS CodeBuild.

AWS CodeBuild is a fully managed build service that compiles source code, runs tests, and produces software packages that are ready to deploy. With CodeBuild, you don’t need to provision, manage, and scale your own build servers. CodeBuild scales continuously and processes multiple builds concurrently, so your builds are not left waiting in a queue. You can get started quickly by using prepackaged build environments, or you can create custom build environments that use your own build tools. With CodeBuild, you are charged by the minute for the compute resources you use.

Documentation

1448 questions
15
votes
2 answers

AWS CodeBuild does not work with Yarn Workspaces

I'm using Yarn Workspaces in my repository and also using AWS CodeBuild to build my packages. When build starts, CodeBuild takes 60 seconds to install all packages and I'd want to avoid this time caching node_modules folder. When I add: cache: …
Pedro Arantes
  • 5,113
  • 5
  • 25
  • 60
15
votes
5 answers

Github monorepo as source for AWS CodePipeline

We use the monorepo approach for storing our source in github. Is it currently possible to have CodePipeline trigger only on a commit to a particular subfolder. This is something that is currently possible with TeamCity by setting a filter on the…
Grant Trevor
  • 1,052
  • 9
  • 23
15
votes
2 answers

AWS codeBuild/codePipeline with serverless framework

I am trying to automate Deployment Pipeline for my application. Here is the automation architecture, I came up with: As you can see, I am using codePipeline and codeBuild to automate my deployment. My backend is based on Serverless Framework, which…
15
votes
1 answer

Codebuild aws command not found when ran?

I'm trying to get a simple docker app to build using AWS codebuild, but I am coming across an error where the aws command is not found: [Container] 2016/12/10 04:29:17 Build started on Sat Dec 10 04:29:17 UTC 2016 [Container] 2016/12/10 04:29:17…
James111
  • 15,378
  • 15
  • 78
  • 121
14
votes
3 answers

Docker Hub Login for AWS CodeBuild (Docker Hub Limit)?

This is my Current Setup: Gets repository from Bitbucket Builds the docker image using the Amazon Linux 2 AWS managed image Push the image to ECR I am now sometimes getting the toomanyrequests error during the docker build phase. So, now I want to…
Hridiago
  • 165
  • 1
  • 9
14
votes
4 answers

Code build is failed with Error while executing command: npm install. Reason: exit status 127

I created a code pipeline with very simple code and connected to codecommit. tried to build it but it is failing at codebuild step stating error executing npm install. Am I missing something? Sorry I was new to this codebuild/ codepipeline. Below is…
Kishan
  • 197
  • 1
  • 1
  • 6
14
votes
3 answers

How to set Branch Filter option in AWS CodeBuild cloudformation template?

If using a Github repository as a source in a CodeBuild project, the Branch Filter option allows to run builds only for branches, whose name is matching a certain regular expression. AWS Management Console In the AWS Management Console you can…
14
votes
2 answers

Viewing Unit Test and Coverage Reports Generated in AWS CodeBuild

I am using AWS CodeBuild to run unit tests for my python project using pytest. I am using the --junitxml argument and the pytest-cov package to generate test reports and coverage reports that I've listed as artifacts in my buildspec.yml. I've used…
Brian
  • 2,702
  • 5
  • 37
  • 71
14
votes
1 answer

Using IAM roles on the AWS CodeBuild worker

Is there a way to grant IAM instance roles to be used by the build process? In my particular case I need to perform some s3 operations during build (unrelated to archiving artifacts). So far the only alternative I found is to add an aws key and…
Daniel Sperry
  • 4,381
  • 4
  • 31
  • 41
13
votes
2 answers

pull access denied for Amazon ECR, repository does not exist or may require 'docker login'

I have an image in an Amazon ECR Repository called workshop I have a Dockerfile to pull that image CodeBuild should build the new image from Dockerfile Problem: pull access denied for xxxxxxxxxxx.dkr.ecr.eu-central-1.amazonaws.com/workshop,…
vasil001
  • 2,501
  • 4
  • 8
  • 22
13
votes
2 answers

CodeBuild cannot find the 0.0.0.0/0 destination for the target internet gateway

I've been struggling with this for hours. So, I created my VPC, along with 4 different subnets. The first three are attached to a regular Internet Gateway. The last one is attached to a NAT Gateway (with 0.0.0.0/0 as Destination). My CodeBuild…
Marian Busoi
  • 1,047
  • 2
  • 9
  • 17
13
votes
5 answers

Getting Commit ID in CodePipeline

I am using CodePipeline with CodeCommit. Builds are triggered automatically with push to master branch. In CodePipeline console it is clearly visible that i am receiving commit id but i need to get it in the build environment so i can add them as a…
13
votes
2 answers

How to handle multiple environments in CodePipeline?

I'm using code pipeline to deploy my infrastructure and I would like to be able to deploy it in different environments (dev, staging, prod,...). I currently have a buildspec.yml file containing some "pip install" instructions and the "aws…
13
votes
3 answers

AWS CodePipeline, build failed & getting error as YAML_FILE_ERROR M

I'm new to AWS CodePipeline and never had past experience with any continuous integration tool like Jenkins, etc. I have created a new AWS CodePipeline as AWS CodeCommit (Code repository) -> CodeBuild (not docker, and environment is NodeJS 7)-> AWS…
12
votes
3 answers

Custom version label with aws code pipeline

I'm using AWS CodePipeline with CodeBuild to build and deploy my application to ElasticBeanstalk. CodePipeline generates version names like this: code-pipeline-1122334455667-MyApp-1ac31f7c-1343-471x-a7e8-46b24f1785a Is it possible to customize these…
1 2
3
96 97