forked from hpcugent/logstash-patterns
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
25 lines (20 loc) · 825 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
25
#!/usr/bin/env groovy
def VIRTUALENV_VERSION = "15.0.3"
def LOGSTASH_VERSION = "2.3.4"
node {
stage 'Checkout'
checkout scm
sh "git clean -fxd"
stage 'Setup virtualenv'
sh "wget -q -O virtualenv-${VIRTUALENV_VERSION}.tar.gz https://github.com/pypa/virtualenv/archive/${VIRTUALENV_VERSION}.tar.gz"
sh "tar -xzf virtualenv-${VIRTUALENV_VERSION}.tar.gz"
sh "python virtualenv-${VIRTUALENV_VERSION}/virtualenv.py venv"
env.PATH = "${pwd()}/venv/bin:${env.PATH}"
stage 'Build'
sh "pip install vsc-base"
sh "wget -q https://download.elastic.co/logstash/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 "cd tests && python runtest.py"
}