aws-codebuild

Build a docker image on AWS Codebuild based on an image pulled from an ECR of another user: “no basic auth credentials”

让人想犯罪 __ 提交于 2019-12-25 01:37:21
问题 I have a line in my Dockerfile like this: FROM 6*********.dkr.ecr.ap-southeast-1.amazonaws.com/*************:ff03401 This ECR is owned by another user. As recommended in this question, I am trying to log in by using these commands in the build section of my buildspec.yml , and then immediately pull this docker image: - aws configure set aws_access_key_id $ECR_ACCESS_KEY - aws configure set aws_secret_access_key $ECR_SECRET_KEY - eval aws ecr get-login --no-include-email --region ap-southeast

Template error: instance of function references undefined resource

三世轮回 提交于 2019-12-24 19:25:30
问题 Background I am trying to add service role for codebuild via cloud formation. I keep getting the following error but I am not sure how to fix it. Failed to create the changeset: Waiter ChangeSetCreateComplete failed: Waiter encountered a terminal failure state Status: FAILED. Reason: Template error: instance of Fn::GetAtt references undefined resource CodeBuildServiceRole I have the following file that has my codebuild configuration Mappings: 'Fn::Transform': Name: 'AWS::Include' Parameters:

Programmatically unset encryption for a file in aws s3

浪子不回头ぞ 提交于 2019-12-22 07:12:18
问题 I'm performing an android build via aws code build . The apk files generated are by default applied with server side encryption (aws-kms) I can unset the encryption manually by clicking as shown below from the s3 bucket by unselecting ASW-KMS which gives the following popup Here selecting None option manually will make the link downloadable. I want to achieve this programmatically . I have already tried adding permissions as mentioned here. Also did experiment a fair bit with python boto3.

Is there a way to change directory on AWS codebuild

﹥>﹥吖頭↗ 提交于 2019-12-21 07:54:50
问题 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 - apt-get install -y node - apt-get install -y npm build: commands: - cd MyDir //Expect to be in MyDir now - echo `pwd` //Shows /tmp/blablabla/ instead of /tmp/blablabla/MyDir - npm install //Fails because I'm not in the right directory - bower install - npm run ci post

Is there a way to change directory on AWS codebuild

痴心易碎 提交于 2019-12-21 07:52:03
问题 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 - apt-get install -y node - apt-get install -y npm build: commands: - cd MyDir //Expect to be in MyDir now - echo `pwd` //Shows /tmp/blablabla/ instead of /tmp/blablabla/MyDir - npm install //Fails because I'm not in the right directory - bower install - npm run ci post

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,

How to read SSM parameters when using AWS Codebuild?

心已入冬 提交于 2019-12-21 04:46:15
问题 I'm currently successfully using codebuild for simple build tasks (in a non-vpc configuration). But now I'm trying to run a build task that reads an SSM parameter value, and it's failing because it can't load any credentials, the apparent cause being: com.amazonaws.auth.InstanceProfileCredentialsProvider@5754b242: Unable to load credentials from service endpoint The IAM service-role I've allocated to the codebuild project does have ssm:GetParameters permission for the parameter that I'm

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,

AWS CodeBuild - docker: not found

老子叫甜甜 提交于 2019-12-11 13:45:34
问题 I have the following buildspec.yml: version: 0.2 phases: install: commands: - curl -L -o sbt-0.13.6.deb http://dl.bintray.com/sbt/debian/sbt-0.13.6.deb && \ - dpkg -i sbt-0.13.6.deb && \ - rm sbt-0.13.6.deb && \ - apt-get update && \ - apt-get install sbt && \ pre_build: commands: - echo Entered the pre_build phase... - docker login -u user -p pass build: commands: - echo Build started on `date` - sbt test - echo test completed on `date` - sbt docker:publishLocal - docker tag image repo post

AWS CodeBuild DOWNLOAD_SOURCE error: CLIENT_ERROR: reference delta not found

跟風遠走 提交于 2019-12-11 10:35:01
问题 I'm getting this error when trying to start a build on AWS CodeBuild: CLIENT_ERROR: reference delta not found for primary source and source version 0b0b4b6ebc477f92c2d51f2ac4ad0fc0ebc46782 Is this error caused by git or AWS CodeBuild itself? How could I remove it? Update 1: Here is my CloudFormation configuration template: CodeBuildProject: Type: AWS::CodeBuild::Project Properties: Artifacts: Type: NO_ARTIFACTS Cache: Location: LOCAL Modes: - LOCAL_CUSTOM_CACHE Type: LOCAL Environment: