fail-early guards
This commit is contained in:
parent
a672887719
commit
da1b6aaed8
@ -26,6 +26,27 @@ pipeline {
|
|||||||
error("servicename cannot have spaces. try dashes.")
|
error("servicename cannot have spaces. try dashes.")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
sh """#!/bin/bash
|
||||||
|
function testcmd(){
|
||||||
|
if ! command -v \$1 2>&1 >/dev/null
|
||||||
|
then
|
||||||
|
echo "this agent doesn't have \$1"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
testcmd mktemp
|
||||||
|
testcmd curl
|
||||||
|
testcmd git
|
||||||
|
testcmd sed
|
||||||
|
testcmd ssh
|
||||||
|
testcmd ssh-keyscan
|
||||||
|
testcmd ssh-keygen
|
||||||
|
testcmd scp
|
||||||
|
testcmd jq
|
||||||
|
"""
|
||||||
|
|
||||||
switch (targetHost) {
|
switch (targetHost) {
|
||||||
case "alloces.lan":
|
case "alloces.lan":
|
||||||
SUDOER_USR = SUDOER_ALLOCES_USR
|
SUDOER_USR = SUDOER_ALLOCES_USR
|
||||||
|
Loading…
Reference in New Issue
Block a user