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.

961 questions
32
votes
6 answers

Code build execution continues after build fails instead of stopping

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…
26
votes
2 answers

Selecting other branch instead of master as a source repository on AWS CodeBuild

How to specify different branch instead of master branch on AWS code deploy while using Github as source provider ? I see there is no option to select in the console to select branch(may be I missed). I tried to checkout to different branch while we…
bravokeyl
  • 316
  • 2
  • 15
  • 25
22
votes
9 answers

How to increase the maximum size of the AWS lambda deployment package (RequestEntityTooLargeException)?

I upload my lambda function sources from AWS codebuild. My Python script uses NLTK so it needs a lot of data. My .zip package is too big and an RequestEntityTooLargeException occurs. I want to know how to increase the size of the deployment package…
Louis Singer
  • 488
  • 1
  • 6
  • 15
20
votes
5 answers

Get GitHub git branch for AWS CodeBuild

I'm setup AWS CodeBuild to build automatically from GitHub. Other CI services provide an environment variable for the branch, but I can't find one for AWS CodeBuild. There is a CODEBUILD_SOURCE_VERSION that is set to either pr/7 where 7 is the pull…
Cameron Taggart
  • 5,047
  • 3
  • 35
  • 62
19
votes
1 answer

DOWNLOAD_SOURCE Failed AWS CodeBuild

Whenever I start AWS CodeBuild I get this type of error every time. please help. DOWNLOAD_SOURCE Failed 3 mins, 2 secs Get https://github.com/themithunbiswas/test-repo.git/info/refs?service=git-upload-pack: dial tcp…
Mithun Biswas
  • 803
  • 1
  • 6
  • 12
19
votes
2 answers

Is there a way to change directory on AWS codebuild

With Snap-CI going away I've been trying to get our builds working on AWS CodeBuild. I have my buildspec.yml built out, but changing directories doesn't seem to work. version: 0.1 phases: install: commands: - apt-get update -y -…
Zipper
  • 6,684
  • 6
  • 44
  • 64
19
votes
6 answers

AWS CodeBuild + CodePipeline: "No matching artifact paths found"

I am attempting to get CodePipeline to fetch my code from GitHub and build it with CodeBuild. The first (Source) step works fine. But the second (Build) step fails during the "UPLOAD_ARTIFACTS" part. Here are the relevant log statements: [Container]…
John D.
  • 2,129
  • 2
  • 21
  • 36
18
votes
2 answers

AWS CodeBuild – Build does not have internet connectivity. Please check subnet network configuration

I am experimenting with CodeBuild but have reached a dead-end. My build always fails with the error message: Build does not have internet connectivity. Please check subnet network configuration. I checked the VPC configuration (subnet, security…
John Keyes
  • 5,129
  • 1
  • 26
  • 45
17
votes
2 answers

How to run docker-compose on AWS CodeBuild?

I'm trying to setup automated Rails tests on AWS CodeBuild using docker-compose, but it errors out. In buildspec.yml: phases: build: commands: - docker-compose up -d [Container] 2018/10/23 11:27:56 Running command docker-compose up…
mahemoff
  • 38,430
  • 30
  • 133
  • 196
17
votes
3 answers

How to pass environment variable to the buildspec.yml for AWS codebuild

I have the following command in my buildspec.yml file in my gatsby site root directory. version: 0.2 phases: install: commands: - npm i npm@latest -g - npm install --global gatsby-cli - npm install - pip install…
Acoustic Mike
  • 401
  • 1
  • 5
  • 18
16
votes
2 answers

AWS CodeBuild local cache failing to actually cache?

I've been trying to get AWS CodeBuild's local cache to work and for the life of me I can't get even the most basic cache to work. My ultimate goal is to cache Gradle artifacts, as discussed here. But because I couldn't get that to work, I tried an…
Patrick Lightbody
  • 4,084
  • 1
  • 24
  • 34
16
votes
4 answers

AWS CodeBuild buildspec.yml get all files and subfolders recursively

I'm trying to use AWS CodeBuild to get all files and subfolders inside a nested public folder and deploy to an S3 bucket using CodePipeline. I was able to hook them all together but struggling to configure the buildspec.yml file to get the output I…
Viet
  • 4,043
  • 4
  • 27
  • 51
16
votes
3 answers

Setting credentials for https git clone in AWS CodeBuild

I am running a CodeBuild on a project that has private requirements stored in CodeCommit. I need to add a command in buildspec.yml that loads the https git credentials so git clone works when CodeBuild runs pip install. The build fails with fatal:…
woodpav
  • 1,275
  • 1
  • 8
  • 22
15
votes
2 answers

CodePipeline: ECR source + ECS deploy configuration

Basically, I need to configure CI/CD with bitbucket source code to ECS containers. I want to use CodePipline to deploy new ECR image to ECS. Currently, there is no option in AWS CodePipline to specify bitbucket as the source. However, I've managed…
15
votes
1 answer

CodeStar/CodeBuild Role X trusts too many services, expected only 1

I'm testing out CodeStar with the default NodeJS & serverless template. For some reason this template defaults to nodejs 8.11 for the runtime environment and 6.10 for the build environment. In order to sync them I'm attempting to override the build…
Chris Owens
  • 4,468
  • 7
  • 49
  • 118
1
2 3
64 65