]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
Add ceph-windows-pull-requests job 1927/head
authorIonut Balutoiu <ibalutoiu@cloudbasesolutions.com>
Fri, 5 Nov 2021 10:07:37 +0000 (12:07 +0200)
committerIonut Balutoiu <ibalutoiu@cloudbasesolutions.com>
Fri, 5 Nov 2021 13:23:13 +0000 (15:23 +0200)
Used to run Windows tests against Ceph pull requests.

ceph-windows-pull-requests/build/build [new file with mode: 0644]
ceph-windows-pull-requests/config/definitions/ceph-windows-pull-requests.yml [new file with mode: 0644]

diff --git a/ceph-windows-pull-requests/build/build b/ceph-windows-pull-requests/build/build
new file mode 100644 (file)
index 0000000..39f52ba
--- /dev/null
@@ -0,0 +1,16 @@
+#!/usr/bin/env bash
+set -o errexit
+set -o pipefail
+
+docs_pr_only
+if [ "$DOCS_ONLY" = true ]; then
+    echo "Only the doc/ dir changed. No need to run Ceph Windows tests."
+    exit 0
+fi
+
+#
+# Build Ceph Windows
+#
+cd $WORKSPACE/ceph
+git submodule update --init --recursive
+ZIP_DEST=$WORKSPACE/ceph.zip timeout 3h ./win32_build.sh
diff --git a/ceph-windows-pull-requests/config/definitions/ceph-windows-pull-requests.yml b/ceph-windows-pull-requests/config/definitions/ceph-windows-pull-requests.yml
new file mode 100644 (file)
index 0000000..1d1656a
--- /dev/null
@@ -0,0 +1,90 @@
+- job:
+    name: ceph-windows-pull-requests
+    project-type: freestyle
+    defaults: global
+    concurrent: true
+    node: amd64 && focal && libvirt
+    display-name: 'ceph-windows: Pull Requests'
+    quiet-period: 5
+    block-downstream: false
+    block-upstream: false
+    retry-count: 3
+    properties:
+      - build-discarder:
+          days-to-keep: 15
+          num-to-keep: 300
+          artifact-days-to-keep: -1
+          artifact-num-to-keep: -1
+      - github:
+          url: https://github.com/ceph/ceph/
+      - rebuild:
+          auto-rebuild: true
+      - inject:
+          properties-content: |
+            TERM=xterm
+
+    parameters:
+      - string:
+          name: ghprbPullId
+          description: "The GitHub pull request id, like '72' in 'ceph/pull/72'"
+
+    triggers:
+      - github-pull-request:
+          cancel-builds-on-update: true
+          allow-whitelist-orgs-as-admins: true
+          org-list:
+            - ceph
+          trigger-phrase: 'jenkins test windows'
+          skip-build-phrase: '^jenkins do not test.*'
+          only-trigger-phrase: false
+          github-hooks: true
+          permit-all: true
+          auto-close-on-fail: false
+          status-context: "ceph windows tests"
+          started-status: "running ceph windows tests"
+          success-status: "ceph windows tests succeeded"
+          failure-status: "ceph windows tests failed"
+
+    scm:
+      - git:
+          url: https://github.com/ceph/ceph.git
+          branches:
+            - origin/pr/${ghprbPullId}/merge
+          refspec: +refs/pull/${ghprbPullId}/*:refs/remotes/origin/pr/${ghprbPullId}/*
+          browser: auto
+          timeout: 20
+          do-not-fetch-tags: true
+          shallow-clone: true
+          honor-refspec: true
+          wipe-workspace: true
+          basedir: ceph
+
+    builders:
+    - shell:
+        !include-raw:
+          - ../../../scripts/build_utils.sh
+          - ../../build/build
+          - ../../../scripts/ceph-windows/run_tests
+
+    publishers:
+      - postbuildscript:
+          builders:
+            - role: SLAVE
+              build-on:
+                - ABORTED
+              build-steps:
+                - shell:
+                    !include-raw:
+                      - ../../../scripts/build_utils.sh
+                      - ../../../scripts/ceph-windows/cleanup_tests
+
+    wrappers:
+      - ansicolor
+      - credentials-binding:
+          - file:
+              credential-id: ceph_win_ci_private_key
+              variable: CEPH_WIN_CI_KEY
+          - username-password-separated:
+              credential-id: github-readonly-token
+              username: GITHUB_USER
+              password: GITHUB_PASS