-
Notifications
You must be signed in to change notification settings - Fork 44
/
buildspec.yml
66 lines (59 loc) · 2.21 KB
/
buildspec.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#
# Author: Hari Sekhon
# Date: 2020-12-19 15:32:28 +0000 (Sat, 19 Dec 2020)
#
# https://github.com/HariSekhon/DevOps-Perl-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`