From a16cba09b43ad46a8c10aabf4f24560e0602a370 Mon Sep 17 00:00:00 2001 From: dany Date: Thu, 29 Sep 2022 19:01:43 +0200 Subject: [PATCH] Update 'Jenkinsfile' --- Jenkinsfile | 34 +++------------------------------- 1 file changed, 3 insertions(+), 31 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index bd96d26..4d714b5 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,15 +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. @@ -50,26 +40,8 @@ pipeline{ stage('Remote SSH') { steps { sh''' - export -p | tee env.source -cat <<"EOF" >>env.source - printenv -EOF - ''' - sshCommand remote: remote, command: '''#! /bin/bash - set -e - echo $WORKSPACE - pwd - export WORKSPACE="jenkins/workspace/test" - cd $WORKSPACE - bash test.sh - ''' - sshScript remote: remote, script: "env.source" - sshCommand remote: remote, command: '''#! /bin/bash - for i in {1..5}; do - echo -n "Loop $i "; - date ; - sleep 1; - done + printenv + uname -a ''' } }