-
Notifications
You must be signed in to change notification settings - Fork 5
/
codefresh-4.yml
46 lines (46 loc) · 1.19 KB
/
codefresh-4.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
version: "1.0"
stages:
- prepare
- test
- build
- 'integration test'
steps:
main_clone:
type: "git-clone"
stage: prepare
description: "Cloning main repository..."
repo: '${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}'
revision: "${{CF_BRANCH}}"
run_unit_tests:
title: Compile/Unit test
stage: test
image: 'maven:3.5.2-jdk-8-alpine'
commands:
- mvn -Dmaven.repo.local=/codefresh/volume/m2_repository package
build_app_image:
title: Building Docker Image
type: build
stage: build
image_name: spring-boot-2-example-app
working_directory: ./
tag: 'latest'
dockerfile: Dockerfile
run_integration_tests:
title: Integration test
stage: 'integration test'
image: maven:3.5.2-jdk-8-alpine
commands:
- mvn -Dmaven.repo.local=/codefresh/volume/m2_repository verify -Dserver.host=http://my-spring-app
services:
composition:
my-spring-app:
image: '${{build_app_image}}'
ports:
- 8080
readiness:
timeoutSeconds: 30
periodSeconds: 20
failureThreshold: 4
image: byrnedo/alpine-curl
commands:
- "curl http://my-spring-app:8080/"