AWS CodeBuild Operations: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 50: Line 50:


For more details see: {{Internal|AWS_CodeBuild_Concepts#Environment_Variables|CodeBuild Concepts - Environment Variables}}
For more details see: {{Internal|AWS_CodeBuild_Concepts#Environment_Variables|CodeBuild Concepts - Environment Variables}}
<font color=darkgray>No user environment variables can start with CODEBUILD_


Name: CODEBUILD_SOURCE_VERSION, Value: "unity" (for GitHub, this is the branch name to be uses)
Name: CODEBUILD_SOURCE_VERSION, Value: "unity" (for GitHub, this is the branch name to be uses)
</font>


Additional Configuration
Additional Configuration


Timeout: 20 minutes.
Timeout: 20 minutes.
==Buildspec==
Use a buildspec file.
Specify name of the file, if not buildspec.yml,
==Artifacts==
==Logs==
CloudWatch
Select CloudWatch logs.
Group Name: /playground
Stream Name: ops-unity-build


=Troubleshooting=
=Troubleshooting=


{{External|https://docs.aws.amazon.com/codebuild/latest/userguide/troubleshooting.html}}
{{External|https://docs.aws.amazon.com/codebuild/latest/userguide/troubleshooting.html}}

Revision as of 20:57, 13 February 2019

Internal

Create a Build Project

Project configuration

Select Build badge.

Source

Source provider: GitHub

Repository in my GitHub account.

Additional configuration

Git clone depth: 1

Primary source webhook events

Webhook - Rebuild every time a code change is pushed to this repository. Enable and experiment with that.

Environment

Environment image: Managed image

Operating system: Ubuntu

Runtime: Java

Runtime version: aws/codebuild/java:openjdk-8

Privileged: Enable this flag if you want to build Docker images or want your builds to get elevated privileges

Service role:

For the implications on the build process of correctly configuring the service role, see:

CodeBuild Service Role

Allow AWS CodeBuild to modify this service role so it can be used with this build project. If selected, the console configuration code updates the role so it contains the appropriate policies.

If you get:

The policy's default version was not created by enhanced zero click role creation or was not the most recent version created by enhanced zero click role creation.

unselect "Allow AWS CodeBuild to modify ..."

Environment variables:

For more details see:

CodeBuild Concepts - Environment Variables

No user environment variables can start with CODEBUILD_

Name: CODEBUILD_SOURCE_VERSION, Value: "unity" (for GitHub, this is the branch name to be uses)

Additional Configuration

Timeout: 20 minutes.

Buildspec

Use a buildspec file.

Specify name of the file, if not buildspec.yml,

Artifacts

Logs

CloudWatch

Select CloudWatch logs.

Group Name: /playground

Stream Name: ops-unity-build

Troubleshooting

https://docs.aws.amazon.com/codebuild/latest/userguide/troubleshooting.html