Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to make CF native deployments with Piper version v1.222.0 onwards #5162

Open
levinanton opened this issue Oct 24, 2024 · 0 comments
Open

Comments

@levinanton
Copy link

We have a set of Node.js-based apps which we deploy to the SAP BTP CF using Piper's cloudFoundryDeploy step.

config.yml

---
steps:
  cloudFoundryDeploy:
    deployTool: 'cf_native'
    deployType: 'standard'
    cfApiEndpoint: 'https://api.cf.eu12.hana.ondemand.com'
    cfCredentialsId: '****'
    cfManifest: 'config/cf/manifest.yml'
    cfOrg: '****'
    cfSpace: 'dev'
    cfManifestVariablesFiles:
      - 'config/cf/dev/vars.yml'
...

It works perfectly fine with Piper versions <=v1.221.0 but starts failing with v1.222.0 onwards.

Already tried to significantly increase both disk quota and memory for CF app (seems like it helped in this somewhat similar case #3817) but it didn't do the trick for us.

There is not much in the logs:

13:01:35  info  cloudFoundryDeploy - fatal error: errorDetails{"category":"undefined","correlationId":"****","error":"running command 'cf' failed: cmd.Run() failed: exit status 1","library":"SAP/jenkins-library","message":"step execution failed: running command 'cf' failed: cmd.Run() failed: exit status 1","result":"failure","stepName":"cloudFoundryDeploy","time":"2024-10-24T11:01:35.208621812Z"}
13:01:35  fatal cloudFoundryDeploy - step execution failed: running command 'cf' failed: cmd.Run() failed: exit status 1 - running command 'cf' failed: cmd.Run() failed: exit status 1

Comparing 2 versions: v1.221.0...v1.222.0 , I see only one change related to cloudFoundryDeploy

Screenshot 2024-10-24 at 13 40 21


Working v1.221.0

13:02:38  Loading library [email protected]
...
13:03:22  + ./piper cloudFoundryDeploy --defaultConfig .pipeline/./.pipeline/defaults-dev.yml --ignoreCustomDefaults
13:03:22  info  cloudFoundryDeploy - Using stageName 'Deploy' from env variable
13:03:22  info  cloudFoundryDeploy - Project config: '.pipeline/config.yml'
13:03:22  info  cloudFoundryDeploy - Project defaults: '.pipeline/./.pipeline/defaults-dev.yml'
13:03:22  info  cloudFoundryDeploy - Ignoring custom defaults from pipeline config
13:03:22  info  cloudFoundryDeploy - Retrieving hook configuration
13:03:22  info  cloudFoundryDeploy - General parameters: deployTool='cf_native', deployType='standard', cfApiEndpoint='https://api.cf.eu12.hana.ondemand.com', cfOrg='****', cfSpace='dev'
13:03:22  info  cloudFoundryDeploy - Reading manifest file  'config/cf/manifest.yml'
13:03:22  info  cloudFoundryDeploy - Manifest file 'config/cf/manifest.yml' has been parsed
13:03:22  info  cloudFoundryDeploy - CF native deployment ('standard') with:
13:03:22  info  cloudFoundryDeploy - cfAppName='****'
13:03:22  info  cloudFoundryDeploy - cfManifest='config/cf/manifest.yml'
13:03:22  info  cloudFoundryDeploy - cfManifestVariables: '[]'
13:03:22  info  cloudFoundryDeploy - cfManifestVariablesFiles: '[config/cf/dev/vars.yml]'
13:03:22  info  cloudFoundryDeploy - cfdeployDockerImage: ''
13:03:22  info  cloudFoundryDeploy - smokeTestScript: 'blueGreenCheckScript.sh'
13:03:22  info  cloudFoundryDeploy - DeployConfig: {push [--vars-file config/cf/dev/vars.yml]  config/cf/manifest.yml []}
13:03:22  info  cloudFoundryDeploy - Using additional environment variables: [STATUS_CODE=200 CF_TRACE=cf.log]
13:03:22  info  cloudFoundryDeploy - running command: cf version
13:03:22  info  cloudFoundryDeploy - cf version 6.53.0+8e2b70a4a.2020-10-01
13:03:22  info  cloudFoundryDeploy - Logging in to Cloud Foundry
13:03:22  info  cloudFoundryDeploy - Logging into Cloud Foundry..
13:03:22  info  cloudFoundryDeploy - running command: cf login -a https://api.cf.eu12.hana.ondemand.com -o **** -s dev -u **** -p ****
13:03:22  info  cloudFoundryDeploy - API endpoint: https://api.cf.eu12.hana.ondemand.com
...
13:03:23  info  cloudFoundryDeploy - Use 'cf repo-plugins' to list plugins in registered repos available to install.
13:03:23  info  cloudFoundryDeploy - running command: cf push --vars-file config/cf/dev/vars.yml -f config/cf/manifest.yml
13:03:23  info  cloudFoundryDeploy - Pushing from manifest to org **** / space dev as ****...
13:03:23  info  cloudFoundryDeploy - Using manifest file /home/jenkins/agent/workspace/****/config/cf/manifest.yml
...
13:04:09  info  cloudFoundryDeploy - Waiting for app to start...
...
13:04:09  info  cloudFoundryDeploy - Logging out of Cloud Foundry
13:04:09  info  cloudFoundryDeploy - running command: cf logout
13:04:10  info  cloudFoundryDeploy - Logging out ****...
13:04:10  info  cloudFoundryDeploy - OK
13:04:10  info  cloudFoundryDeploy - 
13:04:10  info  cloudFoundryDeploy - Logged out successfully
13:04:10  info  cloudFoundryDeploy - SUCCESS

Failing v1.222.0

13:00:45  Loading library [email protected]
...
13:01:30  + ./piper cloudFoundryDeploy --defaultConfig .pipeline/./.pipeline/defaults-dev.yml --ignoreCustomDefaults
13:01:30  info  cloudFoundryDeploy - Using stageName 'Deploy' from env variable
13:01:30  info  cloudFoundryDeploy - Project config: '.pipeline/config.yml'
13:01:30  info  cloudFoundryDeploy - Project defaults: '.pipeline/./.pipeline/defaults-dev.yml'
13:01:30  info  cloudFoundryDeploy - Ignoring custom defaults from pipeline config
13:01:30  info  cloudFoundryDeploy - Retrieving hook configuration
13:01:30  info  cloudFoundryDeploy - General parameters: deployTool='cf_native', deployType='standard', cfApiEndpoint='https://api.cf.eu12.hana.ondemand.com', cfOrg='****', cfSpace='dev'
13:01:30  info  cloudFoundryDeploy - Reading manifest file  'config/cf/manifest.yml'
13:01:30  info  cloudFoundryDeploy - Manifest file 'config/cf/manifest.yml' has been parsed
13:01:30  info  cloudFoundryDeploy - CF native deployment ('standard') with:
13:01:30  info  cloudFoundryDeploy - cfAppName='****'
13:01:30  info  cloudFoundryDeploy - cfManifest='config/cf/manifest.yml'
13:01:30  info  cloudFoundryDeploy - cfManifestVariables: '[]'
13:01:30  info  cloudFoundryDeploy - cfManifestVariablesFiles: '[config/cf/dev/vars.yml]'
13:01:30  info  cloudFoundryDeploy - cfdeployDockerImage: ''
13:01:30  info  cloudFoundryDeploy - smokeTestScript: 'blueGreenCheckScript.sh'
13:01:30  info  cloudFoundryDeploy - DeployConfig: {push [--vars-file config/cf/dev/vars.yml]  config/cf/manifest.yml []}
13:01:30  info  cloudFoundryDeploy - Using additional environment variables: [STATUS_CODE=200 CF_TRACE=cf.log]
13:01:30  info  cloudFoundryDeploy - running command: cf version
13:01:30  info  cloudFoundryDeploy - cf version 8.8.2+483578c.2024-09-20
13:01:30  info  cloudFoundryDeploy - Logging in to Cloud Foundry
13:01:30  info  cloudFoundryDeploy - Logging into Cloud Foundry..
13:01:30  info  cloudFoundryDeploy - running command: cf login -a https://api.cf.eu12.hana.ondemand.com -o **** -s dev -u **** -p ****
13:01:30  info  cloudFoundryDeploy - API endpoint: https://api.cf.eu12.hana.ondemand.com
...
13:01:34  info  cloudFoundryDeploy - Manifest applied
13:01:35  info  cloudFoundryDeploy - Packaging files to upload...
13:01:35  info  cloudFoundryDeploy - Aborting push: File cf.log has been modified since the start of push. Validate the correct state of the file and try again.
13:01:35  info  cloudFoundryDeploy - FAILED
13:01:35  error cloudFoundryDeploy - Command '[push --vars-file config/cf/dev/vars.yml -f config/cf/manifest.yml]' failed. - running command 'cf' failed: cmd.Run() failed: exit status 1
13:01:35  info  cloudFoundryDeploy - Logging out of Cloud Foundry
13:01:35  info  cloudFoundryDeploy - running command: cf logout
13:01:35  info  cloudFoundryDeploy - Logging out ****...
13:01:35  info  cloudFoundryDeploy - OK
...
13:01:35  info  cloudFoundryDeploy - RESPONSE: [2024-10-24T11:01:35Z]
13:01:35  info  cloudFoundryDeploy - HTTP/1.1 201 Created
13:01:35  info  cloudFoundryDeploy - Content-Length: 809
13:01:35  info  cloudFoundryDeploy - Content-Type: application/json; charset=utf-8
13:01:35  info  cloudFoundryDeploy - Date: Thu, 24 Oct 2024 11:01:35 GMT
13:01:35  info  cloudFoundryDeploy - Referrer-Policy: strict-origin-when-cross-origin
13:01:35  info  cloudFoundryDeploy - Strict-Transport-Security: max-age=31536000; includeSubDomains; preload;
13:01:35  info  cloudFoundryDeploy - Vary: Accept
13:01:35  info  cloudFoundryDeploy - X-B3-Spanid: 44ebe615ea7a1500
13:01:35  info  cloudFoundryDeploy - X-B3-Traceid: 334279b45753468a44ebe615ea7a1500
13:01:35  info  cloudFoundryDeploy - X-Content-Type-Options: nosniff
13:01:35  info  cloudFoundryDeploy - X-Download-Options: noopen
13:01:35  info  cloudFoundryDeploy - X-Frame-Options: SAMEORIGIN
13:01:35  info  cloudFoundryDeploy - X-Permitted-Cross-Domain-Policies: none
13:01:35  info  cloudFoundryDeploy - X-Ratelimit-Limit: 20000
13:01:35  info  cloudFoundryDeploy - X-Ratelimit-Remaining: 18000
13:01:35  info  cloudFoundryDeploy - X-Ratelimit-Reset: 1729769183
13:01:35  info  cloudFoundryDeploy - X-Runtime: 0.031317
13:01:35  info  cloudFoundryDeploy - X-Vcap-Request-Id: 334279b4-5753-468a-44eb-e615ea7a1500::892e4bdf-0442-4229-b956-2d17105a9660
13:01:35  info  cloudFoundryDeploy - X-Xss-Protection: 1; mode=block
13:01:35  info  cloudFoundryDeploy - {
13:01:35  info  cloudFoundryDeploy -   "created_at": "2024-10-24T11:01:35Z",
13:01:35  info  cloudFoundryDeploy -   "data": {
13:01:35  info  cloudFoundryDeploy -     "checksum": {
13:01:35  info  cloudFoundryDeploy -       "type": "sha256",
13:01:35  info  cloudFoundryDeploy -       "value": null
13:01:35  info  cloudFoundryDeploy -     },
13:01:35  info  cloudFoundryDeploy -     "error": null
13:01:35  info  cloudFoundryDeploy -   },
13:01:35  info  cloudFoundryDeploy -   "guid": "0d861b82-681b-47b3-955c-9a466e2efadb",
13:01:35  info  cloudFoundryDeploy -   "links": {
13:01:35  info  cloudFoundryDeploy -     "app": {
13:01:35  info  cloudFoundryDeploy -       "href": "https://api.cf.eu12.hana.ondemand.com/v3/apps/914b191c-3933-4e8f-8b7b-a04b91795f90"
13:01:35  info  cloudFoundryDeploy -     },
13:01:35  info  cloudFoundryDeploy -     "download": {
13:01:35  info  cloudFoundryDeploy -       "href": "https://api.cf.eu12.hana.ondemand.com/v3/packages/0d861b82-681b-47b3-955c-9a466e2efadb/download"
13:01:35  info  cloudFoundryDeploy -     },
13:01:35  info  cloudFoundryDeploy -     "self": {
13:01:35  info  cloudFoundryDeploy -       "href": "https://api.cf.eu12.hana.ondemand.com/v3/packages/0d861b82-681b-47b3-955c-9a466e2efadb"
13:01:35  info  cloudFoundryDeploy -     },
13:01:35  info  cloudFoundryDeploy -     "upload": {
13:01:35  info  cloudFoundryDeploy -       "href": "https://api.cf.eu12.hana.ondemand.com/v3/packages/0d861b82-681b-47b3-955c-9a466e2efadb/upload",
13:01:35  info  cloudFoundryDeploy -       "method": "POST"
13:01:35  info  cloudFoundryDeploy -     }
13:01:35  info  cloudFoundryDeploy -   },
13:01:35  info  cloudFoundryDeploy -   "metadata": {
13:01:35  info  cloudFoundryDeploy -     "annotations": {},
13:01:35  info  cloudFoundryDeploy -     "labels": {}
13:01:35  info  cloudFoundryDeploy -   },
13:01:35  info  cloudFoundryDeploy -   "relationships": {
13:01:35  info  cloudFoundryDeploy -     "app": {
13:01:35  info  cloudFoundryDeploy -       "data": {
13:01:35  info  cloudFoundryDeploy -         "guid": "914b191c-3933-4e8f-8b7b-a04b91795f90"
13:01:35  info  cloudFoundryDeploy -       }
13:01:35  info  cloudFoundryDeploy -     }
13:01:35  info  cloudFoundryDeploy -   },
13:01:35  info  cloudFoundryDeploy -   "state": "AWAITING_UPLOAD",
13:01:35  info  cloudFoundryDeploy -   "type": "bits",
13:01:35  info  cloudFoundryDeploy -   "updated_at": "2024-10-24T11:01:35Z"
13:01:35  info  cloudFoundryDeploy - }
13:01:35  info  cloudFoundryDeploy - 
13:01:35  info  cloudFoundryDeploy - 
13:01:35  info  cloudFoundryDeploy - ### END OF CF CLI TRACE OUTPUT ###
13:01:35  info  cloudFoundryDeploy - fatal error: errorDetails{"category":"undefined","correlationId":"****,"error":"running command 'cf' failed: cmd.Run() failed: exit status 1","library":"SAP/jenkins-library","message":"step execution failed: running command 'cf' failed: cmd.Run() failed: exit status 1","result":"failure","stepName":"cloudFoundryDeploy","time":"2024-10-24T11:01:35.208621812Z"}
13:01:35  fatal cloudFoundryDeploy - step execution failed: running command 'cf' failed: cmd.Run() failed: exit status 1 - running command 'cf' failed: cmd.Run() failed: exit status 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant