Skip to content

Commit c7048b8

Browse files
ceph-pull-requests-ppc64:Added support for ppc64 runners
Signed-off-by: Anshuman <anshuman@ibm.com>
1 parent a45668a commit c7048b8

3 files changed

Lines changed: 210 additions & 0 deletions

File tree

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
#!/bin/bash -ex
2+
3+
docs_pr_only
4+
container_pr_only
5+
gha_pr_only
6+
qa_pr_only
7+
if [[ "$DOCS_ONLY" = true || "$CONTAINER_ONLY" = true || "$GHA_ONLY" == true || "$QA_ONLY" == true ]]; then
8+
echo "Only the doc/, container/, qa/ or .github/ dir changed. No need to run make check."
9+
exit 0
10+
fi
11+
12+
NPROC=$(nproc)
13+
NPMCACHE=${HOME}/npmcache
14+
cat >.env <<EOF
15+
NPROC=${NPROC}
16+
MAX_PARALLEL_JOBS=${NPROC}
17+
WITH_CRIMSON=true
18+
WITH_RBD_RWL=true
19+
WITHOUT_DASHBOARD=true
20+
WITHOUT_BREAKPAD=true
21+
DISABLE_WERROR=true
22+
DISABLE_FIO=true
23+
JENKINS_HOME=${JENKINS_HOME}
24+
REWRITE_COVERAGE_ROOTDIR=${PWD}/src/pybind/mgr/dashboard/frontend
25+
EOF
26+
# TODO: enable (read-only?) sccache support
27+
#npm_cache_info() {
28+
# echo '===== npm cache info ======='
29+
# du -sh "${NPMCACHE}" || echo "${NPMCACHE} not present"
30+
# echo '============================'
31+
#}
32+
bwc() {
33+
# specify timeout in hours for $1
34+
local timeout=$(($1 * 60 * 60))
35+
shift
36+
timeout "${timeout}" ./src/script/build-with-container.py \
37+
-d "${DISTRO_BASE:-jammy}" \
38+
--env-file="${PWD}/.env" \
39+
--current-branch="${GIT_BRANCH:-main}" \
40+
-t+ppc64 \
41+
--npm-cache-path="${NPMCACHE}" \
42+
"${@}"
43+
}
44+
45+
podman login -u ${DOCKER_HUB_USERNAME} -p ${DOCKER_HUB_PASSWORD} docker.io
46+
47+
#npm_cache_info
48+
bwc 1 -e configure
49+
# try to pre-load the npm cache so that it doesn't fail
50+
# during the normal build step
51+
#for i in {0..5}; do
52+
# bwc 1 -e custom -- \
53+
# cmake --build build -t mgr-dashboard-frontend-deps && break
54+
# echo "Warning: Attempt $((i + 1)) to cache npm packages failed."
55+
# sleep $((10 + 30 * i))
56+
#done
57+
#npm_cache_info
58+
bwc 4 -e tests
59+
#npm_cache_info
60+
sleep 5
61+
ps -ef | grep -v jnlp | grep ceph || true
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/bin/bash -ex
2+
3+
# kill all descendant processes of ctest
4+
5+
# ceph-pull-requests-ppc64/build/build is killed by jenkins when the ceph-pull-requests-ppc64 job is aborted or
6+
# canceled, see https://www.jenkins.io/doc/book/using/aborting-a-build/ . but build/build does not
7+
# wait until all its children processes quit. after ctest is killed by SIGTERM, there is chance
8+
# that some tests are still running as ctest does not get a chance to kill them before it terminates.
9+
# if these tests had timed out, ctest would kill them using SIGKILL. so we need to kill them
10+
# manually after the job is aborted.
11+
12+
# if ctest is still running, get its pid, otherwise we are done.
13+
ctest_pid=$(pgrep ctest) || exit 0
14+
# the parent process of ctest should have been terminated, but this might not be true when
15+
# it comes to some of its descendant processes, for instance, unittest-seastar-messenger
16+
ctest_pgid=$(ps --no-headers --format 'pgid:1' --pid $ctest_pid)
17+
kill -SIGTERM -- -"$ctest_pgid"
18+
# try harder
19+
for seconds in 0 1 1 2 3; do
20+
sleep $seconds
21+
if pgrep --pgroup $ctest_pgid >/dev/null; then
22+
# kill only if we've waited for a while
23+
if test $seconds != 0; then
24+
pgrep --pgroup $ctest_pgid
25+
echo 'try harder'
26+
kill -SIGKILL -- -"$ctest_pgid"
27+
fi
28+
else
29+
echo 'killed'
30+
break
31+
fi
32+
done
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
- job:
2+
block-downstream: false
3+
block-upstream: false
4+
builders:
5+
- shell:
6+
!include-raw-verbatim:
7+
- ../../../scripts/build_utils.sh
8+
- ../../../scripts/setup_container_runtime.sh
9+
- ../../build/build
10+
concurrent: true
11+
disabled: false
12+
name: ceph-pull-requests-ppc64
13+
node: 'ppc64 && (installed-os-noble || centos9)'
14+
parameters:
15+
- string:
16+
name: ghprbPullId
17+
description: "the GitHub pull id, like '72' in 'ceph/pull/72'"
18+
default: origin/main
19+
project-type: freestyle
20+
properties:
21+
- build-discarder:
22+
artifact-days-to-keep: -1
23+
artifact-num-to-keep: -1
24+
days-to-keep: 15
25+
num-to-keep: 300
26+
- raw:
27+
xml: |
28+
<com.sonyericsson.jenkins.plugins.bfa.model.ScannerJobProperty plugin="build-failure-analyzer@1.18.1">
29+
<doNotScan>false</doNotScan>
30+
</com.sonyericsson.jenkins.plugins.bfa.model.ScannerJobProperty>
31+
- github:
32+
url: https://github.com/ceph/ceph/
33+
- raw:
34+
xml: |
35+
<com.sonyericsson.rebuild.RebuildSettings plugin="rebuild@1.25">
36+
<autoRebuild>false</autoRebuild>
37+
<rebuildDisabled>false</rebuildDisabled>
38+
</com.sonyericsson.rebuild.RebuildSettings>
39+
quiet-period: '5'
40+
retry-count: '3'
41+
scm:
42+
- git:
43+
url: https://github.com/ceph/ceph.git
44+
name: origin
45+
branches:
46+
- origin/pr/${{ghprbPullId}}/merge
47+
refspec: +refs/pull/${{ghprbPullId}}/*:refs/remotes/origin/pr/${{ghprbPullId}}/*
48+
skip-tag: true
49+
shallow-clone: true
50+
honor-refspec: true
51+
timeout: 20
52+
wipe-workspace: true
53+
triggers:
54+
- github-pull-request:
55+
cancel-builds-on-update: true
56+
allow-whitelist-orgs-as-admins: true
57+
org-list:
58+
- ceph
59+
trigger-phrase: 'jenkins test make check ppc64'
60+
skip-build-phrase: '^jenkins do not test.*'
61+
only-trigger-phrase: false
62+
github-hooks: true
63+
permit-all: true
64+
auto-close-on-fail: false
65+
status-context: "make check (ppc64)"
66+
started-status: "running make check"
67+
success-status: "make check succeeded"
68+
failure-status: "make check failed"
69+
white-list-target-branches:
70+
- main
71+
publishers:
72+
- cobertura:
73+
report-file: "src/pybind/mgr/dashboard/frontend/coverage/cobertura-coverage.xml"
74+
only-stable: "true"
75+
health-auto-update: "false"
76+
stability-auto-update: "false"
77+
zoom-coverage-chart: "true"
78+
source-encoding: "Big5"
79+
targets:
80+
- files:
81+
healthy: 10
82+
unhealthy: 20
83+
failing: 30
84+
- method:
85+
healthy: 10
86+
unhealthy: 20
87+
failing: 30
88+
- postbuildscript:
89+
builders:
90+
- role: SLAVE
91+
build-on:
92+
- ABORTED
93+
build-steps:
94+
- shell:
95+
!include-raw-verbatim:
96+
- ../../build/kill-tests
97+
- xunit:
98+
thresholds:
99+
- failed:
100+
unstable: 0
101+
unstablenew: 0
102+
failure: 0
103+
failurenew: 0
104+
types:
105+
- ctest:
106+
pattern: "build/Testing/**/Test.xml"
107+
skip-if-no-test-files: true
108+
wrappers:
109+
- credentials-binding:
110+
- username-password-separated:
111+
credential-id: github-readonly-token
112+
username: GITHUB_USER
113+
password: GITHUB_PASS
114+
- username-password-separated:
115+
credential-id: dgalloway-docker-hub
116+
username: DOCKER_HUB_USERNAME
117+
password: DOCKER_HUB_PASSWORD

0 commit comments

Comments
 (0)