Skip to Content
0
Mar 21 at 05:55 PM

Pipeline failure in gctsDeploy

187 Views

Hi Experts

I am trying to run pipeline for ABAP Development and Testing Process Using Git-Enabled Change and Transport System following the scenerio https://www.project-piper.io/scenarios/gCTS_Scenario/ on project piper but I am facing issue in gctsDeploy step where the Host is read.

step execution failed - cannot parse HTTP response with value <nil>

Below is the part of Jenkinfile and error

Jenkinsfile

@Library(['piper-lib-os']) _
pipeline {
agent any
options {
disableConcurrentBuilds()
}
environment {
DEMOCREDS='ABAP'
HOST='Host'
CLIENT='100'
REPO='karanchopras-workbench'
REPO_URL="https://github.com/karanchopras/workbench"
}
stages {
stage('gCTS Deploy') {
when {
anyOf {
branch 'gCTS'
}
}
steps {
gctsDeploy(
script:this,
host:HOST,
client:CLIENT,
abapCredentialsId:DEMOCREDS,
repository:REPO,
remoteRepositoryURL:REPO_URL,
verbose:true,
role:'SOURCE',
vSID:'GIT')
}
}
stage('gctsExecuteABAPQualityChecks') {
when {
anyOf {
branch 'gCTS'
}
}
steps {
script {
try {
gctsExecuteABAPQualityChecks(
script:this,
host:HOST,
client:CLIENT,
abapCredentialsId:DEMOCREDS,
repository:REPO,
scope:'localChangedObjects',
commit:"${env.GIT_COMMIT}",
workspace:"${WORKSPACE}")
} catch (Exception ex) {
currentBuild.result = 'FAILURE'
unstable(message:"${STAGE_NAME} is unstable")
}
}
}
}
stage('Results in Checkstyle') {
when {
anyOf {
branch 'gCTS'
}
}
steps{
recordIssues(
enabledForFailure:true, aggregatingResults:true,
tools:[checkStyle (pattern:'ATCResults.xml', reportEncoding:'UTF8'), checkStyle (pattern:'AUnitResults.xml', reportEncoding:'UTF8')]
)
}
}
stage('Rollback') {
when {
expression {
currentBuild.result == 'FAILURE'
}
}
steps {
gctsRollback(
script:this,
host:HOST,
client:CLIENT,
abapCredentialsId:DEMOCREDS,
repository:REPO
)
}
}
}
}

Error

+ ./piper gctsDeploy
info gctsDeploy - Using stageName 'gCTS Deploy' from env variable
info gctsDeploy - Project config: NONE ('.pipeline/config.yml' does not exist)
debug gctsDeploy - Skipping fetching secrets from Vault since it is not configured
debug gctsDeploy - For: STAGE_NAME, found: gCTS Deploy
debug gctsDeploy - Could not read env variable JOB_URL using fallback value n/a
debug gctsDeploy - Could not read env variable BUILD_URL using fallback value n/a
info gctsDeploy - Start of gCTS Deploy Step with Configuration Values: &{**** **** karanchopras-workbench https://saps4s.camelot-idpro.de:44300 100 https://github.com/karanchopras/workbench SOURCE GIT GIT false map[] map[] false}
info gctsDeploy - Starting to retrieve configuration metadata from the system
debug gctsDeploy - Using Basic Authentication ****/****
debug gctsDeploy - no trusted certs found / using default transport / insecure skip set to true / : continuing with existing tls config
debug gctsDeploy - Transport timeout: 3m0s, max request duration: 0s
debug gctsDeploy - --------------------------------
debug gctsDeploy - --> GET request to <host of the ABAP system>:<port>/sap/bc/cts_abapvcs/config?sap-client=100
debug gctsDeploy - headers: map[Authorization:[<set>]]
debug gctsDeploy - cookies:
debug gctsDeploy - --------------------------------
debug gctsDeploy - response <nil>
debug gctsDeploy - --------------------------------
error gctsDeploy - step execution failed at configuration metadata retrieval. Please Check if system is up!. - cannot parse HTTP response with value <nil>
info gctsDeploy - fatal error: errorDetails{"category":"undefined","correlationId":"n/a","error":"cannot parse HTTP response with value \u003cnil\u003e","library":"SAP/jenkins-library","message":"step execution failed","result":"failure","stepName":"gctsDeploy","time":"2023-03-21T12:35:34.223706235Z"}
fatal gctsDeploy - step execution failed - cannot parse HTTP response with value <nil>
debug gctsDeploy - Could not read env variable BUILD_URL using fallback value n/a
info gctsDeploy - Step telemetry data:{"StepStartTime":"2023-03-21 12:35:34.079781037 +0000 UTC","PipelineURLHash":"50f013532a9770a2c2cfdc38b7581dd01df69b70","BuildURLHash":"50f013532a9770a2c2cfdc38b7581dd01df69b70","StageName":"gCTS Deploy","StepName":"gctsDeploy","ErrorCode":"1","StepDuration":"144","ErrorCategory":"undefined","CorrelationID":"n/a","PiperCommitHash":"7c4262b0c61c1d10c5b80c3949c60871c969a3ba","ErrorDetail":{"category":"undefined","correlationId":"n/a","error":"cannot parse HTTP response with value \u003cnil\u003e","library":"SAP/jenkins-library","message":"step execution failed","result":"failure","stepName":"gctsDeploy","time":"2023-03-21T12:35:34.223706235Z"}}
debug gctsDeploy - Sending telemetry data
debug gctsDeploy - no trusted certs found / using default transport / insecure skip set to true / : continuing with existing tls config
debug gctsDeploy - Transport timeout: 3m0s, max request duration: 5s
debug gctsDeploy - --------------------------------
debug gctsDeploy - --> GET request to https://webanalytics.cfapps.eu10.hana.ondemand.com/tracker/log?action_name=Piper+Library+OS&custom10=stageName&custom11=duration&custom12=exitCode&custom13=errorCategory&custom14=orchestrator&custom15=piperCommitHash&custom3=stepName&custom4=pipelineUrlHash&custom5=buildUrlHash&e_10=gCTS+Deploy&e_11=144&e_12=1&e_13=undefined&e_14=Jenkins&e_15=7c4262b0c61c1d10c5b80c3949c60871c969a3ba&e_3=gctsDeploy&e_4=50f013532a9770a2c2cfdc38b7581dd01df69b70&e_5=50f013532a9770a2c2cfdc38b7581dd01df69b70&event_type=library-os-ng&idsite=827e8025-1e21-ae84-c3a3-3f62b70b0130&url=https%3A%2F%2Fgithub.com%2FSAP%2Fjenkins-library.git
debug gctsDeploy - headers: map[]
debug gctsDeploy - cookies:
debug gctsDeploy - --------------------------------
debug gctsDeploy - <-- response 204 https://webanalytics.cfapps.eu10.hana.ondemand.com/tracker/log?action_name=Piper+Library+OS&custom10=stageName&custom11=duration&custom12=exitCode&custom13=errorCategory&custom14=orchestrator&custom15=piperCommitHash&custom3=stepName&custom4=pipelineUrlHash&custom5=buildUrlHash&e_10=gCTS+Deploy&e_11=144&e_12=1&e_13=undefined&e_14=Jenkins&e_15=7c4262b0c61c1d10c5b80c3949c60871c969a3ba&e_3=gctsDeploy&e_4=50f013532a9770a2c2cfdc38b7581dd01df69b70&e_5=50f013532a9770a2c2cfdc38b7581dd01df69b70&event_type=library-os-ng&idsite=827e8025-1e21-ae84-c3a3-3f62b70b0130&url=https%3A%2F%2Fgithub.com%2FSAP%2Fjenkins-library.git (219.38ms)
debug gctsDeploy - --------------------------------
[Pipeline] }
[Pipeline] // withCredentials
[Pipeline] fileExists
[Pipeline] fileExists
[Pipeline] sh
+ ./piper readPipelineEnv
[Pipeline] readJSON
[Pipeline] echo
Transfer Influx data
[Pipeline] findFiles
[Pipeline] stash
Stashed 0 file(s)
[Pipeline] fileExists
[Pipeline] readJSON
[Pipeline] error
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] libraryResource
[Pipeline] echo
----------------------------------------------------------
--- An error occurred in the library step: gctsDeploy
----------------------------------------------------------
The following parameters were available to the step:
***
[script:WorkflowScript@32814406, host:<host of the ABAP system>:<port>, client:100, abapCredentialsId:ABAP, repository:karanchopras-workbench, remoteRepositoryURL:https://github.com/karanchopras/workbench, verbose:true, role:SOURCE, vSID:GIT]
***
The error was:
***
hudson.AbortException: [gctsDeploy] Step execution failed (category: undefined). Error: cannot parse HTTP response with value <nil>
***
Further information:
* Documentation of library step gctsDeploy: https://sap.github.io/jenkins-library/steps/gctsDeploy/
* Source code of library step gctsDeploy: https://github.com/SAP/jenkins-library/blob/master/vars/gctsDeploy.groovy
* Library documentation: https://sap.github.io/jenkins-library/
* Library repository: https://github.com/SAP/jenkins-library/
----------------------------------------------------------
--- End library step of: gctsDeploy ---
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (gctsExecuteABAPQualityChecks) (hide)
Stage "gctsExecuteABAPQualityChecks" skipped due to earlier failure(s)
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Results in Checkstyle)
Stage "Results in Checkstyle" skipped due to earlier failure(s)
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Rollback)
Stage "Rollback" skipped due to earlier failure(s)
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: [gctsDeploy] Step execution failed (category: undefined). Error: cannot parse HTTP response with value <nil>
Finished: FAILURE