-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
38 lines (29 loc) · 944 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
26
27
28
29
30
31
32
33
34
35
36
37
node ('master') {
stage 'Checkout'
echo 'Checkout'
// Get some code from a GitHub repository
git url: '[email protected]:uniray7/laputa-api.git', credentialsId:'laputa-api-cred'
stage 'Build'
echo 'Build'
docker.withServer('tcp://dockerd:4243') {
def img = docker.build("laputa-api")
}
stage 'Unittest'
echo 'Unittest'
docker.withServer('tcp://dockerd:4243') {
// def img = sh "docker run laputa-api npm test"
}
stage 'Checkout Integration Test'
echo 'Checkout Integration Test'
// Get some code from a GitHub repository
git url: '[email protected]:uniray7/verpix.me.git', credentialsId:'verpix-me-cred'
stage 'Integration Test'
echo 'Integration test'
docker.withServer('tcp://dockerd:4243') {
sh 'docker-compose up verpix-dev-laputa-api &'
sh 'sh integration_test.sh'
sh 'sleep 100'
sh 'docker-compose stop'
sh 'docker-compose rm -f'
}
}