forked from event-storming/reqres_products
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuildspec-sample.yml
More file actions
31 lines (29 loc) · 843 Bytes
/
buildspec-sample.yml
File metadata and controls
31 lines (29 loc) · 843 Bytes
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
version: 0.2
env:
variables:
IMAGE_REPO_NAME: "products"
phases:
install:
runtime-versions:
java: openjdk8
pre_build:
commands:
- echo Logging in to Amazon ECR...
- echo $IMAGE_REPO_NAME
- echo $AWS_ACCOUNT_ID
- echo $AWS_DEFAULT_REGION
- echo "commit id :" $CODEBUILD_RESOLVED_SOURCE_VERSION
- echo "tag name :" $CODEBUILD_SOURCE_VERSION
- echo "tag name2 :" $CODEBUILD_WEBHOOK_TRIGGER
- TAG_NAME=$(echo $CODEBUILD_WEBHOOK_TRIGGER | awk -F'/' '{print $2}')
- echo "tag name3 :" $TAG_NAME
- echo start command
build:
commands:
- echo Build started on `date`
- echo Building the Docker image...
- echo "tag name4 :" $TAG_NAME
post_build:
commands:
- echo Build completed on `date`
- echo Pushing the Docker image...