modified version of jenkins debian glue (https://github.com/mika/jenkins-debian-glue) for devuan
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

132 lines
4.4 KiB

  1. # This jenkins-job-build configuration sets up Jenkins jobs
  2. # for building Debian packages of jenkins-debian-glue
  3. # which are provided using the repository software called reprepro
  4. # [http://mirrorer.alioth.debian.org/] then.
  5. - project:
  6. name: jenkins-debian-glue
  7. repos: git://github.com/mika/jenkins-debian-glue.git
  8. jobs:
  9. - '{name}-source'
  10. - '{name}-binaries'
  11. - '{name}-piuparts'
  12. - job-template:
  13. name: '{name}-source'
  14. project-type: freestyle
  15. description: 'Build Debian source package of {name}.<br />Do not edit this job through the web, it is generated via jenkins-job-builder!'
  16. disabled: false
  17. scm:
  18. - git:
  19. url: '{repos}'
  20. name: origin
  21. refspec: +refs/heads/*:refs/remotes/origin/*
  22. basedir: source
  23. branches:
  24. - master
  25. wipe-workspace: false
  26. builders:
  27. - shell: 'rm -f ./* || true'
  28. - shell: '/usr/bin/generate-git-snapshot'
  29. - shell: |
  30. mkdir -p report
  31. /usr/bin/lintian-junit-report *.dsc > report/lintian.xml
  32. publishers:
  33. - archive:
  34. artifacts: '*.gz,*.bz2,*.xz,*.deb,*.dsc,*.git,*.changes,lintian.txt'
  35. - trigger:
  36. project: '{name}-binaries'
  37. - junit:
  38. results: '**/lintian.xml'
  39. keep-long-stdio: false
  40. - fingerprint:
  41. record-artifacts: true
  42. wrappers:
  43. - timestamps
  44. - job-template:
  45. name: '{name}-binaries'
  46. project-type: matrix
  47. description: |
  48. <p>Build Debian binary packages of {name}.<br />Do not edit this job through the web, it is generated via jenkins-job-builder!</p>
  49. <h2>Usage instructions how to remotely access and use the repository:</h2>
  50. <p>Install apache webserver:</p>
  51. <pre>
  52. sudo apt-get install apache2
  53. sudo ln -s /srv/repository /var/www/debian
  54. </pre>
  55. <p>Then access to this repository is available using the following sources.list entry:</p>
  56. <pre>
  57. deb http://$jenkins_server/debian/ {name} main
  58. deb-src http://$jenkins_server/debian/ {name} main
  59. </pre>
  60. execution-strategy:
  61. sequential: true
  62. axes:
  63. - axis:
  64. type: user-defined
  65. name: architecture
  66. values:
  67. - amd64
  68. builders:
  69. - copyartifact:
  70. project: '{name}-source'
  71. filter: '*'
  72. which-build: upstream-build
  73. fallback-to-last-successful: true
  74. - shell: "/usr/bin/build-and-provide-package"
  75. - shell: |
  76. echo "Listing packages inside the {name} repository:"
  77. /usr/bin/repository_checker --list-repos {name}
  78. - shell: |
  79. mkdir -p report
  80. /usr/bin/lintian-junit-report *.changes > report/lintian.xml
  81. publishers:
  82. - archive:
  83. artifacts: '*.gz,*.bz2,*.xz,*.deb,*.dsc,*.git,*.changes,lintian.txt'
  84. - junit:
  85. results: '**/lintian.xml'
  86. keep-long-stdio: false
  87. - fingerprint:
  88. record-artifacts: true
  89. - trigger:
  90. project: '{name}-piuparts'
  91. - workspace-cleanup:
  92. dirmatch: false
  93. wrappers:
  94. - timestamps
  95. - job-template:
  96. name: '{name}-piuparts'
  97. project-type: freestyle
  98. description: 'Installation and upgrade tests for {name} Debian packages.<br />Do not edit this job through the web, it is generated via jenkins-job-builder!'
  99. disabled: false
  100. parameters:
  101. - string:
  102. name: architecture
  103. default: amd64
  104. description: "Architecture that should be used."
  105. builders:
  106. - copyartifact:
  107. project: '{name}-binaries/architecture=$architecture'
  108. filter: '*.deb'
  109. which-build: upstream-build
  110. fallback-to-last-successful: true
  111. flatten: true
  112. target: 'artifacts/'
  113. - shell: |
  114. # sadly piuparts always returns with exit code 1 :((
  115. sudo piuparts_wrapper $PWD/artifacts/*.deb || true
  116. - shell: 'piuparts_tap piuparts.txt > piuparts.tap'
  117. publishers:
  118. - tap:
  119. results: 'piuparts.tap'
  120. - archive:
  121. artifacts: 'piuparts.*'
  122. - fingerprint:
  123. record-artifacts: true
  124. - workspace-cleanup:
  125. dirmatch: false
  126. wrappers:
  127. - timestamps