SAP-archive / cloud-s4-sdk-pipeline

The Cloud SDK pipeline uses the Cloud SDK continuous delivery server for building, checking, and deploying extension applications. Projects based on the SAP Cloud SDK archetype will automatically use this pipeline.
Apache License 2.0
65 stars 25 forks source link

tmsUpload returns exit code 127 #30

Closed T1mey closed 4 years ago

T1mey commented 4 years ago

Issue Description (Mandatory)

We have configured a tmsUpload by specifying it in config.yml

    tmsUpload:
      nodeName: 'OurNode'
      credentialsId: 'CREDENTIALS'
      customDescription: 'our deployment'

The pipeline is failing in the stage: productionDeployment / tmsUpload

Log Output (Mandatory)

10:07:37  Trying to pass milestone 80
[Pipeline] echo
10:07:37  --- Begin library step of: tmsUpload ---
[Pipeline] echo
10:07:38  [tmsUpload] Sending telemetry data is disabled.
[Pipeline] fileExists
[Pipeline] withCredentials
10:07:38  Masking supported pattern matches of $xxx
[Pipeline] {
[Pipeline] echo
10:07:38  [TransportManagementService] OAuth Token retrieval started.
[Pipeline] httpRequest
[Pipeline] echo
10:07:44  [TransportManagementService] OAuth Token retrieved successfully.
[Pipeline] echo
10:07:44  [TransportManagementService] File upload started.
[Pipeline] sh
10:07:47  /home/jenkins/agent/workspace/SDK_Deployment_Example_MB_master@tmp/durable-7f6b6a89/script.sh: line 2: curl: not found
[Pipeline] }
[Pipeline] // withCredentials
[Pipeline] libraryResource
[Pipeline] echo
10:07:48  ----------------------------------------------------------
10:07:48  --- An error occurred in the library step: tmsUpload
10:07:48  ----------------------------------------------------------
10:07:48  
10:07:48  The following parameters were available to the step:
10:07:48  ***
10:07:48  *** to show step parameters, set verbose:true in general pipeline configuration
10:07:48  *** WARNING: this may reveal sensitive information. ***
10:07:48  ***
10:07:48  
10:07:48  The error was:
10:07:48  ***
10:07:48  hudson.AbortException: script returned exit code 127
10:07:48  ***
10:07:48  
10:07:48  Further information:
10:07:48  * Documentation of library step tmsUpload: https://sap.github.io/jenkins-library/steps/tmsUpload/
10:07:48  * Source code of library step tmsUpload: https://github.com/SAP/jenkins-library/blob/master/vars/tmsUpload.groovy
10:07:48  * Library documentation: https://sap.github.io/jenkins-library/
10:07:48  * Library repository: https://github.com/SAP/jenkins-library/
10:07:48  
10:07:48  ----------------------------------------------------------
10:07:48  --- End library step of: tmsUpload ---
daniel-kurzynski commented 4 years ago

In which environment is your pipeline running? Kubernetes? Which image are you using for the Kubernetes agent?
https://github.wdf.sap.corp/MA/cloud-s4-sdk-pipeline/blob/master/configuration.md#jenkinskubernetes

T1mey commented 4 years ago

Hello,

yes we're running on kubernetes and using the image ppiper/jenkins-agent-k8s:v6

daniel-kurzynski commented 4 years ago

Thanks for the input. Unfortunately, curl is missing in the respective Docker image. I've created a pull request to fix that: https://github.com/SAP/devops-docker-cx-server/pull/61/files

T1mey commented 4 years ago

@daniel-kurzynski in General purpose pipeline this step ist working... Should be OK If only s4 pipeline invokes the curl.

daniel-kurzynski commented 4 years ago

I think they both invoke curl, but in the cloud sdk pipeline we spawn a new pod per stage. It might be that the tms step is executed on master in case of the tms upload. For the cloud sdk you could try with ppiper/jenkins-agent-k8s:latest and give feedback.