Preliminar Jenkinsfile and Dockerfile for RO; testing new debian repo structure 32/1632/1
authorgarciadeblas <gerardo.garciadeblas@telefonica.com>
Fri, 21 Apr 2017 13:03:48 +0000 (15:03 +0200)
committergarciadeblas <gerardo.garciadeblas@telefonica.com>
Fri, 21 Apr 2017 13:03:48 +0000 (15:03 +0200)
Change-Id: Ia80388afa1c779a08ed5f466eefd31da3152921d
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
Dockerfile [new file with mode: 0644]
Jenkinsfile [new file with mode: 0644]

diff --git a/Dockerfile b/Dockerfile
new file mode 100644 (file)
index 0000000..a8e918d
--- /dev/null
@@ -0,0 +1,9 @@
+FROM ubuntu:16.04
+
+RUN add-apt-repository -y 'deb https://osm-download.etsi.org/repository/osm/debian ReleaseONE unstable' && \
+  apt-get update && \
+  DEBIAN_FRONTEND=noninteractive apt-get -y install python python-pip libmysqlclient-dev libssl-dev libffi-dev && \
+  DEBIAN_FRONTEND=noninteractive pip install --upgrade pip && \
+  DEBIAN_FRONTEND=noninteractive apt-get -y install python-argcomplete python-boto python-bottle python-jsonschema python-logutils python-cinderclient python-glanceclient python-keystoneclient python-neutronclient python-novaclient python-mysqldb
+
+
diff --git a/Jenkinsfile b/Jenkinsfile
new file mode 100644 (file)
index 0000000..d67084f
--- /dev/null
@@ -0,0 +1,36 @@
+pipeline {
+       agent any
+       stages {
+               stage("Build") {
+                       agent {
+                               dockerfile true
+                       }
+                       steps {
+                               sh 'make clean build'
+                               sh 'make clean package'
+                               stash name: "deb-files", includes: ".build/*.deb"
+                       }
+               }
+               stage("Unittest") {
+                       agent {
+                               dockerfile true
+                       }
+                       steps {
+                               sh 'echo "UNITTEST"'
+                       }
+               }
+               stage("Repo Component") {
+                       steps {
+                               unstash "deb-files"
+                               sh '''
+                                       mkdir -p pool/RO
+                                       mv build/deb_dist/*.deb pool/RO/
+                                       mkdir -p dists/$RELEASE/unstable/RO/binary-amd64/
+                                       apt-ftparchive packages pool/RO > dists/$RELEASE/unstable/RO/binary-amd64/Packages
+                                       gzip -9fk dists/$RELEASE/unstable/RO/binary-amd64/Packages
+                                       '''
+                               archiveArtifacts artifacts: "dists/**,pool/RO/*.deb"
+                       }
+               }
+       }
+}