forked from hpcugent/logstash-patterns
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
24 lines (20 loc) · 848 Bytes
/
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
#!/usr/bin/env groovy
def LOGSTASH_VERSION = "7.6.2"
node {
stage('checkout git') {
checkout scm
// remove untracked files (*.pyc for example)
sh 'git clean -fxd'
}
stage('install logstash') {
sh "wget -nv https://artifacts.elastic.co/downloads/logstash/logstash-${LOGSTASH_VERSION}.tar.gz"
sh "tar -xzf logstash-${LOGSTASH_VERSION}.tar.gz"
env.PATH = "${pwd()}/logstash-${LOGSTASH_VERSION}/bin:${env.PATH}"
}
stage('test') {
sh 'python2.7 -V'
sh 'pip3 install --ignore-installed --prefix $PWD/.vsc-tox tox'
sh 'export PATH=$PWD/.vsc-tox/bin:$PATH && export PYTHONPATH=$PWD/.vsc-tox/lib/python$(python3 -c "import sys; print(\\"%s.%s\\" % sys.version_info[:2])")/site-packages:$PYTHONPATH && tox -v -c tox.ini'
sh 'rm -r $PWD/.vsc-tox'
}
}