[lxc-devel] [lxc-ci/master] jenkins/jobs: Use template for lxc-github-commit-*

monstermunchkin on Github lxc-bot at linuxcontainers.org
Mon Aug 12 14:50:05 UTC 2019


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 356 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20190812/2356b48e/attachment.bin>
-------------- next part --------------
From f578905a8186a459cc433068a2e7341f051064bb Mon Sep 17 00:00:00 2001
From: Thomas Hipp <thomas.hipp at canonical.com>
Date: Mon, 12 Aug 2019 16:48:07 +0200
Subject: [PATCH] jenkins/jobs: Use template for lxc-github-commit-*

Signed-off-by: Thomas Hipp <thomas.hipp at canonical.com>
---
 .../jobs/lxc-github-commit-stable-2.0.yaml    | 92 -------------------
 .../jobs/lxc-github-commit-stable-3.0.yaml    | 92 -------------------
 jenkins/jobs/lxc-github-commit.yaml           | 28 ++++--
 3 files changed, 21 insertions(+), 191 deletions(-)
 delete mode 100644 jenkins/jobs/lxc-github-commit-stable-2.0.yaml
 delete mode 100644 jenkins/jobs/lxc-github-commit-stable-3.0.yaml

diff --git a/jenkins/jobs/lxc-github-commit-stable-2.0.yaml b/jenkins/jobs/lxc-github-commit-stable-2.0.yaml
deleted file mode 100644
index 91ad38c..0000000
--- a/jenkins/jobs/lxc-github-commit-stable-2.0.yaml
+++ /dev/null
@@ -1,92 +0,0 @@
-- job:
-    name: lxc-github-commit-stable-2.0
-    concurrent: false
-    description: Triggered by new Github pull requests.
-    node: master
-    project-type: matrix
-
-    builders:
-    - shell: |-
-        cd /lxc
-        exec sudo /lxc-ci/bin/testbuild-${compiler} https://github.com/lxc/lxc stable-2.0 ${GIT_COMMIT} --use-daily
-
-    - trigger-builds:
-      - project:
-        - lxc-build-android
-        - lxc-build-tarballs
-        predefined-parameters: |-
-          sha1=${GIT_COMMIT}
-          branch=stable-2.0
-
-      - project:
-        - lxc-build-ubuntu-source
-        predefined-parameters: |-
-          sha1=${GIT_COMMIT}
-          pkg_version=2.0.11+stable
-          pkg_branch=ppa-stable-2.0
-          upload_target=lxc-git-stable-2.0
-          branch=stable-2.0
-
-    properties:
-    - build-discarder:
-        days-to-keep: 7
-
-    - github:
-        url: https://github.com/lxc/lxc/
-
-    - raw:
-        !include: ../includes/webhook.yaml.inc
-
-    scm:
-    - git:
-        url: https://github.com/lxc/lxc
-        branches:
-        - stable-2.0
-        refspec: "+refs/pull/*:refs/remotes/origin/pr/* +refs/heads/*:refs/remotes/origin/*"
-
-    triggers:
-    - github
-
-    axes:
-    - axis:
-        name: compiler
-        type: user-defined
-        values:
-        - gcc
-        - clang
-
-    - axis:
-        name: arch
-        type: slave
-        values:
-        - amd64
-        - i386
-
-    - axis:
-        name: restrict
-        type: slave
-        values:
-        - lxc-priv
-
-    publishers:
-    - archive:
-        artifacts: "*.tar.gz"
-        allow-empty: true
-        fingerprint: true
-
-    - aggregate-tests:
-        include-failed-builds: true
-
-    - naginator:
-        rerun-unstable-builds: true
-        rerun-matrix-part:  true
-        progressive-delay-increment: 300
-        progressive-delay-maximum: 10800
-        max-failed-builds: 3
-
-    - workspace-cleanup:
-        fail-build: false
-
-    wrappers:
-    - ansicolor:
-        colormap: css
diff --git a/jenkins/jobs/lxc-github-commit-stable-3.0.yaml b/jenkins/jobs/lxc-github-commit-stable-3.0.yaml
deleted file mode 100644
index 758df25..0000000
--- a/jenkins/jobs/lxc-github-commit-stable-3.0.yaml
+++ /dev/null
@@ -1,92 +0,0 @@
-- job:
-    name: lxc-github-commit-stable-3.0
-    concurrent: false
-    description: Triggered by new Github pull requests.
-    node: master
-    project-type: matrix
-
-    builders:
-    - shell: |-
-        cd /lxc
-        exec sudo /lxc-ci/bin/testbuild-${compiler} https://github.com/lxc/lxc stable-3.0 ${GIT_COMMIT} --use-daily
-
-    - trigger-builds:
-      - project:
-        - lxc-build-android
-        - lxc-build-tarballs
-        predefined-parameters: |-
-          sha1=${GIT_COMMIT}
-          branch=stable-3.0
-
-      - project:
-        - lxc-build-ubuntu-source
-        predefined-parameters: |-
-          sha1=${GIT_COMMIT}
-          pkg_version=3.0.4+stable
-          pkg_branch=ppa-daily
-          upload_target=lxc-git-stable-3.0
-          branch=stable-3.0
-
-    properties:
-    - build-discarder:
-        days-to-keep: 7
-
-    - github:
-        url: https://github.com/lxc/lxc/
-
-    - raw:
-        !include: ../includes/webhook.yaml.inc
-
-    scm:
-    - git:
-        url: https://github.com/lxc/lxc
-        branches:
-        - stable-3.0
-        refspec: "+refs/pull/*:refs/remotes/origin/pr/* +refs/heads/*:refs/remotes/origin/*"
-
-    triggers:
-    - github
-
-    axes:
-    - axis:
-        name: compiler
-        type: user-defined
-        values:
-        - gcc
-        - clang
-
-    - axis:
-        name: arch
-        type: slave
-        values:
-        - amd64
-        - i386
-
-    - axis:
-        name: restrict
-        type: slave
-        values:
-        - lxc-priv
-
-    publishers:
-    - archive:
-        artifacts: "*.tar.gz"
-        allow-empty: true
-        fingerprint: true
-
-    - aggregate-tests:
-        include-failed-builds: true
-
-    - naginator:
-        rerun-unstable-builds: true
-        rerun-matrix-part:  true
-        progressive-delay-increment: 300
-        progressive-delay-maximum: 10800
-        max-failed-builds: 3
-
-    - workspace-cleanup:
-        fail-build: false
-
-    wrappers:
-    - ansicolor:
-        colormap: css
diff --git a/jenkins/jobs/lxc-github-commit.yaml b/jenkins/jobs/lxc-github-commit.yaml
index 27d7448..c2dd80d 100644
--- a/jenkins/jobs/lxc-github-commit.yaml
+++ b/jenkins/jobs/lxc-github-commit.yaml
@@ -1,5 +1,18 @@
-- job:
+- project:
     name: lxc-github-commit
+    jobs:
+    - "lxc-github-commit-${branch}":
+      branch: master
+      pkg_version: 3.2.1+master
+    - "lxc-github-commit-${branch}":
+      branch: stable-2.0
+      pkg_version: 2.0.11+stable
+    - "lxc-github-commit-${branch}":
+      branch: stable-3.0
+      pkg_version: 3.0.4+stable
+
+- job-template:
+    name: "lxc-github-commit-${branch}"
     concurrent: false
     description: Triggered by new Github pull requests.
     node: master
@@ -8,24 +21,25 @@
     builders:
     - shell: |-
         cd /lxc
-        exec sudo /lxc-ci/bin/testbuild-${compiler} https://github.com/lxc/lxc master ${GIT_COMMIT} --use-daily
+        exec sudo /lxc-ci/bin/testbuild-${compiler} https://github.com/lxc/lxc ${branch} ${GIT_COMMIT} --use-daily
 
     - trigger-builds:
       - project:
         - lxc-build-android
+        - lxc-build-coverity
         - lxc-build-tarballs
         predefined-parameters: |-
           sha1=${GIT_COMMIT}
-          branch=master
+          branch=${branch}
 
       - project:
         - lxc-build-ubuntu-source
         predefined-parameters: |-
           sha1=${GIT_COMMIT}
-          pkg_version=3.2.1+master
+          pkg_version=${pkg_version}
           pkg_branch=ppa-daily
-          upload_target=lxc-git-master
-          branch=master
+          upload_target=lxc-git-${branch}
+          branch=${branch}
 
     properties:
     - build-discarder:
@@ -41,7 +55,7 @@
     - git:
         url: https://github.com/lxc/lxc
         branches:
-          - master
+          - ${branch}
         refspec: "+refs/pull/*:refs/remotes/origin/pr/* +refs/heads/*:refs/remotes/origin/*"
 
     triggers:


More information about the lxc-devel mailing list