cancel
Showing results for 
Search instead for 
Did you mean: 
A New Home in the New Year for SAP Community!

Developing with SAP Extension Suite - CI/CD Pipeline

svesco
Galactic 1
Galactic 1
0 Kudos

context: Learning Journey Developing with SAP Extension Suite

Enabling SAP Continuous Integration and Delivery

on my risk-management-job, the Release step failed with error:

hudson.AbortException: [cloudFoundryDeploy] Step execution failed (category: undefined). Error: Failed to login to Cloud Foundry: Parameters missing. Please provide the Cloud Foundry Endpoint, Org, Space, Username and Password

my pipeline configuration 

 

###
 # This file configures the project "Piper" pipeline of your project.
 # For a reference of the configuration concept and available options, please have a look into its documentation. 
# 
# The documentation for the most recent pipeline version can always be found at:
# https://sap.github.io/jenkins-library/ 
# 
# This is a YAML-file. YAML is an indentation-sensitive file format. Please make sure to properly indent changes to it. 
### 

### General project setup
---
 general:
    pipeline: "sap-cloud-sdk" 
    buildTool: "mta"
    verbose: true
 stages:
    Build:
       mavenExecuteStaticCodeChecks: false
       npmExecuteLint: false
    Additional Unit Tests:
       npmExecuteScripts: false
       karmaExecuteTests: false
    Release:
       cloudFoundryDeploy: true
       tmsUpload: false
    steps:
      cloudFoundryDeploy:
        cloudFoundry: 
          apiEndpoint: "https://api.cf.us10.hana.ondemand.com"
          org: "a244dab4trial"
          space: "dev"
          credentialsId: "cfdeploy"
          appName: ""
        mtaDeployParameters: "-f --version-rule ALL"
      artifactPrepareVersion:
        versioningType: "cloud_noTag"

 

 
despite having set verbose: true in the general section of the pipeline configuration, still I read in the log

 

[2022-08-03T08:17:04.041Z] The following parameters were available to the step:
[2022-08-03T08:17:04.054Z] ***
[2022-08-03T08:17:04.066Z] *** to show step parameters, set verbose:true in general pipeline configuration
[2022-08-03T08:17:04.773Z] *** WARNING: this may reveal sensitive information. ***
[2022-08-03T08:17:04.785Z] ***

 

what could be the cause of the error?

what can I check?

thank you

Margit_Wagner
Employee

Hi @svesco 
We have received your request and are in the process of evaluating the problem, 
Please allow for a delay in our response
Kind regards
Margit

0

Answers (1)

Answers (1)

Deriv
Employee
Employee

Hi, I had exactly the same issue.

The main problem is copy&paste from the learning content it seems not to transfer all the spaces correctly for the file config.yml.

The configuration steps: needs to be on same level as stages: and general

 

### General project setup
---
 general:
    pipeline: "sap-cloud-sdk" 
    buildTool: "mta"
 stages:
    Build:
       mavenExecuteStaticCodeChecks: false
       npmExecuteLint: false
    Additional Unit Tests:
       npmExecuteScripts: false
       karmaExecuteTests: false
    Release:
       cloudFoundryDeploy: true
       tmsUpload: false
 steps:
    cloudFoundryDeploy:
       cloudFoundry:
        org: '6xxxxtrial'
        space: 'dev'
        credentialsId: 'cfdeploy'        
       mtaDeployParameters: "-f --version-rule ALL"    
    artifactPrepareVersion:
       versioningType: "cloud_noTag"    

 

 

svesco
Galactic 1

Hi Deriv, very thanks !

your suggestion solved the problem.

 


@Deriv wrote:
The main problem is copy&paste from the learning content it seems not to transfer all the spaces correctly for the file config.yml.

 

No, the copy&paste work as expected, is the config text in the tutorial that is wrong, with the bad indentation.

If you expand the panel you can see that in the tutorial the step: line is verticaly aligned with the Release: line and not with the general: line.

Having never worked with yaml files and having seen the configuration of this pipeline for the first time, this problem that for a more experienced person can be trivial can create difficulties. Because if one is following a tutorial to learn something new and this is wrong it is not so immediate to understand it.

In the tutorial I've found a lot of small error and discrepancies which took me a long time to overcome.

I managed to solve some problems by comparing the files present on the branches of the project on github, which have a different content from what is shown in the tutorial.

also in this case on github the file is indented correctly:

https://github.com/SAP-samples/extension-suite-learning-journey/blob/solution/14_configure_stages_of...

but comparing it I did not realize, after this experience I will be able to pay much more attention to the correct indentation of the yaml files.

it would be useful for the system to perform some sanity checks on the configuration files to highlight this kind of problem.

 

 

 

0