Skip to content

Commit adb688b

Browse files
committedJan 16, 2020
Integration tests
1 parent 8d24608 commit adb688b

File tree

3 files changed

+73
-3
lines changed

3 files changed

+73
-3
lines changed
 

‎codefresh-3.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
version: "1.0"
2+
stages:
3+
- prepare
4+
- test
5+
- build
6+
steps:
7+
main_clone:
8+
type: "git-clone"
9+
stage: prepare
10+
description: "Cloning main repository..."
11+
repo: '${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}'
12+
revision: "${{CF_BRANCH}}"
13+
run_unit_tests:
14+
title: Compile/Unit test
15+
stage: test
16+
image: 'maven:3.5.2-jdk-8-alpine'
17+
commands:
18+
- mvn -Dmaven.repo.local=/codefresh/volume/m2_repository package
19+
build_app_image:
20+
title: Building Docker Image
21+
type: build
22+
stage: build
23+
image_name: spring-boot-2-example-app
24+
working_directory: ./
25+
tag: 'latest'
26+
dockerfile: Dockerfile

‎codefresh-4.yml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
version: "1.0"
2+
stages:
3+
- prepare
4+
- test
5+
- build
6+
- 'integration test'
7+
steps:
8+
main_clone:
9+
type: "git-clone"
10+
stage: prepare
11+
description: "Cloning main repository..."
12+
repo: '${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}'
13+
revision: "${{CF_BRANCH}}"
14+
run_unit_tests:
15+
title: Compile/Unit test
16+
stage: test
17+
image: 'maven:3.5.2-jdk-8-alpine'
18+
commands:
19+
- mvn -Dmaven.repo.local=/codefresh/volume/m2_repository package
20+
build_app_image:
21+
title: Building Docker Image
22+
type: build
23+
stage: build
24+
image_name: spring-boot-2-example-app
25+
working_directory: ./
26+
tag: 'latest'
27+
dockerfile: Dockerfile
28+
run_integration_tests:
29+
title: Integration test
30+
stage: 'integration test'
31+
image: maven:3.5.2-jdk-8-alpine
32+
commands:
33+
- mvn -Dmaven.repo.local=/codefresh/volume/m2_repository verify -Dserver.host=http://my-spring-app
34+
services:
35+
composition:
36+
my-spring-app:
37+
image: '${{build_app_image}}'
38+
ports:
39+
- 8080
40+
readiness:
41+
timeoutSeconds: 30
42+
periodSeconds: 20
43+
failureThreshold: 4
44+
image: byrnedo/alpine-curl
45+
commands:
46+
- "curl http://my-spring-app:8080/"

‎pom.xml

+1-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<modelVersion>4.0.0</modelVersion>
66
<artifactId>spring-boot-sample-actuator</artifactId>
77
<name>Spring Boot Actuator Sample</name>
8-
<version>2.0.2</version>
8+
<version>1.2.5</version>
99
<description>Spring Boot Actuator Sample</description>
1010

1111
<packaging>jar</packaging>
@@ -18,9 +18,7 @@
1818

1919

2020
<properties>
21-
2221
<java.version>1.8</java.version>
23-
2422
</properties>
2523

2624
<dependencies>

0 commit comments

Comments
 (0)
Please sign in to comment.