Fix Jenkins task validation syntax
Dandaedre/agent-tasks/pipeline/head This commit looks good
Details
Dandaedre/agent-tasks/pipeline/head This commit looks good
Details
This commit is contained in:
parent
00a1a22876
commit
a54513642c
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue