From bcc5389d63f08a95cfae91d193cdeb3f08ed18a2 Mon Sep 17 00:00:00 2001 From: adam Date: Tue, 25 Mar 2025 17:30:18 -0400 Subject: [PATCH] test commands. also install dotnet-ef although surely with dotnet tool list we could check, but it's cutely formatted --- Jenkinsfile | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 8a47e57..59c2e91 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -7,6 +7,35 @@ pipeline { targetHost="alloces.lan" } stages { + + stage("environment setup") { //my environment, here on the jenkins agent + steps { + script { + + 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 dotnet + + dotnet tool install --global dotnet-ef + """ + } + } + } stage('clean old'){ steps{ sh 'rm -rf bin obj'