s4sdk - MTA build throwing error in Jenkins - s4sdk

I am developing MTA project and have to integrate CI/CD for Cloud Foundry using s4sdk-pipeline however Jenkins fails to build the node project. Showing below error in Jenkins log
SAP Multitarget Application Archive Builder 1.1.8
Module "ProjectName": invoking npm
ERROR: An unexpected error has occurred; please tell us about it in our Community page:
---------------------------------------------------------
--- ERROR OCCURRED IN LIBRARY STEP: mtaBuild
----------------------------------------------------------
FOLLOWING PARAMETERS WERE AVAILABLE TO THIS STEP:
***
[script:Script1#ee5197a]
***
ERROR WAS:
***
hudson.AbortException: script returned exit code 1
***
FURTHER INFORMATION:
* Documentation of library step mtaBuild: https://sap.github.io/jenkins-library/steps/mtaBuild/
* Source code of library step mtaBuild: https://github.com/SAP/jenkins-library/blob/master/vars/mtaBuild.groovy
* Library documentation: https://sap.github.io/jenkins-library/
* Library repository: https://github.com/SAP/jenkins-library
----------------------------------------------------------
--- END LIBRARY STEP: mtaBuild ---
script returned exit code 1
Any help appreciated.
Thanks in advance.
screen capture: Jenkins Log Error list
as mentioned please see below Console Output log
Skipping 6 KB.. Full Log
PYMCpDfOQzp/bUe1sxGHFaM0ojAAAApx+LCAAAAAAAAP9tjTEOwjAUQ3+LOrAycohUCDbE1DXKwglCE0La6P/yk9JOnIircQdaKjHhwbItWe/1hiIynIidaCy2HmPtRRd6NyUxELfXQINo6CJqwkjBCmUHRcZWS1WULCzKclhJWFusA0WPLsFGNvqhy6DRlefE03aUkHtzhydkciInzelbRobtrTeR8Mf5C4CxS5Dv9rMd5mfxAbNWnxXCAAAA[0m[Pipeline] {
[Pipeline] stage
[Pipeline] { (Init)
[Pipeline] milestone
07:40:42 Trying to pass milestone 10
[Pipeline] library
07:40:42 Loading library s4sdk-pipeline-library#master
07:40:42 Attempting to resolve master from remote references...
07:40:42 > git --version # timeout=10
07:40:42 > git ls-remote -h https://github.com/SAP/cloud-s4-sdk-pipeline-lib.git # timeout=10
07:40:42 Found match: refs/heads/master revision a8a2909dadaff3c66b5008374e957a87509818ec
07:40:42 No credentials specified
07:40:42 > git rev-parse --is-inside-work-tree # timeout=10
07:40:42 Fetching changes from the remote Git repository
07:40:42 > git config remote.origin.url https://github.com/SAP/cloud-s4-sdk-pipeline-lib.git # timeout=10
07:40:42 Fetching without tags
07:40:42 Fetching upstream changes from https://github.com/SAP/cloud-s4-sdk-pipeline-lib.git
07:40:42 > git --version # timeout=10
07:40:42 > git fetch --no-tags --progress https://github.com/SAP/cloud-s4-sdk-pipeline-lib.git +refs/heads/*:refs/remotes/origin/*
07:40:42 Checking out Revision a8a2909dadaff3c66b5008374e957a87509818ec (master)
07:40:42 > git config core.sparsecheckout # timeout=10
07:40:42 > git checkout -f a8a2909dadaff3c66b5008374e957a87509818ec
07:40:42 Commit message: "Prepare for new piper library name"
07:40:42 > git rev-list --no-walk a8a2909dadaff3c66b5008374e957a87509818ec # timeout=10
[Pipeline] library
07:40:45 Loading library piper-library-os#def66f4ffa9e614eeb3747599a0be7ea9a108453
07:40:45 Attempting to resolve def66f4ffa9e614eeb3747599a0be7ea9a108453 from remote references...
07:40:45 > git --version # timeout=10
07:40:45 > git ls-remote -h https://github.com/SAP/jenkins-library.git # timeout=10
07:40:46 Could not find def66f4ffa9e614eeb3747599a0be7ea9a108453 in remote references. Pulling heads to local for deep search...
07:40:46 > git rev-parse --is-inside-work-tree # timeout=10
07:40:46 Setting origin to https://github.com/SAP/jenkins-library.git
07:40:46 > git config remote.origin.url https://github.com/SAP/jenkins-library.git # timeout=10
07:40:46 Fetching origin...
07:40:46 Fetching upstream changes from origin
07:40:46 > git --version # timeout=10
07:40:46 > git config --get remote.origin.url # timeout=10
07:40:46 > git fetch --tags --progress origin +refs/heads/*:refs/remotes/origin/*
07:40:46 > git rev-parse def66f4ffa9e614eeb3747599a0be7ea9a108453^{commit} # timeout=10
07:40:46 > git branch -a -v --no-abbrev --contains def66f4ffa9e614eeb3747599a0be7ea9a108453 # timeout=10
07:40:46 Selected match: cst revision def66f4ffa9e614eeb3747599a0be7ea9a108453
07:40:46 No credentials specified
07:40:46 > git rev-parse --is-inside-work-tree # timeout=10
07:40:46 Fetching changes from the remote Git repository
07:40:46 > git config remote.origin.url https://github.com/SAP/jenkins-library.git # timeout=10
07:40:46 Fetching without tags
07:40:46 Fetching upstream changes from https://github.com/SAP/jenkins-library.git
07:40:46 > git --version # timeout=10
07:40:46 > git fetch --no-tags --progress https://github.com/SAP/jenkins-library.git +refs/heads/*:refs/remotes/origin/*
07:40:46 Checking out Revision def66f4ffa9e614eeb3747599a0be7ea9a108453 (cst)
07:40:46 > git config core.sparsecheckout # timeout=10
07:40:47 > git checkout -f def66f4ffa9e614eeb3747599a0be7ea9a108453
07:40:47 Commit message: "extend Analytics (#439)"
07:40:47 > git rev-list --no-walk def66f4ffa9e614eeb3747599a0be7ea9a108453 # timeout=10
[Pipeline] echo
07:40:47 Sending telemetry data is disabled.
[Pipeline] echo
07:40:47 --- BEGIN LIBRARY STEP: initS4sdkPipeline.groovy ---
[Pipeline] node
07:40:47 Running on Jenkins in /var/jenkins_home/workspace/projectui_PR-1#3
[Pipeline] {
[Pipeline] echo
07:40:47 --- BEGIN LIBRARY STEP: unstashFiles.groovy ---
[Pipeline] deleteDir
[Pipeline] echo
07:40:47 Unstashing []
[Pipeline] echo
07:40:47 --- END LIBRARY STEP: unstashFiles.groovy ---
[Pipeline] fileExists
[Pipeline] fileExists
[Pipeline] checkout
07:40:48 using credential JDNew
07:40:48 Cloning the remote Git repository
07:40:48 Cloning with configured refspecs honoured and without tags
07:40:48 Cloning repository https://github.com/.../l....git
07:40:48 > git init /var/jenkins_home/workspace/projectui_PR-1#3 # timeout=10
07:40:48 Fetching upstream changes from https://github.com/.../l....git
07:40:48 > git --version # timeout=10
07:40:48 using GIT_ASKPASS to set credentials
07:40:48 > git fetch --no-tags --progress https://github.com/.../l....git +refs/pull/1/head:refs/remotes/origin/PR-1 +refs/heads/master:refs/remotes/origin/master
07:40:49 > git config remote.origin.url https://github.com/.../l....git # timeout=10
07:40:49 > git config --add remote.origin.fetch +refs/pull/1/head:refs/remotes/origin/PR-1 # timeout=10
07:40:49 > git config --add remote.origin.fetch +refs/heads/master:refs/remotes/origin/master # timeout=10
07:40:49 > git config remote.origin.url https://github.com/.../l....git # timeout=10
07:40:49 Fetching without tags
07:40:49 Fetching upstream changes from https://github.com/.../l....git
07:40:49 using GIT_ASKPASS to set credentials
07:40:49 > git fetch --no-tags --progress https://github.com/.../l....git +refs/pull/1/head:refs/remotes/origin/PR-1 +refs/heads/master:refs/remotes/origin/master
07:40:49 Merging remotes/origin/master commit 28f2a2d55051a061c9aaec44b2b697822b8378de into PR head commit 567cacb5d338b222a318166d6570948ffe0162af
07:40:49 > git config core.sparsecheckout # timeout=10
07:40:49 > git checkout -f 567cacb5d338b222a318166d6570948ffe0162af
07:40:49 > git merge 28f2a2d55051a061c9aaec44b2b697822b8378de # timeout=10
07:40:49 > git rev-parse HEAD^{commit} # timeout=10
07:40:49 Merge succeeded, producing 567cacb5d338b222a318166d6570948ffe0162af
07:40:49 Checking out Revision 567cacb5d338b222a318166d6570948ffe0162af (PR-1)
07:40:49 > git config core.sparsecheckout # timeout=10
07:40:49 > git checkout -f 567cacb5d338b222a318166d6570948ffe0162af
07:40:49 Commit message: "changed"
[Pipeline] echo
07:40:49 --- BEGIN LIBRARY STEP: initS4SdkPipelineLibrary.groovy ---
[Pipeline] library
07:40:49 Only using first definition of library piper-library-os
[Pipeline] echo
07:40:49 Sending telemetry data is disabled.
[Pipeline] echo
07:40:50 --- BEGIN LIBRARY STEP: setupCommonPipelineEnvironment ---
[Pipeline] echo
07:40:50 --- BEGIN LIBRARY STEP: prepareDefaultValues ---
[Pipeline] echo
07:40:50 Loading configuration file 'default_pipeline_environment.yml'
[Pipeline] libraryResource
[Pipeline] readYaml
[Pipeline] echo
07:40:50 Loading configuration file 'default_s4_pipeline_environment.yml'
[Pipeline] libraryResource
[Pipeline] readYaml
[Pipeline] echo
07:40:50 --- END LIBRARY STEP: prepareDefaultValues ---
[Pipeline] fileExists
[Pipeline] readYaml
[Pipeline] echo
07:40:50 --- BEGIN LIBRARY STEP: prepareDefaultValues ---
[Pipeline] echo
07:40:50 --- END LIBRARY STEP: prepareDefaultValues ---
[Pipeline] echo
07:40:50 --- END LIBRARY STEP: setupCommonPipelineEnvironment ---
[Pipeline] echo
07:40:51 --- BEGIN LIBRARY STEP: checkDiskSpace.groovy ---
[Pipeline] sh
07:40:51 + df -m /var/jenkins_home
07:40:51 + awk FNR > 1 {print $4}
[Pipeline] sh
07:40:52 + du -md 0 /var/jenkins_home/jobs/projectui/branches/PR-1/builds/18
07:40:52 + awk {print $1}
[Pipeline] echo
07:40:52 --- END LIBRARY STEP: checkDiskSpace.groovy ---
[Pipeline] echo
07:40:52 Download cache for maven and npm activated
[Pipeline] libraryResource
[Pipeline] writeFile
[Pipeline] echo
07:40:52 --- END LIBRARY STEP: initS4SdkPipelineLibrary.groovy ---
[Pipeline] libraryResource
[Pipeline] readYaml
[Pipeline] echo
07:40:52 Stash config: [initS4sdkPipeline:[unstash:[], stashes:[[name:SOURCE, includes:**/*.*, excludes:'pipelines/**, **/.git/**], [name:PIPELINE, includes:'pipelines/**, excludes:'pipelines/.git/**], [name:REPORTS, includes:s4hana_pipeline/reports/**], [name:M2, includes:s4hana_pipeline/maven_local_repo/**], [name:TARGET, includes:**/target/**], [name:NODE_MODULES, includes:node_modules/**]]], build:[unstash:[SOURCE, M2], stashes:[[name:M2, includes:s4hana_pipeline/maven_local_repo/**], [name:TARGET, includes:*.mtar, **/target/**, target/**], [name:NODE_MODULES, includes:**/node_modules/**, node_modules/**], [name:PACKAGE_LOCK, includes:**/package-lock.json, **/npm-shrinkwrap.json]]], unitTests:[unstash:[SOURCE, M2, TARGET], stashes:[[name:REPORTS, merge:true, includes:s4hana_pipeline/reports/**]]], integrationTests:[unstash:[SOURCE, M2, TARGET], stashes:[[name:REPORTS, merge:true, includes:s4hana_pipeline/reports/**]]], staticCodeChecks:[unstash:[SOURCE, TARGET, REPORTS, M2], stashes:[[name:REPORTS, merge:true, includes:s4hana_pipeline/reports/**]]], lint:[unstash:[SOURCE, NODE_MODULES, PACKAGE_LOCK]], checkmarxScan:[unstash:[SOURCE, TARGET, REPORTS, M2], stashes:[]], whitesourceScan:[unstash:[SOURCE, M2, NODE_MODULES], stashes:[]], sourceClearScan:[unstash:[SOURCE, M2, NODE_MODULES], stashes:[]], additionalTools:[unstash:[SOURCE, M2, NODE_MODULES], stashes:[]], fortifyScan:[unstash:[SOURCE, M2], stashes:[]], npmAudit:[unstash:[SOURCE, PACKAGE_LOCK], stashes:[]], frontendUnitTests:[unstash:[SOURCE, NODE_MODULES], stashes:[]], endToEndTests:[unstash:[SOURCE, TARGET, NODE_MODULES], stashes:[]], performanceTests:[unstash:[SOURCE, TARGET], stashes:[[name:REPORTS, merge:true, includes:s4hana_pipeline/reports/**]]], s4SdkQualityChecks:[unstash:[SOURCE, M2, TARGET, REPORTS], stashes:[[name:REPORTS, includes:s4hana_pipeline/reports/**]]], artifactDeployment:[unstash:[SOURCE, TARGET, NODE_MODULES], stashes:[]], productionDeployment:[unstash:[SOURCE, TARGET, NODE_MODULES], stashes:[]]]
[Pipeline] fileExists
[Pipeline] fileExists
[Pipeline] fileExists
[Pipeline] echo
07:40:53 --- BEGIN LIBRARY STEP: errorWhenCurrentBuildResultIsWorseOrEqualTo.groovy ---
[Pipeline] echo
07:40:53 --- END LIBRARY STEP: errorWhenCurrentBuildResultIsWorseOrEqualTo.groovy ---
[Pipeline] fileExists
[Pipeline] readYaml
[Pipeline] echo
07:40:54 nodejs has modules: projectui
[Pipeline] sh
07:40:54 + git rev-parse HEAD
[Pipeline] fileExists
[Pipeline] fileExists
[Pipeline] fileExists
[Pipeline] fileExists
[Pipeline] fileExists
[Pipeline] echo
07:41:02 --- BEGIN LIBRARY STEP: stashFiles.groovy ---
[Pipeline] stash
07:41:03 Stashed 105 file(s)
[Pipeline] stash
07:41:03 Stashed 0 file(s)
[Pipeline] stash
07:41:03 Stashed 0 file(s)
[Pipeline] stash
07:41:03 Stashed 0 file(s)
[Pipeline] stash
07:41:03 Stashed 1 file(s)
[Pipeline] stash
07:41:03 Stashed 0 file(s)
[Pipeline] deleteDir
[Pipeline] echo
07:41:03 --- END LIBRARY STEP: stashFiles.groovy ---
[Pipeline] echo
07:41:03 Current build result in stage initS4sdkPipeline is SUCCESS.
[Pipeline] echo
07:41:03 Sending telemetry data: [event_type:pipeline_stage, custom3:stage_name, e_3:initS4sdkPipeline, custom4:stage_result, e_4:SUCCESS, custom5:start_time, e_5:1549957247815, custom6:duration, e_6:15979, custom7:project_extensions, e_7:false, custom8:global_extensions, e_8:false, action_name:SAP S/4HANA Cloud SDK, idsite:70aeb424-0d69-0265-c486-b5471b014ba8, idsitesub:pipeline, url:https://github.com/SAP/cloud-s4-sdk-pipeline/tree/master/doc/operations/analytics.md, custom2:project_id_hash, e_2:75174568523be69fb6d03f76d4bd9263f70a5e265d4374c4eca2bc6994a06ea0, custom1:build_url_hash, e_a:317b74bc0b282598de984862589c9b33f4bf1864, custom10:build_number, e_10:19]
[Pipeline] sh
[Pipeline] deleteDir
[Pipeline] }
[Pipeline] // node
[Pipeline] echo
07:41:04 --- END LIBRARY STEP: initS4sdkPipeline.groovy ---
[Pipeline] echo
07:41:05 --- BEGIN LIBRARY STEP: abortOldBuilds.groovy ---
[Pipeline] echo
07:41:05 --- END LIBRARY STEP: abortOldBuilds.groovy ---
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Build)
[Pipeline] milestone
07:41:05 Trying to pass milestone 20
[Pipeline] echo
07:41:05 --- BEGIN LIBRARY STEP: build.groovy ---
[Pipeline] node
07:41:05 Running on Jenkins in /var/jenkins_home/workspace/projectui_PR-1#3
[Pipeline] {
[Pipeline] echo
07:41:05 --- BEGIN LIBRARY STEP: unstashFiles.groovy ---
[Pipeline] deleteDir
[Pipeline] echo
07:41:05 Unstashing [SOURCE, M2]
[Pipeline] unstash
[Pipeline] unstash
[Pipeline] echo
07:41:06 --- END LIBRARY STEP: unstashFiles.groovy ---
[Pipeline] fileExists
[Pipeline] fileExists
[Pipeline] withEnv
[Pipeline] {
[Pipeline] echo
07:41:07 --- BEGIN LIBRARY STEP: mtaBuild ---
[Pipeline] echo
07:41:07 --- BEGIN LIBRARY STEP: prepareDefaultValues ---
[Pipeline] echo
07:41:07 --- END LIBRARY STEP: prepareDefaultValues ---
[Pipeline] sh
[Pipeline] echo
07:41:08 --- BEGIN LIBRARY STEP: dockerExecute ---
[Pipeline] echo
07:41:08 --- BEGIN LIBRARY STEP: prepareDefaultValues ---
[Pipeline] echo
07:41:08 --- END LIBRARY STEP: prepareDefaultValues ---
[Pipeline] sh
07:41:09 + docker ps -q
[Pipeline] echo
07:41:09 [INFO][dockerExecute] Running on local environment.
[Pipeline] sh
[Pipeline] sh
[Pipeline] echo
07:41:09 Java home '/docker-java-home' retrieved from environment.
[Pipeline] echo
07:41:09 Verifying Java location '/docker-java-home'.
[Pipeline] sh
07:41:10 + set +x
07:41:10 /docker-java-home exists.
[Pipeline] sh
07:41:10 + set +x
07:41:10 /docker-java-home is a directory.
[Pipeline] sh
07:41:10 + set +x
07:41:10 /docker-java-home is not empty.
[Pipeline] echo
07:41:10 Verification success. Java location '/docker-java-home' exists.
[Pipeline] sh
[Pipeline] sh
[Pipeline] sh
[Pipeline] sh
[Pipeline] echo
07:41:11 Verifying Java '/docker-java-home/bin/java'.
[Pipeline] sh
07:41:12 + set +x
07:41:12 /docker-java-home/bin/java exists.
[Pipeline] sh
07:41:12 + set +x
07:41:12 /docker-java-home/bin/java is a file.
[Pipeline] echo
07:41:12 Verification success. Java '/docker-java-home/bin/java' exists.
[Pipeline] sh
[Pipeline] sh
[Pipeline] sh
[Pipeline] echo
07:41:13 Verifying Java version 1.8.0 or compatible version.
[Pipeline] echo
07:41:13 Verification success. Java version 1.8.0 is installed.
[Pipeline] sh
[Pipeline] echo
07:41:13 Verifying SAP Multitarget Application Archive Builder 'mta.jar'.
[Pipeline] sh
07:41:14 + set +x
07:41:14 mta.jar exists.
[Pipeline] sh
07:41:14 + set +x
07:41:14 mta.jar is a file.
[Pipeline] echo
07:41:14 Verification success. SAP Multitarget Application Archive Builder 'mta.jar' exists.
[Pipeline] sh
[Pipeline] sh
[Pipeline] sh
[Pipeline] echo
07:41:15 Verifying SAP Multitarget Application Archive Builder version 1.0.6 or compatible version.
[Pipeline] sh
[Pipeline] echo
07:41:16 Verification success. SAP Multitarget Application Archive Builder version 1.1.8 is installed.
[Pipeline] fileExists
[Pipeline] echo
07:41:16 [INFO] 'mta.yaml' file found in project sources.
[Pipeline] readYaml
[Pipeline] sh
07:41:16 + date +%Y%m%d%H%M%S
07:41:16 + sed -ie s/${timestamp}/20190212074116/g mta.yaml
[Pipeline] sh
[Pipeline] echo
07:41:16 SAP Multitarget Application Archive Builder file 'mta.jar' retrieved from configuration.
[Pipeline] echo
07:41:17 Using SAP Multitarget Application Archive Builder 'mta.jar'.
[Pipeline] sh
[Pipeline] sh
[Pipeline] echo
07:41:17 [INFO] Executing mta build call: '/docker-java-home/bin/java -jar mta.jar --mtar projectui.mtar --build-target=CF build'.
[Pipeline] sh
07:41:18 SAP Multitarget Application Archive Builder 1.1.8
07:41:18 Module "projectui": invoking npm
07:41:18 ERROR: An unexpected error has occurred; please tell us about it in our Community page: " https://answers.sap.com/tags/73554900100700001351"
[Pipeline] libraryResource
[Pipeline] echo
07:41:18 ----------------------------------------------------------
07:41:18 --- ERROR OCCURRED IN LIBRARY STEP: dockerExecute
07:41:18 ----------------------------------------------------------
07:41:18
07:41:18 FOLLOWING PARAMETERS WERE AVAILABLE TO THIS STEP:
07:41:18 ***
07:41:18 [script:Script1#ee5197a, dockerImage:null, dockerOptions:null]
07:41:18 ***
07:41:18
07:41:18 ERROR WAS:
07:41:18 ***
07:41:18 hudson.AbortException: script returned exit code 1
07:41:18 ***
07:41:18
07:41:18 FURTHER INFORMATION:
07:41:18 * Documentation of library step dockerExecute: https://sap.github.io/jenkins-library/steps/dockerExecute/
07:41:18 * Source code of library step dockerExecute: https://github.com/SAP/jenkins-library/blob/master/vars/dockerExecute.groovy
07:41:18 * Library documentation: https://sap.github.io/jenkins-library/
07:41:18 * Library repository: https://github.com/SAP/jenkins-library
07:41:18
07:41:18 ----------------------------------------------------------
07:41:18 --- END LIBRARY STEP: dockerExecute ---
[Pipeline] libraryResource
[Pipeline] echo
07:41:18 ----------------------------------------------------------
07:41:18 --- ERROR OCCURRED IN LIBRARY STEP: mtaBuild
07:41:18 ----------------------------------------------------------
07:41:18
07:41:18 FOLLOWING PARAMETERS WERE AVAILABLE TO THIS STEP:
07:41:18 ***
07:41:18 [script:Script1#ee5197a]
07:41:18 ***
07:41:18
07:41:18 ERROR WAS:
07:41:18 ***
07:41:18 hudson.AbortException: script returned exit code 1
07:41:18 ***
07:41:18
07:41:18 FURTHER INFORMATION:
07:41:18 * Documentation of library step mtaBuild: https://sap.github.io/jenkins-library/steps/mtaBuild/
07:41:18 * Source code of library step mtaBuild: https://github.com/SAP/jenkins-library/blob/master/vars/mtaBuild.groovy
07:41:18 * Library documentation: https://sap.github.io/jenkins-library/
07:41:18 * Library repository: https://github.com/SAP/jenkins-library
07:41:18
07:41:18 ----------------------------------------------------------
07:41:18 --- END LIBRARY STEP: mtaBuild ---
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] echo
07:41:18 Sending telemetry data: [event_type:pipeline_stage, custom3:stage_name, e_3:build, custom4:stage_result, e_4:SUCCESS, custom5:start_time, e_5:1549957265764, custom6:duration, e_6:13028, custom7:project_extensions, e_7:false, custom8:global_extensions, e_8:false, action_name:SAP S/4HANA Cloud SDK, idsite:70aeb424-0d69-0265-c486-b5471b014ba8, idsitesub:pipeline, url:https://github.com/SAP/cloud-s4-sdk-pipeline/tree/master/doc/operations/analytics.md, custom2:project_id_hash, e_2:75174568523be69fb6d03f76d4bd9263f70a5e265d4374c4eca2bc6994a06ea0, custom1:build_url_hash, e_a:317b74bc0b282598de984862589c9b33f4bf1864, custom10:build_number, e_10:19]
[Pipeline] sh
[Pipeline] deleteDir
[Pipeline] }
[Pipeline] // node
[Pipeline] echo
07:41:19 ----------------------------------------------------------
07:41:19 --- ERROR OCCURRED IN LIBRARY STEP: build
07:41:19 ----------------------------------------------------------
07:41:19
07:41:19 FOLLOWING PARAMETERS WERE AVAILABLE TO THIS STEP:
07:41:19 ***
07:41:19 [:]
07:41:19 ***
07:41:19
07:41:19 ERROR WAS:
07:41:19 ***
07:41:19 hudson.AbortException: script returned exit code 1
07:41:19 ***
07:41:19
07:41:19
[Pipeline] echo
07:41:19 --- END LIBRARY STEP: build.groovy ---
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Artifact Deployment)
Stage "Artifact Deployment" skipped due to earlier failure(s)
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Production Deployment)
Stage "Production Deployment" skipped due to earlier failure(s)
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Declarative: Post Actions)
[Pipeline] script
[Pipeline] {
[Pipeline] echo
07:41:20 Sending telemetry data: [custom11:os_name, e_11:Linux, custom12:os_version, e_12:4.15.0-1032-aws, custom13:swa_schema_version, e_13:1, locale:C.UTF-8, custom7:jenkins_version, e_7:2.150.1, custom9:is_productive, e_9:false, event_type:pipeline, custom3:stage_name, e_3:postAction, custom4:pipeline_result, e_4:FAILURE, custom5:start_time, e_5:1549957239642, custom6:pipeline_duration, e_6:40344, action_name:SAP S/4HANA Cloud SDK, idsite:70aeb424-0d69-0265-c486-b5471b014ba8, idsitesub:pipeline, url:https://github.com/SAP/cloud-s4-sdk-pipeline/tree/master/doc/operations/analytics.md, custom2:project_id_hash, e_2:75174568523be69fb6d03f76d4bd9263f70a5e265d4374c4eca2bc6994a06ea0, custom1:build_url_hash, e_a:317b74bc0b282598de984862589c9b33f4bf1864, custom10:build_number, e_10:19]
[Pipeline] sh
[Pipeline] }
[Pipeline] // script
[Pipeline] script
[Pipeline] {
[Pipeline] echo
07:41:20 Hello World
[Pipeline] echo
07:41:22 Hello World--1
[Pipeline] }
[Pipeline] // script
[Pipeline] deleteDir
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // timestamps
[Pipeline] }
[Pipeline] // timeout
[Pipeline] }
[Pipeline] // node
[Pipeline] }
[Pipeline] // load
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
GitHub has been notified of this commit’s build result
ERROR: script returned exit code 1
Finished: FAILURE
screenshot of local build local build screenshot

Your log output says:
[INFO][dockerExecute] Running on local environment.. That means that either Docker is not installed or no Docker image is defined. Thus, it tries to build the mta in the local environment which potentially does not have all requirements installed. (E.g. no nodejs installation.)
Please add the following configuration to your pipeline configuration (pipeline_config.yml) in order to configure the Docker image which should be used:
steps:
mtaBuild:
mtaJarLocation: '/opt/sap/mta/lib/mta.jar'
dockerImage: 'ppiper/mta-archive-builder'
and try again.

Related

Getting ERROR: script returned exit code 1 while testing

Getting below build output- I need to know the reason behind FAILURE (all required packages were pre-installed)
Running in Durability level: MAX_SURVIVABILITY
[Pipeline] Start of Pipeline
[Pipeline] node
Running on Jenkins in /opt/bitnami/jenkins/jenkins_home/workspace/testing-xx
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Build)
[Pipeline] script
[Pipeline] {
[Pipeline] sh
+ npm -s run test
Test Suites: 4 passed, 4 total
Tests: 20 passed, 20 total
Snapshots: 1 obsolete, 3 passed, 3 total
Time: 6.88s
Ran all test suites.
[Pipeline] }
[Pipeline] // script
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: script returned exit code 1
Finished: FAILURE
Please help me understand the reason and resolution (I have removed few outputs to shorten)

Jenkins Git pligin slow checkout

I doing clone outside of Jenkins into some shared folder using LSF workload management platform by IBM
Or let’s say I doing clone manually from command line
Then I want to pull newer changes (commits) and checkout branch using GIT plugin
It works, but takes same time as full clone. Means takes 5-7 minutes instead of 20 seconds
Can you explain this behavior, please ? How I can handle it ?
My local repository created from command line is completely functional. And I want to make checkout in 20 sec
Thank you
Code:
stage('checkout') {
steps {
script {
node('linux4') {
ws("/comm/data_10/some_folder") {
// Git plugin will not pull submodules with --force option,
// if there are local changes it fails the CI (JENKINS-27625, JENKINS-55875).
sh "git submodule foreach --recursive git reset --hard || true"
checkout([
$class: 'GitSCM',
branches: [[name: "develop"]],
doGenerateSubmoduleConfigurations: false,
extensions: [[$class: 'CheckoutOption', timeout: 25 ],
[$class: 'SubmoduleOption',
disableSubmodules: false,
parentCredentials: false,
recursiveSubmodules: true,
reference: '',
trackingSubmodules: true]],
userRemoteConfigs: [[credentialsId: env.CRED, url: env.REPO]]
])
}}}}}
Log (I added debug variable as hudson.plugins.git.GitSCM.verbose=true). Checkout took 6 min:
10:40:29 Using checkout strategy: Default
10:40:29 Last Built Revision: Revision 7588941db5123456975ff1234567ef8733f20b0b (origin/develop)
10:40:29 The recommended git tool is: NONE
10:40:29 using credential f76306ee-b3d1-4169-9582-123467
10:40:29 Fetching changes from the remote Git repository
10:40:28 > git rev-parse --is-inside-work-tree # timeout=10
10:40:28 > git config remote.origin.url <removed_remote_URL> # timeout=10
10:40:28 Fetching upstream changes from <removed_remote_URL>
10:40:28 > git --version # timeout=10
10:40:28 > git --version # 'git version 2.28.1'
10:40:28 using GIT_ASKPASS to set credentials SIRC DevOps
10:40:28 > git fetch --tags --progress -- git#gitlab-srv:CDE-Users/HW_ALG.git +refs/heads/*:refs/remotes/origin/* # timeout=10
10:40:31 getCandidateRevisions(false,develop,,,hudson.plugins.git.util.BuildData#18b394fa[scmName=<null>,remoteUrls=[<removed_remote_URL>],buildsByBranchName={origin/develop=Build #31 of Revision 7588941db57d8597975ff98bb3d7ef8733f20b0b (origin/develop)},lastBuild=Build #31 of Revision 7588941db57d8597975ff98bb3d7ef8733f20b0b (origin/develop)]) considering branches to build
10:40:31 Qualifying develop as a branch in repository origin -> origin/develop
10:40:31 rev-parse origin/develop -> AnyObjectId[7588941db5123456975ff1234567ef8733f20b0b]
10:40:31 Found a new commit AnyObjectId[7588941db5123456975ff1234567ef8733f20b0b] to be built on origin/develop
10:40:31 Checking out Revision 7588941db5123456975ff1234567ef8733f20b0b (origin/develop)
10:40:30 > git rev-parse origin/develop^{commit} # timeout=10
10:40:30 > git config core.sparsecheckout # timeout=10
10:40:30 > git checkout -f 7588941db5123456975ff1234567ef8733f20b0b # timeout=25
10:46:37 Commit message: "Merge branch '__branch_name_removed__' into 'develop'"
10:46:36 > git rev-list --no-walk 7588941db5123456975ff1234567ef8733f20b0b # timeout=10
Environment: OS Linux. Git is running as Docker container
Tested on versions:
Jenkins 2.164.1 git plugin 3.9.3 and
Jenkins 2.263.1 git plugin 4.5.1

stageInitS4sdkPipeline running on slave node not working anymore

[My Requirements] I have setup pipeline with master node and multiple slave nodes. Since my master node does not have web access to github.com, so I need to transfer all pipeline workload to slave nodes.
[Previous configuration, failed now]
1. Configuration in Jenkinsfile
pipeline {
agent { node { label 'slave1' } }
Modification of cloud-s4-sdk-pipeline-lib/vars/stageInitS4sdkPipeline.groovy
node('slave1') {
deleteDir()
[Current Error message] When running initS4sdkPipeline, it changes back to master node
10:24:37 + `date --utc +%Y-%m-%dT%H%M%S%Z`
[Pipeline] `echo`
10:24:37 [artifactSetVersion] Sending telemetry data is disabled.
[Pipeline] `node`
10:24:38 Running on Jenkins in /var/jenkins_home/workspace/PipelineJava_master
[Pipeline] {
[Pipeline] }
[Pipeline] `// node`
[Pipeline] `echo`
10:24:38 --- Begin library step of: mavenExecute ---
[Pipeline] `echo`
10:24:38 Unstash content: piper-bin
[Pipeline] unstash
[Pipeline] `echo`
10:24:38 Unstash failed: piper-bin (No such saved stash ‘piper-bin’)
[Pipeline] httpRequest
10:24:38 HttpMethod: GET
10:24:38 URL: https://github.com/SAP/jenkins-library/releases/download/v1.39.0/piper
10:24:38 Sending request to url: https://github.com/SAP/jenkins-library/releases/download/v1.39.0/piper
10:24:38 Treating UnknownHostException(github.com: Name or service not known) as 404 Not Found
[further questions] I never understand why it is hard coded as node('master') in stageInitS4sdkPipeline. I think it is much better if it is configurable using node label names. Currently, I also do not have clues for how this will support multiple slave nodes distribution. And There is more steps are hard coded in pipeline, for example: 'checkDiskSpace.groovy'
I think this specific issue was resolved in version v36 of the SAP Cloud Sdk Pipeline by not using curl anymore and not forcing to run parts of the init stage on the master.
For more details please also see the release notes of v36
https://github.com/SAP/cloud-s4-sdk-pipeline/releases/tag/v36

Jenkinsfile to run Terraform

following this tutorial
https://medium.com/#devopslearning/100-days-of-devops-day-34-terraform-pipeline-using-jenkins-a3d81975730f
I want to be run a terraform file from Jenkins
I have installed Terraform plugin version 1.0.9
I go create a new pipeline project
on the pipeline tab I choose pipeline script and paste the below script
node {
env.PATH += ":/opt/terraform_0.7.13/"
stage ('Terraform Plan') {
sh 'terraform plan -no-color -out=create.tfplan'
}
// Optional wait for approval
input 'Deploy stack?'
stage ('Terraform Apply') {
sh "terraform --version"
}
This is the console output
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Terraform Plan)
[Pipeline] sh
[aws_terraform] Running shell script
+ terraform plan -no-color -out=create.tfplan
/var/lib/jenkins-slave/workspace/ow/ow_eng/aws_terraform#tmp/durable-53622951/script.sh: line 2: terraform: command not found
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: script returned exit code 127
Finished: FAILURE
The terraform binary is not installed on the jenkins slave that is executing the pipeline. The binary must be installed to have the plugin work
If you would like to use a docker image for running this you can use this snippet:
pipeline {
agent {
docker {
image 'hashicorp/terraform:light'
args '--entrypoint='
}
}
stages {
stage('Terraform Plan') {
steps {
sh 'terraform plan -no-color -out=create.tfplan'
}
}
// Optional wait for approval
input 'Deploy stack?'
stage ('Terraform Apply') {
sh "terraform --version"
}
}
}
Be aware that you will need to install the docker pipeline plugin. The trick is here to redefine the entrypoint because the official terraform image already defines an entrypoint to the terraform executable.

pipline always trigered surprisely

I run 3 pipeline builds which need approval on jenkins where there are only 2 executors. So if the first and the second build are not approved, the third build will wait, meanwhile the strange things will happen that the third build will be triggered once per minute(I set scm poll "* * * * * "and these three builds all triggered by code commit). How can I fix this?
this is my pipeline script
pipeline{
agent any
stages{
stage('Build'){
steps{
echo 'Building123'
}
}
stage('Test'){
steps{
echo 'Testing12'
}
}
stage('Approve'){
steps{
script{
input message: 'Do you want to deploy?'
}
}
}
stage('Deploy-Staging1'){
steps{
echo 'Deploy-Staging1'
echo 'Deploy-Staging2'
}
}
stage('Deploy-Production'){
steps{
echo 'Deploy-Production'
}
}
}
}
build 47, 48 and 49 is triggered by commit, build50 and others are triggered accidentally
jenkins build screen
this is the polling log of build 54
Polling Log
View as plain text
This page captures the polling log that triggered this build.
Started on Feb 27, 2018 1:52:00 AM
Using strategy: Default
[poll] Last Built Revision: Revision f0a868f03cba928812b8505afbfd86034605f96e (origin/master)
> git --version # timeout=10
> git ls-remote -h https://github.com/yuzp1996/test-approve # timeout=10
Found 1 remote heads on https://github.com/yuzp1996/test-approve
[poll] Latest remote head revision on refs/heads/master is: 6a9a5f9ef27350be97978e225bef1dda7272f7ef
Done. Took 5.3 sec
Changes found

Resources