forked from anieto-unir/helloworld
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile-P22-T4
57 lines (55 loc) · 1.62 KB
/
Jenkinsfile-P22-T4
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
pipeline
{
agent any
stages
{
stage('Get Code')
{
steps{
bat 'echo "Hello World!"'
git 'https://github.com/anieto-unir/helloworld.git'
bat 'dir'
bat 'echo %WORKSPACE%'
}
}
stage('Tests')
{
parallel
{
stage('Unit Test')
{
steps {
catchError(buildResult: 'UNSTABLE', stageResult: 'FAILURE') {
bat '''
SET PYTHONPATH=%WORKSPACE%
pytest --junitxml=result-unit.xml test\\unit
'''
}
}
}
stage('Rest Test')
{
steps
{
catchError(buildResult: 'UNSTABLE', stageResult: 'FAILURE') {
bat '''
set FLASK_APP=app\\api.py
set FLASK_ENV=development
start flask run
start java -jar C:\\Unir\\Ejercicios\\wiremock\\wiremock-jre8-standalone-2.28.0.jar --port 9090 --root-dir C:\\Unir\\Ejercicios\\wiremock
pytest --junitxml=result-rest.xml test\\rest
'''
}
}
}
}
}
stage('Results')
{
steps
{
junit 'result*.xml'
}
}
}
}