DevOps and System Administration Discussions
Dive into SAP DevOps and system administration. Join discussions to collaborate on optimizing workflows, share knowledge, and leverage resources effectively.
cancel
Showing results for 
Search instead for 
Did you mean: 

No values found for 'TransportRequest' in range 'origin/master..HEAD'

AnilDandi
Active Participant
0 Kudos

Hi All,

I am exploring DevOps tools (Gitea and Jenkins) with piper library to create a demo CI/CD pipeline.

One of the stages being picking up the Transport Request from git commit messages and acting on the TR (example release or import in to the next system).

However when the Jenkins pipelilne runs, it errors out at the step transportRequestReqIDFromGit - unable to find any values for TransportRequest, in spite of having commits with this key.

The relevant pipeline stage:

stage('decideTransportRelease'){
      transportRequestReqIDFromGit( script: this, verbose: true )
      script{
        // Define Variable
         def USER_INPUT = input(
           message: 'User input to decide on releasing Transport Request',
           parameters: [
             [$class: 'ChoiceParameterDefinition',
               choices: ['Release Transport','Do Not Release Transport'].join('\n'),
               name: 'input',
               description: 'Menu - select box option']
           ])
        // Print the choice made
        echo "The answer is: ${USER_INPUT}"
        // Take action based on the choice
        if( "${USER_INPUT}" == "Release Transport"){
          // Release TR
        } else {
          // Do nothing
        }
      }
    }
<br>

I have tried various commit messages

<space before commit message also being tried>
TransportRequest: ABC12345678
TransportRequest:ABC12345678
TransportRequest : ABC12345678

The step fails with the error:

+ ./piper transportRequestReqIDFromGit
time="2022-03-01T14:21:15Z" level=info msg="{  [] 0x975880}" library=SAP/jenkins-library
info  transportRequestReqIDFromGit - Using stageName 'decideTransportRelease' from env variable
info  transportRequestReqIDFromGit - Project config: '.pipeline/config.yml'
debug transportRequestReqIDFromGit - Skipping fetching secrets from Vault since it is not configured
info  transportRequestReqIDFromGit - Opening git repo at '/var/lib/jenkins/workspace/myFirstJenkinsPipeline'
info  transportRequestReqIDFromGit - Opening git repo at '/var/lib/jenkins/workspace/myFirstJenkinsPipeline'
info  transportRequestReqIDFromGit - fatal error: errorDetails{"category":"undefined","correlationId":"http://vhcalnplci.internal.cloudapp.net:8080/job/myFirstJenkinsPipeline/78/","error":"No values found for 'TransportRequest' in range 'origin/master..HEAD'","library":"SAP/jenkins-library","message":"step execution failed","result":"failure","stepName":"transportRequestReqIDFromGit","time":"2022-03-01T14:21:15.85880584Z"}
fatal transportRequestReqIDFromGit - step execution failed - No values found for 'TransportRequest' in range 'origin/master..HEAD'
info  transportRequestReqIDFromGit - Step telemetry data:{"StepStartTime":"2022-03-01 14:21:15.847932044 +0000 UTC","PipelineURLHash":"8d4375ee39472c99989ad9408b0f655fd55c6e86","BuildURLHash":"24ca4cfcbfb68a386fca13e90adc7454ab71178d","StageName":"decideTransportRelease","StepName":"transportRequestReqIDFromGit","ErrorCode":"1","StepDuration":"11","ErrorCategory":"undefined","CorrelationID":"http://vhcalnplci.internal.cloudapp.net:8080/job/myFirstJenkinsPipeline/78/","PiperCommitHash":"e38d5ef69f060e8cbb011767f053bc3478f0e9b2","ErrorDetail":{"category":"undefined","correlationId":"http://vhcalnplci.internal.cloudapp.net:8080/job/myFirstJenkinsPipeline/78/","error":"No values found for 'TransportRequest' in range 'origin/master..HEAD'","library":"SAP/jenkins-library","message":"step execution failed","result":"failure","stepName":"transportRequestReqIDFromGit","time":"2022-03-01T14:21:15.85880584Z"}}

I have also tried changing the transportRequestLabel. It seems to ignore the new label. Still failing with No values found for 'TransportRequest'.

Any pointers would help.

regards

Anil

3 REPLIES 3

Karin
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Anil,

do you try to set up this scenario described on piper? https://www.project-piper.io/scenarios/upload-to-transportrequest/Readme/ or would you like to set up a pipline for ABAP coding (using gCTS)?

Thanks and kind regards

karin

AnilDandi
Active Participant
0 Kudos

Hi Karin,

I am exploring a variation of upload-to-transportrequest scenario. We don't have gCTS yet.

The idea is to do something like this:

Get TR details from commit message, and assign it to a variable:

def TRANSPORTREQUST = transportRequestReqIDFromGit( script: this )

and later release the TR and import in to QA.

We are working on On-premise ABAP system.

regards

Anil

Karin
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Anil,
I am still trying to understand what you would like to do...sorry... Where should the transport request come from? The transport request is an ABAP entity that either needs to exist on the ABAP side or needs to be created. There is a step for creating requests in SAP Solution Manager: https://www.project-piper.io/steps/transportRequestCreate/

But steps in piper are in most cases dedicated to a certain scenario and require a special sequence. The steps that you named are e.g. used in the scenario that i linked above

Kind regards
karin