-
Notifications
You must be signed in to change notification settings - Fork 15
/
Jenkinsfile
50 lines (50 loc) · 1.35 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
pipeline {
agent { label 'master' }
environment {
KUBECONFIG = credentials('a700aafc-b29c-4052-a8f8-c93863709f25')
PATH = "/usr/local/bin:$PATH"
}
stages {
stage('Setup') {
steps {
sh '''#!/bin/bash -ex
python3 -m venv scenario
source scenario/bin/activate
pip install --exists-action i yamllint
pip install --exists-action i flake8
pip install --exists-action i pytest
pip install .
oc version
'''
}
}
stage('Flake8') {
steps {
sh '''#!/bin/bash -ex
source scenario/bin/activate
flake8 piqe_ocp_lib/*
'''
}
}
stage('PyTest') {
steps {
sh '''#!/bin/bash -ex
source scenario/bin/activate
pytest -sv piqe_ocp_lib/tests/resources
'''
}
}
stage('Cleanup') {
steps {
sh '''#!/bin/bash -ex
rm -rf scenario
'''
}
}
}
post {
always {
archiveArtifacts artifacts: '**/*', fingerprint: true
}
}
}