| garciadeblas | 3a82fc0 | 2017-04-21 15:03:48 +0200 | [diff] [blame] | 1 | pipeline { |
| garciadeblas | 0323ff6 | 2017-04-21 15:28:47 +0200 | [diff] [blame] | 2 | agent { |
| 3 | label "pipeline" |
| 4 | } |
| garciadeblas | 3a82fc0 | 2017-04-21 15:03:48 +0200 | [diff] [blame] | 5 | stages { |
| 6 | stage("Build") { |
| 7 | agent { |
| 8 | dockerfile true |
| 9 | } |
| 10 | steps { |
| garciadeblas | d40e551 | 2017-04-21 15:09:26 +0200 | [diff] [blame] | 11 | sh 'make package' |
| garciadeblas | 3a82fc0 | 2017-04-21 15:03:48 +0200 | [diff] [blame] | 12 | stash name: "deb-files", includes: ".build/*.deb" |
| 13 | } |
| 14 | } |
| 15 | stage("Unittest") { |
| 16 | agent { |
| 17 | dockerfile true |
| 18 | } |
| 19 | steps { |
| 20 | sh 'echo "UNITTEST"' |
| 21 | } |
| 22 | } |
| 23 | stage("Repo Component") { |
| garciadeblas | 10b81cf | 2017-04-24 15:55:26 +0200 | [diff] [blame] | 24 | agent any |
| garciadeblas | 3a82fc0 | 2017-04-21 15:03:48 +0200 | [diff] [blame] | 25 | steps { |
| 26 | unstash "deb-files" |
| 27 | sh ''' |
| 28 | mkdir -p pool/RO |
| garciadeblas | d40e551 | 2017-04-21 15:09:26 +0200 | [diff] [blame] | 29 | mv .build/*.deb pool/RO/ |
| garciadeblas | 515dbae | 2017-04-24 11:41:29 +0200 | [diff] [blame] | 30 | mkdir -p dists/ReleaseOne/unstable/RO/binary-amd64/ |
| 31 | apt-ftparchive packages pool/RO > dists/ReleaseOne/unstable/RO/binary-amd64/Packages |
| 32 | gzip -9fk dists/ReleaseOne/unstable/RO/binary-amd64/Packages |
| garciadeblas | 3a82fc0 | 2017-04-21 15:03:48 +0200 | [diff] [blame] | 33 | ''' |
| 34 | archiveArtifacts artifacts: "dists/**,pool/RO/*.deb" |
| 35 | } |
| 36 | } |
| 37 | } |
| 38 | } |