Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
J
jenkins.debian.net
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Debian QA
jenkins.debian.net
Commits
d282064c
Commit
d282064c
authored
4 years ago
by
Holger Levsen
Browse files
Options
Downloads
Patches
Plain Diff
reproducible system health status: ignore jobs on known offline nodes
Signed-off-by:
Holger Levsen
<
holger@layer-acht.org
>
parent
3488dc3c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bin/reproducible_system_health.sh
+48
-2
48 additions, 2 deletions
bin/reproducible_system_health.sh
with
48 additions
and
2 deletions
bin/reproducible_system_health.sh
+
48
−
2
View file @
d282064c
...
...
@@ -29,10 +29,51 @@ INPUTS=0
SCORE
=
0
FAILED_JOBS
=
$(
mktemp
--tmpdir
=
$TMPDIR
trbo-status-XXXXXXX
)
UNSTABLE_JOBS
=
$(
mktemp
--tmpdir
=
$TMPDIR
trbo-status-XXXXXXX
)
IGNORED_JOBS
=
$(
mktemp
--tmpdir
=
$TMPDIR
trbo-status-XXXXXXX
)
# gather data
echo
"
$(
date
-u
)
- starting up."
cd
/var/lib/jenkins/jobs/
for
JOB
in
reproducible_
*
;
do
#
# check whether job runs on a known offline node
#
REMOTE
=
false
case
$JOB
in
reproducible_node_health_check_amd64_jenkins|reproducible_maintenance_amd64_jenkins
)
# never ignore these
:
;;
reproducible_node_health_check_
*
|
reproducible_setup_pbuilder_
*
)
NODE_ALIAS
=
$(
echo
$JOB
|
cut
-d
'_'
-f6
)
NODE_ARCH
=
$(
echo
$JOB
|
cut
-d
'_'
-f5
)
REMOTE
=
true
;;
reproducible_maintenance_
*
)
NODE_ALIAS
=
$(
echo
$JOB
|
cut
-d
'_'
-f4
)
NODE_ARCH
=
$(
echo
$JOB
|
cut
-d
'_'
-f3
)
REMOTE
=
true
;;
esac
if
$REMOTE
;
then
case
$NODE_ARCH
in
amd64
)
case
"
$NODE_ALIAS
"
in
(
profitbricks
*
)
NODE
=
"profitbricks-build
${
NODE_ALIAS
#profitbricks
}
-amd64.debian.net"
;;
(
osuosl
*
)
NODE
=
"osuosl-build
${
NODE_ALIAS
#osuosl
}
-amd64.debian.net"
;;
esac
;;
i386
)
NODE
=
"profitbricks-build
${
NODE_ALIAS
#profitbricks
}
-i386.debian.net"
;;
arm64
)
NODE
=
"codethink-sled
${
NODE_ALIAS
#codethink
}
-arm64.debian.net"
;;
armhf
)
NODE
=
"
${
NODE_ALIAS
}
-armhf-rb.debian.net"
;;
esac
if
grep
-q
$NODE
$JENKINS_OFFLINE_LIST
>
/dev/null 2>&1
;
then
echo
" <li><a href=
\"
https://jenkins.debian.net/job/
$JOB
/
\"
>
$JOB
</a></li>"
>>
${
IGNORED_JOBS
}
echo
" ignored job:
$JOB
(
$NODE
is offline)"
continue
fi
fi
#
# node is not known offline, let's go
#
let
INPUTS+
=
1
FILE
=
$JOB
/builds/permalinks
LAST
=
$(
grep
lastCompletedBuild
$FILE
|awk
'{print $2}'
)
...
...
@@ -113,10 +154,15 @@ cat > $HEALTH_FILE.html <<- EOF
</ul>
</p>
<p>
Unstable jobs:<
/
ul>
Unstable jobs:<ul>
$(
cat
${
UNSTABLE_JOBS
}
)
</ul>
</p>
<p>
Ignored jobs (because these node are known to be offline):<ul>
$(
cat
${
IGNORED_JOBS
}
)
</ul>
</p>
<p>
<small>last updated:
$(
date
-u
)
.</small>
</p>
...
...
@@ -124,4 +170,4 @@ cat > $HEALTH_FILE.html <<- EOF
EOF
echo
"
$(
date
-u
)
-
$(
basename
$HEALTH_FILE
)
.html updated, visible at
$REPRODUCIBLE_URL
/
$(
basename
$HEALTH_FILE
)
.html."
echo
"
$(
date
-u
)
- the end."
rm
-f
${
FAILED_JOBS
}
${
UNSTABLE_JOBS
}
rm
-f
${
FAILED_JOBS
}
${
UNSTABLE_JOBS
}
${
IGNORED_JOBS
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment