Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-46275

Jenkins Cloudfoundry plugin not binding service when using groovy pipeline DSl

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • cloudfoundry-plugin
    • None
    • Jenkins-Version 2.46.2
      Cloud Foundry Plugin Version: 2.1.1

      When using jenkins pipeline step to push an app to cloudfoundry, services are not binding to the app. The app starts fine but the service is not bound. I am using Manifest choice. The same configs on maven job are working fine.

          [JENKINS-46275] Jenkins Cloudfoundry plugin not binding service when using groovy pipeline DSl

          Steven Swor added a comment - - edited

          nikhiljain14 - I suspect this has to do with the way the service list is declared in the jenkinsfile, and what data type the collection is meant to be. Can you try changing

          def serviceList = ["mysql-service"]
          

          to

          def serviceList = [["$class": "com.hpe.cloudfoundryjenkins.CloudFoundryPushPublisher$ServiceName", name: "mysql-service"]]
          

          Steven Swor added a comment - - edited nikhiljain14 - I suspect this has to do with the way the service list is declared in the jenkinsfile, and what data type the collection is meant to be. Can you try changing def serviceList = [ "mysql-service" ] to def serviceList = [[ "$class" : "com.hpe.cloudfoundryjenkins.CloudFoundryPushPublisher$ServiceName" , name: "mysql-service" ]]

          Nikhil Jain added a comment -

          sworisbreathing Specifying it his way also did not help. The app deploys but no service is bound to the app.

          Nikhil Jain added a comment - sworisbreathing Specifying it his way also did not help. The app deploys but no service is bound to the app.

            sworisbreathing Steven Swor
            nikhiljain14 Nikhil Jain
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: