-
Notifications
You must be signed in to change notification settings - Fork 0
/
codefresh.yml
54 lines (29 loc) · 1000 Bytes
/
codefresh.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
version: '1.0'
steps:
BuildingDockerImage:
title: Building Docker Image
type: build
image_name: worm69/mobiletaiga
working_directory: ./
tag: '${{CF_BRANCH_TAG_NORMALIZED}}'
dockerfile:
content: >-
FROM maven:3.5.0-jdk-8 AS builder
# speed up Maven JVM a bit
ENV MAVEN_OPTS="-XX:+TieredCompilation -XX:TieredStopAtLevel=1"
# make source folder
RUN mkdir -p /app
WORKDIR /app
# copy other source files (keep code snapshot in image)
COPY pom.xml /app
COPY src /app/src
# run packaging
RUN mvn package -T 1C
# customize base JDK version here
FROM openjdk:8-jre AS target
EXPOSE 8080
# copy Java application WAR file: package app bytecode and libs into
single WAR
COPY --from=builder /app/target/*.jar /app.jar
# default command to run Java application
CMD ["/usr/bin/java", "-jar", "/app.jar"]