-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildspec.yml
40 lines (37 loc) · 927 Bytes
/
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
version: 0.2
env:
parameter-store:
DOCKER_USERNAME: "/dockerhub/username"
DOCKER_PASSWORD: "/dockerhub/password"
DOCKER_REGISTRY: "/dockerhub/registry"
DOCKER_IMAGE: "/dockerhub/image"
phases:
install:
runtime-versions:
nodejs: 10
docker: 18
java: openjdk11
commands:
- docker login -u ${DOCKER_USERNAME} -p ${DOCKER_PASSWORD}
pre_build:
commands:
- cd backend/kafka-producer
- mvn test -q
- cd ../..
build:
commands:
- cd backend
- mvn clean package -DskipTests=true -q
- cd ..
- cd frontend
- npm ci --quiet
- npm run build:prod
- cd ..
- docker build . -t ${DOCKER_REGISTRY}/${DOCKER_IMAGE}
- docker push ${DOCKER_REGISTRY}/${DOCKER_IMAGE}
reports:
producer_tests:
files:
- "**/*"
base-directory: backend/kafka-producer/target/surefire-reports
file-format: JunitXml