Prerequisite: Install the cloud foundry cli on you system.
open PowerShell and verify cloud foundry cli with “cf -v”
To host the application on PCF:
Step1: First login to PCF with
cf login –sso
you will get the list of org available for you. Select the org in which you want to deploy your application. In my case, I am using “sandbox” org
Step2: To list the applications hosted in the org, try
Step3: To find the buildpacks required for your application type, execute
Step4: Publish your application to create the artifacts which you need to host on the PCF
Step5: In Powershell, open the path of the artifacts which you need to host on PCF
To host the application, execute below command
cf push <application name> -b <buildpack name> -s <stack>
-b: buildpack, -s: stack (you will get this information from cf buildpacks)
Step6: once done, you can verify your application on the PCF.
Additionally: You can follow the same approach to host your application using CI/CD pipeline.
On azure DevOps you will find the agent “Push to cloud foundry” to perform this action.
Notes: to automate the selection of buildpack, stack or setting the environment variables we can add the manifest.ymal
in the environmental variables we can set the configration settings like connection string which we can verify/change on PCF after hosting using the PCF portal under the setting > “User Provided Environment Variables” section.
To learn more about PCF refer: