You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
67 lines
2.2 KiB
YAML
67 lines
2.2 KiB
YAML
#
|
|
# Author: Hari Sekhon
|
|
# Date: 2020-12-19 15:32:28 +0000 (Sat, 19 Dec 2020)
|
|
#
|
|
# https://github.com/HariSekhon/bash-tools
|
|
#
|
|
# License: see accompanying Hari Sekhon LICENSE file
|
|
#
|
|
# If you're using my code you're welcome to connect with me on LinkedIn and optionally send me feedback to help steer this or other code I publish
|
|
#
|
|
# https://www.linkedin.com/in/HariSekhon
|
|
#
|
|
|
|
# ============================================================================ #
|
|
# A W S C o d e B u i l d
|
|
# ============================================================================ #
|
|
|
|
# References:
|
|
#
|
|
# https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html
|
|
|
|
# Operating System should be set to Ubuntu, not Amazon Linux 2
|
|
# - this is both recommended since programming language runtimes are now included in standard image of ubuntu, but also to avoid this error:
|
|
#
|
|
# /usr/bin/amazon-linux-extras
|
|
# /root/.pyenv/versions/3.8.3/bin/python: No module named amazon_linux_extras
|
|
|
|
version: 0.2
|
|
|
|
# only on Linux, the user to run as - global setting, alternatively set inside a phase section below for localized user
|
|
#run-as: linux-username
|
|
|
|
env:
|
|
shell: bash
|
|
# don't store sensitive stuff like AWS secret keys in variables, use parameter-store or secrets-manager
|
|
# any environment variables replace existing environment variables, ie. beware if setting PATH that it'll replace the existing PATH with a non-interpolated literal
|
|
# project env vars take precedence over these, with start build vars taking highest precedence
|
|
#variables:
|
|
# DEBUG: "1"
|
|
#exported-variables:
|
|
# - DEBUG
|
|
|
|
phases:
|
|
# install prerequisites / languages / frameworks / packages to allow build to work
|
|
install:
|
|
#commands:
|
|
# - setup/ci_bootstrap.sh
|
|
# languages to install
|
|
runtime-versions:
|
|
#java: openjdk11
|
|
# AWS LTS release of OpenJDK 11
|
|
java: corretto11
|
|
golang: 1.14
|
|
python: 3.8
|
|
ruby: 2.7
|
|
# eg. sign in to Amazon ECR or install package dependencies
|
|
pre_build:
|
|
commands:
|
|
- setup/ci_bootstrap.sh
|
|
build:
|
|
commands:
|
|
- echo Build started on `date`
|
|
- make
|
|
- echo Build completed on `date`
|
|
- make test
|
|
- echo Tests completed on `date`
|