Fix Jenkins task validation syntax
Dandaedre/agent-tasks/pipeline/head This commit looks good Details

This commit is contained in:
Dandaedre 2026-10-03 00:47:57 +02:00
parent 00a1a22876
commit a54513642c
Signed by: Dandaedre
GPG Key ID: 440C6592E8A26D99
1 changed files with 6 additions and 7 deletions

13
Jenkinsfile vendored
View File

@ -36,9 +36,9 @@ pipeline {
exit 1
}
invalid_type=$(find "${ASSET_SOURCE_DIR}" ! -type d ! -type f -print -quit)
test -z "${invalid_type}" || {
echo "ERROR: publishable assets must be regular files: ${invalid_type}" >&2
unexpected_type=$(find "${ASSET_SOURCE_DIR}" -mindepth 1 ! -type f -print -quit)
test -z "${unexpected_type}" || {
echo "ERROR: publishable assets must be regular files: ${unexpected_type}" >&2
exit 1
}
@ -52,10 +52,9 @@ pipeline {
task_count=$((task_count + 1))
done
unexpected=$(find "${ASSET_SOURCE_DIR}" -mindepth 1 \
\( ! -type f -o ! -name '*.task.md' \) -print -quit)
test -z "${unexpected}" || {
echo "ERROR: unexpected file in ${ASSET_SOURCE_DIR}: ${unexpected}" >&2
unexpected_name=$(find "${ASSET_SOURCE_DIR}" -mindepth 1 -type f ! -name '*.task.md' -print -quit)
test -z "${unexpected_name}" || {
echo "ERROR: unexpected file in ${ASSET_SOURCE_DIR}: ${unexpected_name}" >&2
exit 1
}