forked from corticometrics/fs-docker
-
Notifications
You must be signed in to change notification settings - Fork 2
/
buildspec-make-build.yml
33 lines (27 loc) · 1.41 KB
/
buildspec-make-build.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
# see https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html
version: 0.2
# `run-as:`: Optional sequence. Available to Linux users only. Specifies a Linux user that runs commands in this buildspec file. run-as grants the specified user read and run permissions. When you specify run-as at the top of the buildspec file, it applies globally to all commands. If you don't want to specify a user for all buildspec file commands, you can specify one for commands in a phase by using run-as in one of the phases blocks. If run-as is not specified, then all commands run as the root user.
# run-as: root
# `env:`: Optional sequence. Represents information for one or more custom environment variables.
env:
# `env/shell`: Optional sequence. Specifies the supported shell for Linux or Windows operating systems. For Linux, supported shell tags are:
# - bash
# - /bin/sh
shell: bash
# https://stackoverflow.com/questions/58216549/how-to-retrieve-secret-manager-data-in-buildspec-yaml
parameter-store:
DOCKERHUB_PASS_PARAM: /dockerhub-access-token-for-pwighton
phases:
install:
on-failure: ABORT
commands:
- export DOCKERHUB_PASS=$DOCKERHUB_PASS_PARAM
- docker login --username pwighton --password $DOCKERHUB_PASS
build:
on-failure: ABORT
commands:
- make fs-build
post_build:
on-failure: ABORT
commands:
- docker push pwighton/fs-dev-build:latest