Open citoki opened 5 years ago
I refer to commit 78400cad9bdce2b1b638726eee16ee9e03202c9f in the piper-lib.
Tried to dive into that issue:
Findings up to now:
1.) we see the sh command for mkdir -p logs/neo
. A corresponding folder does not exist in the workspace. Maybe we are in another workdir when creating the folder -> further investigation needed.
2.) we see the pwd
statement. This corresponds to vars/neoDeploy#112
3.) we see the the withEnv
. This corresponds to vars/neoDeploy#112
4.) we see the fileExists
. This corresponds to src/com/sap/piper/StepAssertions#10
.
5.) we see error
. This corresponds to src/com/sap/piper/StepAssertions#11
This triggers an hudson.AbortException
. This exception gets swallowed later in the surrounding exception handler vars/neoDeploy.groovy#142
when another excepetion gets raised by the failing cat
statement inside the sh
.
Next steps:
1.) Try to understand why the source cannot be found. Should be set earlier by mtaBuild
.
2.) Rework the exception handler so that the original exception is not swallowed.
3.) Try to understand why there is no logs
folder after mkdir -p
@citoki : In order to circumvent the issue we should provide the deployable via signature on neoDeploy: neoDeploy ./. source:
By the way: I tried to reproduce the issue here, but on my side the logs folder is present and neo gets called ...
@citoki
Can you please check what happens if you use the version provided in branch pr/doNotSwallowOriginalException
in repo https://github.com/marcusholl/jenkins-library
?
This will not solve the issue, but currently we catch an exception, try to provide the logs, receive another exception while doing this and forget the first one. This should be fixed with the version above.
@marcusholl With the new PR I could see an extended error in Jenkins console.
The error was:
***
hudson.AbortException: File my-very-own-build-artifact.mtar cannot be found.
***
yes, I already saw this. Providing additional commits now with branch troubleshoot/neoDeploy
in fork marcusholl/jenkins-library in order to understand the issue.
It is an issue with stashing.
ls
after unstash reviles there is no mtar file:
[INFO] Unstashed "[workspace-f423697c-87de-4a71-94d8-d12c38aa9b3a]".
[Pipeline] sh
+ pwd
/home/jenkins/workspace/ntain_pipeline_teched2018-sample
+ whoami
root
+ ls -la
total 368
drwxr-xr-x 5 1000 1000 320 Apr 2 10:40 .
drwxr-xr-x 4 1000 1000 100 Apr 2 10:40 ..
-rw-r--r-- 1 1000 1000 325 Apr 2 10:37 .editorconfig
-rw-r--r-- 1 1000 1000 12 Apr 2 10:37 .eslintignore
-rw-r--r-- 1 1000 1000 2888 Apr 2 10:37 .eslintrc
-rw-r--r-- 1 1000 1000 14691 Apr 2 10:37 .eslintrc.ext
-rw-r--r-- 1 1000 1000 114 Apr 2 10:37 .npmrc
drwxr-xr-x 2 1000 1000 60 Apr 2 10:40 .pipeline
drwxr-xr-x 2 1000 1000 60 Apr 2 10:40 .vscode
-rwxr-xr-x 1 1000 1000 317 Apr 2 10:37 Gruntfile.js
-rwxr-xr-x 1 1000 1000 1633 Apr 2 10:37 README.md
-rwxr-xr-x 1 1000 1000 3372 Apr 2 10:37 add-pp-xmake-props.sh
-rw-r--r-- 1 1000 1000 653 Apr 2 10:37 mta.yaml
-rw-r--r-- 1 1000 1000 323500 Apr 2 10:37 package-lock.json
-rwxr-xr-x 1 1000 1000 1487 Apr 2 10:37 package.json
drwxr-xr-x 8 1000 1000 220 Apr 2 10:40 webapp
Fixed with #632 in SAP/jenkins-Library. Please switch back to master branch and come back if it does not work. Otherwise close this issue, please.
With the following
Jenkinsfile
wants to deploy the artifact to NEO, it fails and cannot write any logs.