add dockerfile for pipeline, nose
[osm/osmclient.git] / Jenkinsfile
1 pipeline {
2     agent {
3         dockerfile true
4     }
5     stages {
6         stage("Checkout") {
7             steps {
8                 checkout scm
9             }
10         }
11         stage("Test") {
12             steps {
13                 sh 'make -j4 test'
14             }
15         }
16         stage("Build") {
17             steps {
18                 sh 'make package'
19                 stash name: "deb-files", includes: "deb_dist/*.deb"
20             }
21         }
22         stage("Repo Component") {
23             steps {
24                 unstash "deb-files"
25                 sh '''
26                     mkdir -p pool/osmclient
27                     mv deb_dist/*.deb pool/osmclient/
28                     mkdir -p dists/unstable/osmclient/binary-amd64/
29                     apt-ftparchive packages pool/osmclient > dists/unstable/osmclient/binary-amd64/Packages
30                     gzip -9fk dists/unstable/osmclient/binary-amd64/Packages
31                     '''
32                 archiveArtifacts artifacts: "dists/**,pool/osmclient/*.deb"
33             }
34         }
35     }
36 }