-
Notifications
You must be signed in to change notification settings - Fork 176
/
semaphore.yml
61 lines (61 loc) · 1.52 KB
/
semaphore.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
56
57
58
59
60
61
version: v1.0
name: Java Spring example CI pipeline on Semaphore
agent:
machine:
type: e1-standard-2
os_image: ubuntu2004
blocks:
- name: Build
task:
env_vars:
- name: MAVEN_OPTS
value: '-Dmaven.repo.local=.m2'
jobs:
- name: Build
commands:
- sem-version java 17
- checkout
- cache restore
- 'mvn -q package jmeter:configure -Dmaven.test.skip=true'
- cache store
- name: Test
task:
env_vars:
- name: MAVEN_OPTS
value: '-Dmaven.repo.local=.m2'
prologue:
commands:
- sem-version java 17
- checkout
- cache restore
- mvn -q test-compile -Dmaven.test.skip=true
jobs:
- name: Unit tests
commands:
- mvn test
- name: Integration tests
commands:
- mvn test -Pintegration-testing
- name: Performance tests
task:
env_vars:
- name: MAVEN_OPTS
value: '-Dmaven.repo.local=.m2'
prologue:
commands:
- sem-version java 17
- checkout
- cache restore
jobs:
- name: Benchmark
commands:
- java -version
- java -jar target/spring-pipeline-demo.jar > /dev/null &
- sleep 20
- 'mvn -q jmeter:jmeter'
- 'mvn jmeter:results'
promotions:
- name: "Dockerize \U0001F433"
pipeline_file: docker-build.yml
auto_promote_on:
- result: passed