From 8f6ae85d9ea59449d669e3df5013fbfa809f460a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Mattm=C3=BCller?= Date: Tue, 1 Aug 2023 10:58:03 +0200 Subject: [PATCH] jobs/buildAll,buildTarget: suppressed shell commands on job console MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit to have a better overview some shell commands of basic parts are suppressed with set +x Signed-off-by: Marc Mattmüller --- jobs/Jenkinsfile_BuildAll | 6 +++--- jobs/Jenkinsfile_BuildTarget | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) 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"