cancel
Showing results for 
Search instead for 
Did you mean: 

Error deploying react.js application to cloudfoundry using piper

Anu_
Associate
Associate
0 Kudos
208

Hi,

I'm deploying my frontend react.js application to cloudfoundry using jenkins piper library.I'm using cloudFoundryDeploy function of piper.The content of my manifest file is 

---
applications:
- name: piper-test
path: build/
instances: 1
buildpack: nodejs_buildpack
memory: 512M  

error log

15:44:31  --- Begin library step of: cloudFoundryDeploy ---15:44:31  [Pipeline] sh15:44:31  + [ -x ./piper ]15:44:31  [Pipeline] echo15:44:31  Found piper binary in the workspace - skipping unstash15:44:31  [Pipeline] echo15:44:31  Unstash content: pipelineConfigAndTests15:44:31  [Pipeline] unstash15:44:31  [Pipeline] echo15:44:31  Unstash failed: pipelineConfigAndTests (No such saved stash ‘pipelineConfigAndTests’)15:44:31  [Pipeline] libraryResource15:44:31  [Pipeline] writeFile15:44:31  [Pipeline] echo15:44:31  Step params [deployType:standard, cloudFoundry:[apiEndpoint:https://api.cf.eu12.hana.ondemand.com, credentialsId:***, manifest:manifest.yml, org:***, space:***], deployTool:cf_native]15:44:31  [Pipeline] withEnv15:44:31  [Pipeline] {15:44:31  [Pipeline] echo15:44:31  PIPER_parametersJSON: {"deployType":"standard","cloudFoundry":{"apiEndpoint":"https://api.cf.eu12.hana.ondemand.com","credentialsId":"****","manifest":"manifest.yml","org":"***","space":"**"},"deployTool":"cf_native"}15:44:31  [Pipeline] sh15:44:31  + ./piper getConfig --contextConfig --stepMetadata .pipeline/tmp/metadata/cloudFoundryDeploy.yaml
15:44:31  time="2024-02-02T10:14:31Z" level=info msg="Version 10b518fd7058fb90adb7b80c3c6b1024f0c232ab" library=SAP/jenkins-library
15:44:31  time="2024-02-02T10:14:31Z" level=info msg="Printing stepName " library=SAP/jenkins-library
15:44:31  time="2024-02-02T10:14:31Z" level=warning msg="[WARNING] The parameter 'cloudFoundry/credentialsId' is DEPRECATED, use 'cfCredentialsId' instead. (/cloudFoundryDeploy)" library=SAP/jenkins-library15:44:31  [Pipeline] readJSON15:44:31  [Pipeline] echo15:44:31  Context Config: [cfCredentialsId:***, dockerImage:ppiper/cf-cli:latest, dockerName:cfDeploy]15:44:31  [Pipeline] echo15:44:31  [INFO] executing pipeline step 'cloudFoundryDeploy' with docker image 'ppiper/cf-cli:latest'15:44:32  [Pipeline] echo15:44:32  --- Begin library step of: dockerExecute ---15:44:33  [Pipeline] echo15:44:33  --- Begin library step of: dockerExecuteOnKubernetes ---15:44:33  [Pipeline] echo15:44:33  Stash content: workspace-77619cd3-1faa-4333-944e-56db0aa58323 (includes: **/*, excludes: nohup.out, useDefaultExcludes: true, allowEmpty: true)15:44:33  [Pipeline] stash15:44:57  Stashed 39600 file(s)15:44:57  [Pipeline] podTemplate15:44:57  [Pipeline] {15:44:57  [Pipeline] node15:45:09  Created Pod: kubernetes nextgenqpa/dynamic-agent-77619cd3-1faa-4333-944e-56db0aa58323-w4vdt-n75hn15:45:12  Still waiting to schedule task
15:45:12  ‘Jenkins’ doesn’t have label ‘77619cd3-1faa-4333-944e-56db0aa58323’
15:45:12 dynamic-agent-77619cd3-1faa-4333-944e-56db0aa58323-w4vdt-n75hn’ is not accepting tasks
15:45:12  Agent dynamic-agent-77619cd3-1faa-4333-944e-56db0aa58323-w4vdt-n75hn is provisioned from template dynamic-agent-77619cd3-1faa-4333-944e-56db0aa58323-w4vdt
15:45:12  Running on dynamic-agent-77619cd3-1faa-4333-944e-56db0aa58323-w4vdt-n75hn in /home/jenkins/agent/workspace/react-test15:45:12  [Pipeline] {15:45:12  [Pipeline] echo15:45:12  ContainerConfig: [name:container-exec]15:45:12  [Pipeline] container15:45:12  [Pipeline] {15:45:12  [Pipeline] echo15:45:12  Unstash content: workspace-77619cd3-1faa-4333-944e-56db0aa5832315:45:12  [Pipeline] unstash15:45:20  [Pipeline] echo15:45:20  invalidate stash workspace-77619cd3-1faa-4333-944e-56db0aa5832315:45:20  [Pipeline] echo15:45:20  Stash content: workspace-77619cd3-1faa-4333-944e-56db0aa58323 (includes: **/*.*, excludes: **/*, useDefaultExcludes: true, allowEmpty: true)15:45:20  [Pipeline] stash15:45:20  Warning: overwriting stash ‘workspace-77619cd3-1faa-4333-944e-56db0aa58323’
15:45:22  Stashed 0 file(s)15:45:22  [Pipeline] echo15:45:22  [INFO][dockerExecute] Executing inside a Kubernetes Pod. Docker image: ppiper/cf-cli:latest15:45:22  [Pipeline] withEnv15:45:22  [Pipeline] {15:45:22  [Pipeline] sh15:45:23  + ./piper writePipelineEnv
15:45:23  time="2024-02-02T10:15:22Z" level=info msg="Version 10b518fd7058fb90adb7b80c3c6b1024f0c232ab" library=SAP/jenkins-library
15:45:23  info  (noStepName) - Project config: NONE ('.pipeline/config.yml' does not exist)15:45:23  [Pipeline] }15:45:23  [Pipeline] // withEnv15:45:23  [Pipeline] echo15:45:23  Unstash content: pipelineStepReports15:45:23  [Pipeline] unstash15:45:23  [Pipeline] echo15:45:23  Unstash failed: pipelineStepReports (No such saved stash ‘pipelineStepReports’)15:45:23  [Pipeline] withCredentials15:45:23  Masking supported pattern matches of $PIPER_password15:45:23  [Pipeline] {15:45:23  [Pipeline] sh15:45:24  + ./piper cloudFoundryDeploy
15:45:24  time="2024-02-02T10:15:23Z" level=info msg="Version 10b518fd7058fb90adb7b80c3c6b1024f0c232ab" library=SAP/jenkins-library
15:45:24  info  cloudFoundryDeploy - Project config: NONE ('.pipeline/config.yml' does not exist)
15:45:24  warn  cloudFoundryDeploy - [WARNING] The parameter 'cloudFoundry/apiEndpoint' is DEPRECATED, use 'apiEndpoint' instead. (/cloudFoundryDeploy)
15:45:24  warn  cloudFoundryDeploy - [WARNING] The parameter 'cloudFoundry/manifest' is DEPRECATED, use 'manifest' instead. (/cloudFoundryDeploy)
15:45:24  warn  cloudFoundryDeploy - [WARNING] The parameter 'cloudFoundry/org' is DEPRECATED, use 'org' instead. (/cloudFoundryDeploy)
15:45:24  warn  cloudFoundryDeploy - [WARNING] The parameter 'cloudFoundry/space' is DEPRECATED, use 'space' instead. (/cloudFoundryDeploy)
15:45:24  info  cloudFoundryDeploy - General parameters: deployTool='cf_native', deployType='standard', cfApiEndpoint='https://api.cf.eu12.hana.ondemand.com', cfOrg='***', cfSpace='***'
15:45:24  warn  cloudFoundryDeploy - We skip adding not-existing file 'manifest-variables.yml' as a vars-file to the cf create-service-push call
15:45:24  info  cloudFoundryDeploy - Reading manifest file  'manifest.yml'
15:45:24  info  cloudFoundryDeploy - Manifest file 'manifest.yml' has been parsed
15:45:24  info  cloudFoundryDeploy - CF native deployment ('standard') with:
15:45:24  info  cloudFoundryDeploy - cfAppName='piper-test'
15:45:24  info  cloudFoundryDeploy - cfManifest='manifest.yml'
15:45:24  info  cloudFoundryDeploy - cfManifestVariables: '[]'
15:45:24  info  cloudFoundryDeploy - cfManifestVariablesFiles: '[manifest-variables.yml]'
15:45:24  info  cloudFoundryDeploy - cfdeployDockerImage: ''
15:45:24  info  cloudFoundryDeploy - smokeTestScript: 'blueGreenCheckScript.sh'
15:45:24  info  cloudFoundryDeploy - DeployConfig: {push []  manifest.yml []}
15:45:24  info  cloudFoundryDeploy - Using additional environment variables: [STATUS_CODE=200 CF_TRACE=cf.log]
15:45:24  info  cloudFoundryDeploy - running command: cf version
15:45:24  info  cloudFoundryDeploy - cf version 8.7.7+583a09a.2023-12-26
15:45:24  info  cloudFoundryDeploy - Logging in to Cloud Foundry
15:45:24  info  cloudFoundryDeploy - Logging into Cloud Foundry..
15:45:24  info  cloudFoundryDeploy - running command: cf login -a https://api.cf.eu12.hana.ondemand.com -o *** -s ** -u **** -p ****
15:45:24  info  cloudFoundryDeploy - API endpoint: https://api.cf.eu12.hana.ondemand.com
15:45:24  info  cloudFoundryDeploy - 
15:45:24  info  cloudFoundryDeploy - 
15:45:24  info  cloudFoundryDeploy - Authenticating...
15:45:24  info  cloudFoundryDeploy - OK
15:45:24  info  cloudFoundryDeploy - 
15:45:24  info  cloudFoundryDeploy - Targeted org ***.
15:45:24  info  cloudFoundryDeploy - 
15:45:24  info  cloudFoundryDeploy - Targeted space ***.
15:45:24  info  cloudFoundryDeploy - 
15:45:24  info  cloudFoundryDeploy - API endpoint:   https://api.cf.eu12.hana.ondemand.com
15:45:24  info  cloudFoundryDeploy - API version:    3.155.0
15:45:24  info  cloudFoundryDeploy - user:           ****
15:45:24  info  cloudFoundryDeploy - org:            ****
15:45:24  info  cloudFoundryDeploy - space:          ***
15:45:24  info  cloudFoundryDeploy - Logged in successfully to Cloud Foundry..
15:45:24  info  cloudFoundryDeploy - running command: cf plugins
15:45:24  info  cloudFoundryDeploy - Listing installed plugins...
15:45:24  info  cloudFoundryDeploy - 
15:45:24  info  cloudFoundryDeploy - plugin                version   command name                  command help
15:45:24  info  cloudFoundryDeploy - blue-green-deploy     1.4.0     blue-green-deploy, bgd        Zero-downtime deploys with smoke tests
15:45:24  info  cloudFoundryDeploy - Create-Service-Push   1.3.2     create-service-push, cspush   Works in the same manner as cf push, except that it will create services defined in a services-manifest.yml file first before performing a cf push.
15:45:24  info  cloudFoundryDeploy - html5-plugin          1.4.7     html5-delete                  Delete one or multiple app-host service instances or content uploaded with these instances
15:45:24  info  cloudFoundryDeploy - html5-plugin          1.4.7     html5-get                     Fetch content of single HTML5 application file by path, or whole application by name and version
15:45:24  info  cloudFoundryDeploy - html5-plugin          1.4.7     html5-info                    Get size limit and status of app-host service instances
15:45:24  info  cloudFoundryDeploy - html5-plugin          1.4.7     html5-list                    Display list of HTML5 applications or file paths of specified application
15:45:24  info  cloudFoundryDeploy - html5-plugin          1.4.7     html5-push                    Push HTML5 applications to html5-apps-repo service
15:45:24  info  cloudFoundryDeploy - multiapps             3.2.2     bg-deploy                     Deploy a multi-target app using blue-green deployment
15:45:24  info  cloudFoundryDeploy - multiapps             3.2.2     deploy                        Deploy a new multi-target app or sync changes to an existing one
15:45:24  info  cloudFoundryDeploy - multiapps             3.2.2     download-mta-op-logs, dmol    Download logs of multi-target app operation
15:45:24  info  cloudFoundryDeploy - multiapps             3.2.2     mta                           Display health and status for a multi-target app
15:45:24  info  cloudFoundryDeploy - multiapps             3.2.2     mta-ops                       List multi-target app operations
15:45:24  info  cloudFoundryDeploy - multiapps             3.2.2     mtas                          List all multi-target apps
15:45:24  info  cloudFoundryDeploy - multiapps             3.2.2     purge-mta-config              Purge no longer valid configuration entries
15:45:24  info  cloudFoundryDeploy - multiapps             3.2.2     undeploy                      Undeploy a multi-target app
15:45:24  info  cloudFoundryDeploy - 
15:45:24  info  cloudFoundryDeploy - Use 'cf repo-plugins' to list plugins in registered repos available to install.
15:45:24  info  cloudFoundryDeploy - running command: cf push -f manifest.yml
15:45:24  info  cloudFoundryDeploy - Pushing app piper-test to org CFQPATools_nextgenqpa-app / space nextgenqpa-dev as ****...
15:45:24  info  cloudFoundryDeploy - Applying manifest file manifest.yml...
15:45:24  info  cloudFoundryDeploy - 
15:45:24  info  cloudFoundryDeploy - Updating with these attributes...
15:45:24  info  cloudFoundryDeploy -   ---
15:45:24  info  cloudFoundryDeploy -   applications:
15:45:24  info  cloudFoundryDeploy - + - name: piper-test
15:45:24  info  cloudFoundryDeploy - +   instances: 1
15:45:24  info  cloudFoundryDeploy -     path: build
15:45:24  info  cloudFoundryDeploy -     memory: 512M
15:45:24  info  cloudFoundryDeploy - +   default-route: true
15:45:24  info  cloudFoundryDeploy - +   buildpack: nodejs_buildpack
15:45:28  info  cloudFoundryDeploy - Manifest applied
15:45:29  info  cloudFoundryDeploy - Packaging files to upload...
15:45:29  info  cloudFoundryDeploy - Uploading files...
15:45:30  info  cloudFoundryDeploy - 
 0 B / 29.56 KiB    0.00%
 29.56 KiB / 29.56 KiB  100.00%
 29.56 KiB / 29.56 KiB  100.00%
 29.56 KiB / 29.56 KiB  100.00%
 29.56 KiB / 29.56 KiB  100.00%
 29.56 KiB / 29.56 KiB  100.00%
 29.56 KiB / 29.56 KiB  100.00% 1s
15:45:30  info  cloudFoundryDeploy - 
15:45:30  info  cloudFoundryDeploy - Waiting for API to complete processing files...
15:45:35  info  cloudFoundryDeploy - 
15:45:35  info  cloudFoundryDeploy - Staging app and tracing logs...
15:45:37  info  cloudFoundryDeploy -    Downloading nodejs_buildpack...
15:45:37  info  cloudFoundryDeploy -    Downloaded nodejs_buildpack
15:45:37  info  cloudFoundryDeploy -    Cell a5512fa4-2810-44ae-a6d6-4271b38d81b6 creating container for instance 54cfd722-49c1-42b8-9429-a285e788cbcc
15:45:39  info  cloudFoundryDeploy -    Security group rules were updated
15:45:39  info  cloudFoundryDeploy -    Cell a5512fa4-2810-44ae-a6d6-4271b38d81b6 successfully created container for instance 54cfd722-49c1-42b8-9429-a285e788cbcc
15:45:39  info  cloudFoundryDeploy -    Downloading app package...
15:45:39  info  cloudFoundryDeploy -    Downloaded app package (184.8K)
15:45:39  info  cloudFoundryDeploy -    -----> Nodejs Buildpack version 1.8.21
15:45:39  info  cloudFoundryDeploy -    -----> Bootstrapping python
15:45:39  info  cloudFoundryDeploy -    -----> Installing python 3.11.7
15:45:39  info  cloudFoundryDeploy -    Copy [/tmp/buildpacks/dbdaf69527a2e9814eea2b8899fda687/dependencies/7f13196121e201aac02febd161f0b5fa/python_3.11.7_linux_x64_cflinuxfs4_782cc8f5.tgz]
15:45:42  info  cloudFoundryDeploy -    -----> Installing binaries
15:45:42  info  cloudFoundryDeploy -    engines.node (package.json): unspecified
15:45:42  info  cloudFoundryDeploy -    engines.npm (package.json): unspecified (use default)
15:45:42  warn  cloudFoundryDeploy -    **WARNING** Node version not specified in package.json or .nvmrc. See: http://docs.cloudfoundry.org/buildpacks/node/node-tips.html
15:45:42  info  cloudFoundryDeploy -    -----> Installing node 18.19.0
15:45:42  info  cloudFoundryDeploy -    Copy [/tmp/buildpacks/dbdaf69527a2e9814eea2b8899fda687/dependencies/3aa2c9fca7dc53dd5aabc5c75de79d33/node_18.19.0_linux_x64_cflinuxfs4_0c6e50e7.tgz]
15:45:45  info  cloudFoundryDeploy -    Using default npm version: 10.2.3
15:45:45  info  cloudFoundryDeploy -    -----> Installing yarn 1.22.19
15:45:45  info  cloudFoundryDeploy -    Copy [/tmp/buildpacks/dbdaf69527a2e9814eea2b8899fda687/dependencies/0f06052381cbcef1593bd279ca3d9458/yarn_1.22.19_linux_noarch_any-stack_32d0e82e.tgz]
15:45:45  info  cloudFoundryDeploy -    Installed yarn 1.22.19
15:45:45  info  cloudFoundryDeploy -    -----> Creating runtime environment
15:45:45  warn  cloudFoundryDeploy -    **WARNING** No package.json found
15:45:45  info  cloudFoundryDeploy -    PRO TIP: It is recommended to vendor the application's Node.js dependencies
15:45:45  info  cloudFoundryDeploy -    Visit http://docs.cloudfoundry.org/buildpacks/node/index.html#vendoring
15:45:45  info  cloudFoundryDeploy -    NODE_ENV=production
15:45:45  info  cloudFoundryDeploy -    NODE_HOME=/tmp/contents1407174917/deps/0/node
15:45:45  info  cloudFoundryDeploy -    NODE_MODULES_CACHE=true
15:45:45  info  cloudFoundryDeploy -    NODE_VERBOSE=false
15:45:45  info  cloudFoundryDeploy -    NPM_CONFIG_LOGLEVEL=error
15:45:45  info  cloudFoundryDeploy -    NPM_CONFIG_PRODUCTION=true
15:45:45  info  cloudFoundryDeploy -    -----> Building dependencies
15:45:45  info  cloudFoundryDeploy -    Skipping (no package.json)
15:45:46  warn  cloudFoundryDeploy -    **WARNING** No package.json found
15:45:46  warn  cloudFoundryDeploy -    **WARNING** This app may not specify any way to start a node process
15:45:46  info  cloudFoundryDeploy -    See: https://docs.cloudfoundry.org/buildpacks/node/node-tips.html#start
15:45:46  info  cloudFoundryDeploy -    Contrast Security no credentials found. Will not write environment files.
15:45:46  info  cloudFoundryDeploy -    inside Sealights hook
15:45:46  info  cloudFoundryDeploy -    service is not configured to run with Sealights
15:45:53  info  cloudFoundryDeploy -    Exit status 0
15:45:53  info  cloudFoundryDeploy -    Uploading droplet, build artifacts cache...
15:45:53  info  cloudFoundryDeploy -    Uploading build artifacts cache...
15:45:53  info  cloudFoundryDeploy -    Uploading droplet...
15:45:53  info  cloudFoundryDeploy -    Uploaded build artifacts cache (216B)
15:45:57  info  cloudFoundryDeploy - 
15:45:57  info  cloudFoundryDeploy - Waiting for app piper-test to start...
15:45:57  info  cloudFoundryDeploy - 
15:45:57  info  cloudFoundryDeploy - Instances starting...
15:46:00  info  cloudFoundryDeploy - Instances starting...
15:46:03  info  cloudFoundryDeploy - Instances starting...
15:46:06  info  cloudFoundryDeploy - Instances starting...
15:46:10  info  cloudFoundryDeploy - Instances starting...
15:46:12  info  cloudFoundryDeploy - Instances starting...
15:46:15  info  cloudFoundryDeploy - Instances starting...
15:46:19  info  cloudFoundryDeploy - Instances starting...
15:46:21  info  cloudFoundryDeploy - Instances starting...
15:46:25  info  cloudFoundryDeploy - Instances starting...
15:46:28  info  cloudFoundryDeploy - Instances starting...
15:46:30  info  cloudFoundryDeploy - Instances starting...
15:46:31  info  cloudFoundryDeploy - 
15:46:31  info  cloudFoundryDeploy - name:              piper-test
15:46:31  info  cloudFoundryDeploy - requested state:   started
15:46:31  info  cloudFoundryDeploy - routes:            piper-test.cfapps.eu12.hana.ondemand.com
15:46:31  info  cloudFoundryDeploy - last uploaded:     Fri 02 Feb 10:15:51 UTC 2024
15:46:31  info  cloudFoundryDeploy - stack:             cflinuxfs4
15:46:31  info  cloudFoundryDeploy - buildpacks:        
15:46:31  info  cloudFoundryDeploy - 	name               version   detect output   buildpack name
15:46:31  info  cloudFoundryDeploy - 	nodejs_buildpack   1.8.21    nodejs          nodejs
15:46:31  info  cloudFoundryDeploy - 
15:46:31  info  cloudFoundryDeploy - type:            web
15:46:31  info  cloudFoundryDeploy - sidecars:        
15:46:31  info  cloudFoundryDeploy - instances:       0/1
15:46:31  info  cloudFoundryDeploy - memory usage:    512M
15:46:31  info  cloudFoundryDeploy - start command:   npm start
15:46:31  info  cloudFoundryDeploy -      state     since                  cpu    memory   disk     logging      details
15:46:31  info  cloudFoundryDeploy - #0   crashed   2024-02-02T10:16:31Z   0.0%   0 of 0   0 of 0   0/s of 0/s   
15:46:31  info  cloudFoundryDeploy - Start unsuccessful
15:46:31  info  cloudFoundryDeploy - 
15:46:31  info  cloudFoundryDeploy - TIP: use 'cf logs piper-test --recent' for more information
15:46:31  info  cloudFoundryDeploy - FAILED
15:46:31  error cloudFoundryDeploy - Command '[push -f manifest.yml]' failed. - running command 'cf' failed: cmd.Run() failed: exit status 1
15:46:31  info  cloudFoundryDeploy - Logging out of Cloud Foundry
15:46:31  info  cloudFoundryDeploy - running command: cf logout
15:46:31  info  cloudFoundryDeploy - Logging out ****...
15:46:31  info  cloudFoundryDeploy - OK

when using direct cf push using cf cli,its working fine..
Is cloudFoundryDeploy function of piper library can be used for frontend react application as well?

Accepted Solutions (0)

Answers (0)