From f4a9a10452124df1ab876ec805cdd4b86d17e97d Mon Sep 17 00:00:00 2001 From: Ionut Balutoiu Date: Fri, 5 Nov 2021 12:07:37 +0200 Subject: [PATCH] Add ceph-windows-pull-requests job Used to run Windows tests against Ceph pull requests. --- ceph-windows-pull-requests/build/build | 16 ++++ .../ceph-windows-pull-requests.yml | 90 +++++++++++++++++++ 2 files changed, 106 insertions(+) create mode 100644 ceph-windows-pull-requests/build/build create mode 100644 ceph-windows-pull-requests/config/definitions/ceph-windows-pull-requests.yml diff --git a/ceph-windows-pull-requests/build/build b/ceph-windows-pull-requests/build/build new file mode 100644 index 00000000..39f52baa --- /dev/null +++ b/ceph-windows-pull-requests/build/build @@ -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 index 00000000..1d1656a4 --- /dev/null +++ b/ceph-windows-pull-requests/config/definitions/ceph-windows-pull-requests.yml @@ -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 -- 2.47.3