diff --git a/jobs/Jenkinsfile_BuildAll b/jobs/Jenkinsfile_BuildAll index b345a59..40c0957 100644 --- a/jobs/Jenkinsfile_BuildAll +++ b/jobs/Jenkinsfile_BuildAll @@ -9,13 +9,13 @@ def common // the files. In the current case we use any agent. node() { def repoPreCloneDir = "repo-preclone" - def nodeHostname = sh(returnStdout: true, script: "hostname | cut -d '_' -f1").trim() + def nodeHostname = sh(returnStdout: true, script: "set +x && hostname | cut -d '_' -f1").trim() def cloneCredentials = ("${nodeHostname}" == "nwl") ? 'admin_credentials' : 'gitCredentials' dir(repoPreCloneDir) { // clone the repository to get the file with the target list sshagent (credentials: [cloneCredentials]) { - sh "git clone --depth 1 --branch main ssh://git@bitbucket.gad.local:7999/nm-nsp/nwl-ci.git ." + sh "set +x && git clone --depth 1 --branch main ssh://git@bitbucket.gad.local:7999/nm-nsp/nwl-ci.git ." } // load common file @@ -121,7 +121,7 @@ def setupEnvironment(commonHelpers) { //----------------------------------------------------------------------------- def getTargetsFromList() { - def theTargets = sh(returnStdout: true, script: "cat ./jobs/nwlTargets | grep -v select").trim().split("\n") + def theTargets = sh(returnStdout: true, script: "set +x && cat ./jobs/nwlTargets | grep -v select").trim().split("\n") return theTargets } //----------------------------------------------------------------------------- diff --git a/jobs/Jenkinsfile_BuildTarget b/jobs/Jenkinsfile_BuildTarget index 877f3f1..f69df11 100644 --- a/jobs/Jenkinsfile_BuildTarget +++ b/jobs/Jenkinsfile_BuildTarget @@ -12,17 +12,17 @@ def targetList // the files. In the current case we use any agent. node() { def repoPreCloneDir = "repo-preclone" - def nodeHostname = sh(returnStdout: true, script: "hostname | cut -d '_' -f1").trim() + def nodeHostname = sh(returnStdout: true, script: "set +x && hostname | cut -d '_' -f1").trim() def cloneCredentials = ("${nodeHostname}" == "nwl") ? 'admin_credentials' : 'gitCredentials' dir(repoPreCloneDir) { // clone the repository to get the file with the target list sshagent (credentials: [cloneCredentials]) { - sh "git clone --depth 1 --branch main ssh://git@bitbucket.gad.local:7999/nm-nsp/nwl-ci.git ." + sh "set +x && git clone --depth 1 --branch main ssh://git@bitbucket.gad.local:7999/nm-nsp/nwl-ci.git ." } // get the list of the targets: - targetList = sh(returnStdout: true, script: "cat ./jobs/nwlTargets").trim() + targetList = sh(returnStdout: true, script: "set +x && cat ./jobs/nwlTargets").trim() // load common file common = load "./jobs/Jenkinsfile_Common"