-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
53 lines (50 loc) · 1.65 KB
/
Jenkinsfile
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
pipeline {
agent any
stages {
stage('Get Code') {
steps {
// Obtener código del repo
//git 'https://github.com/anieto-unir/helloworld.git'
script {
scmVars = checkout scm
echo 'scm : the commit id is ' + scmVars.GIT_COMMIT
}
}
}
stage('Build') {
steps {
echo 'Eyyy, esto es Python. No hay que compilar nada!!!'
echo 'El workspace contiene el commit \'' + scmVars.GIT_COMMIT + '\' de la rama \'' + scmVars.GIT_BRANCH + '\''
}
}
stage('Tests') {
parallel {
stage('Unit') {
steps {
bat '''
set PYTHONPATH=%WORKSPACE%
pytest --junitxml=result-unit.xml test\\unit
'''
}
}
stage('Service') {
steps {
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
set PYTHONPATH=%WORKSPACE%
pytest --junitxml=result-rest.xml test\\rest
'''
}
}
}
}
stage ('Results') {
steps {
junit 'result*.xml'
}
}
}
}