From 4f93414b699971c841b3f9646e543a2161b67a0d Mon Sep 17 00:00:00 2001 From: dany Date: Thu, 29 Sep 2022 19:13:47 +0200 Subject: [PATCH] use remote agent instead of ssh connection --- Jenkinsfile | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index efbfbaa..888b05e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,14 +1,5 @@ -def remote = [:] -remote.name = 'workstation' -remote.host = 'workstation' -remote.user = 'dany' -remote.identityFile = '/var/jenkins_home/.ssh/id_rsa' -remote.allowAnyHosts = true -remote.agent = false -remote.logLevel = 'INFO' - pipeline{ - agent { node{ label'master' }} + agent { node{ label'workstation' }} options { // Limit build history with buildDiscarder option: // daysToKeepStr: history is only kept up to this many days. @@ -29,10 +20,9 @@ pipeline{ { stage('Build') { steps { - sshCommand remote: remote, command: ''' + sh''' set -e set -x - export WORKSPACE=$(realpath "./jenkins/workspace/ci-image") cd $WORKSPACE # docker rmi -f $(docker images -f "dangling=true" -q) docker run --rm --privileged docker/binfmt:a7996909642ee92942dcd6cff44b9b95f08dad64