diff options
Diffstat (limited to 'jenkins/head.yaml')
-rw-r--r-- | jenkins/head.yaml | 208 |
1 files changed, 208 insertions, 0 deletions
diff --git a/jenkins/head.yaml b/jenkins/head.yaml new file mode 100644 index 0000000..8407fcd --- /dev/null +++ b/jenkins/head.yaml @@ -0,0 +1,208 @@ +- defaults: + name: global + description: 'Do not edit this job through the web interface, it is generated via jenkins-job-builder!' + logrotate: + daysToKeep: -1 + numToKeep: 2 + artifactDaysToKeep: -1 + artifactNumToKeep: -1 + wrappers: + - timestamps + +- yamltemplates: + name: yamltemplates + + queue_choice: &queue_choice + name: queue + choices: + - incoming + - private + - discard + description: 'Incoming queue to use: incoming uploads to reprepro, private stages the upload in a directory, discard throws the upload away.' + + ircbot_only_configs: &only_configs + strategy: any-failure + message-type: summary + matrix-notifier: only-configurations + + add_version_tag: &add_version_tag | + import java.util.regex.Matcher; + for (a in manager.build.getArtifacts()) {{ + m = (a =~ /.*_(.*)\.dsc/); + if (m.matches()) {{ + manager.addShortText(m[0][1]); + break; + }} + }} + + dput_job_template: &dput_job_template + name: 'foobar-dput' + #description: 'Push packages to the repository.<br />Do not edit this job through the web interface, it is generated via jenkins-job-builder!' + logrotate: + numToKeep: 50 + parameters: + - choice: *queue_choice + builders: + - shell: 'rm -rf *' + - copyartifact: &dput_copyartifact + project: 'foobar-binaries-sid-amd64' + filter: '*.gz,*.bz2,*.xz,*.deb,*.dsc,*.changes' + flatten: true + which-build: upstream-build + fallback-to-last-successful: true + - shell: 'dput-pgdg $queue' + publishers: + - ircbot: + matrix-notifier: all + message-type: summary-params + - groovy-postbuild: 'manager.addShortText("${manager.build.environment.queue}")' + + build_job_template: &build_job_template + name: 'foobar-build' + project-type: flow + parameters: + - choice: *queue_choice + - string: &git_branch + name: branch + default: 'debian' + description: Git branch, tag, or commit to build + - string: &revision_string + name: revision + default: '' + description: Revision number to use on generated source package (number in .pgdg+N suffix) + dsl: | + build("foobar-source-sid", branch: params["branch"], revision: params["revision"]) + parallel ( + { build("foobar-source-jessie", branch: params["branch"], revision: params["revision"]) }, + ) + build("foobar-binaries-sid-amd64") + parallel ( + { build("foobar-binaries-sid-i386") }, + { build("foobar-binaries-jessie-amd64") }, + { build("foobar-binaries-jessie-i386") }, + ) + build("foobar-dput", queue: params["queue"]) + +# source + +- job-template: + name: '{name}-source-{dist}' + #description: 'Build Debian source package of {name} from "apt-get source".<br />Do not edit this job through the web interface, it is generated via jenkins-job-builder!' + parameters: + - string: + <<: *git_branch + default: '{git-branch}' + - string: *revision_string + scm: + - git: + url: '{git-url}' + branches: + - '$branch' + basedir: source + wipe-workspace: false + recursive-submodules: true + builders: + - shell: 'distribution={dist} generate-pgdg-source' + publishers: + - archive: + artifacts: 'result/*' + latest-only: true + - ircbot: + matrix-notifier: only-parent + - groovy-postbuild: *add_version_tag + +# generated by genyaml: +#- job-group: +# name: source-sid +# dist: sid +# jobs: +# - '{name}-source-{dist}' + +# binaries + +- job-template: &binaries_template + name: '{name}-binaries-{dist}-{arch}' + #description: 'Build Debian binary package of {name}.<br />Do not edit this job through the web interface, it is generated via jenkins-job-builder!' + builders: + - shell: 'rm -rf *' + - copyartifact: ©source + project: '{name}-source-{dist}' + filter: 'result/*' + flatten: true + which-build: upstream-build + fallback-to-last-successful: true + - shell: 'distribution={dist} architecture={arch} sbuild-package' + publishers: + - archive: &binaries_archive + artifacts: '*.gz,*.bz2,*.xz,*.deb,*.dsc,*.changes' + latest-only: true + - junit: + results: autopkgtest.xml + - ircbot: *only_configs + - groovy-postbuild: *add_version_tag + - workspace-cleanup + +# generated by genyaml: +#- job-group: +# name: binaries-sid-amd64 +# dist: sid +# arch: amd64 +# jobs: +# - '{name}-binaries-{dist}-{arch}' + +# actual job definitions + +#- project: +# name: mimeo +# git-url: https://anonscm.debian.org/git/pkg-postgresql/mimeo.git +# git-branch: debian +# jobs: +# - source-sid +# - source-jessie +# - binaries-sid-amd64 +# - binaries-sid-i386 +# - binaries-jessie-amd64 +# - binaries-jessie-i386 +# +#- job: +# <<: *dput_job_template +# name: mimeo-dput +# builders: +# - shell: 'rm -rf *' +# - copyartifact: +# <<: *dput_copyartifact +# project: 'mimeo-binaries-sid-amd64' +# - copyartifact: +# <<: *dput_copyartifact +# project: 'mimeo-binaries-sid-i386' +# - copyartifact: +# <<: *dput_copyartifact +# project: 'mimeo-binaries-jessie-amd64' +# - copyartifact: +# <<: *dput_copyartifact +# project: 'mimeo-binaries-jessie-i386' +# - shell: 'dput-pgdg $queue' +# +#- job: +# name: 'mimeo-build' +# project-type: flow +# parameters: +# - choice: *queue_choice +# - string: +# <<: *git_branch +# default: 'debian' +# - string: *revision_string +# dsl: | +# build("mimeo-source-sid", branch: params["branch"], revision: params["revision"]) +# parallel ( +# { build("mimeo-source-jessie", branch: params["branch"], revision: params["revision"]) }, +# ) +# build("mimeo-binaries-sid-amd64") +# parallel ( +# { build("mimeo-binaries-sid-i386") }, +# { build("mimeo-binaries-jessie-amd64") }, +# { build("mimeo-binaries-jessie-i386") }, +# ) +# build("mimeo-dput", queue: params["queue"]) + +# vim:et:sw=4: |