-
Notifications
You must be signed in to change notification settings - Fork 3
/
Jenkinsfile
35 lines (27 loc) · 1.38 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
@Library('ciElastestConnect') _
elastest_lib.setVersion('dev')
//initialization of the context for the library
elastest_lib.setContext(this)
elastest_lib.setAuthenticatedElastest(true)
//initialization of the runnable object to access elastest methods inside the pipeline
def elastest= elastest_lib.getElastestMethods()
elastest_lib.setMode('experimental-lite')
//definition of nodes is managed by the library. Just declare the steps of your pipeline
//inside the elastest_lib.pipeline({...})
elastest_lib.pipeline({
stage ('docker container')
def mycontainer = elastest.ctx.docker.image('elastest/ci-docker-e2e-compose-py:latest')
mycontainer.pull()
mycontainer.inside("-u jenkins -v /var/run/docker.sock:/var/run/docker.sock:rw -v /dev/shm:/dev/shm") {
sh '/usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf &'
stage ('prepare')
git 'https://github.com/elastest/elastest-security-service.git'
elastest.connect2ElastestNetwork()
def elastestUser = elastest.getElasTestUser()
def elastestPass = elastest.getElasTestPassword()
def elastestURL = "http://" + elastestUser +":"+ elastestPass+"@"+elastest.getIp()+":"+elastest.getPort()
stage ("E2E tests")
sh "pip install requests"
sh "cd e2e-test;python e2etest.py "+elastestURL
}
})