-
Notifications
You must be signed in to change notification settings - Fork 0
/
codefresh.yml
55 lines (47 loc) · 1.57 KB
/
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
55
version: '1.0'
steps:
build_image:
title: Building Image
type: build
#Important: rename this image to to a valid repository in your registry. For example: myUserName/vote
image_name: ncodefresh/java-spring-mvc
#Dockerfile location should be relative to the working directory
dockerfile: Dockerfile
tag: ${{CF_BRANCH}}
unit_test:
title: Unit Tests
# The image from which the executable container is created. It can be an explicit ID of a Docker image,
# or a variable that references a Build or Push step.
image: maven:latest
# One or more bash commands to execute.
commands:
- mvn -version
push_to_registry:
title: Pushing to Docker Registry
type: push
#A candidate is the image that we want to push to registry
candidate: '${{build_image}}'
# You can push the image with whatever tag you want. In our example we use CF_BRANCH, which is a variable in
# the build process, accessible throughout the entire flow.
tag: '${{CF_BRANCH}}'
launch_composition:
type: launch-composition
composition:
version: '2'
services:
tomcat:
image: ncodefresh/tomcat7:latest
ports:
- 8080
links:
- app
volumes_from:
- app
app:
image: ${{build_image}}
volumes:
- wars:/opt/tomcat/webapps
volumes:
wars:
driver: local
environment_name: 'java-spring-mvc'