Setting up CI/CD pipeline using CF credentials¶
The Credential Service enables the developers to setup a CI/CD pipeline for development so that automated deployment can be enabled. The Cloud Foundry user credentials generated by the tenant administrators can be used to automate Continuous Integration (CI) build pipelines. It will therefore help in eliminating manual activities and in turn minimize human error.
Prerequisites¶
The following prerequisites must be fulfilled when setting up CI/CD pipeline:
- TenantAdmin role to access "Settings" from Launchpad
- DeveloperAdmin/OperatorAdmin role
- Required access to configure CI/CD pipeline for your project
- Required configuration of your project pipeline with CF CLI
Setting up CI/CD pipeline¶
This section shows how to deploy a sample application on Cloud Foundry and expose it at the Gateway using Developer Cockpit.
- Open "Settings" from Launchpad and click the "Service Credentials" tab.
- Enter the "Username" and "Description" and click "Create Service Credentials".
- Store the credentials immediately for future reference since it will be displayed only once. For more information, refer Settings document.
-
Configure the proxy settings, if necessary.
Click here for detailed information on proxy settings
If you are in a company network behind a proxy, you may have to set the proxies to reach the Cloud Foundry endpoints. Contact your administrator, if you face any timeouts or connectivity problems.
Set the proxies for the Cloud Foundry CLI as shown below:
set http_proxy=http://PROXY_IP:PROXY_PORT set https_proxy=http://PROXY_IP:PROXY_PORT
export http_proxy=http://PROXY_IP:PROXY_PORT export https_proxy=http://PROXY_IP:PROXY_PORT
5.Log in to CF with the credentials created using Step 2.
cf login -a api.cf.eu1.mindsphere.io -u USERNAME -p PASSWORD
6.Select your Cloud Foundry org and space using the following command:
cf target -o {org_name} -s {space_name}
7.To push an app to a space, the CF user should have the Space Developer role for that space.
cf set-space-role USERNAME {org_name} {space_name} SpaceDeveloper
8.Push the application to your Cloud Foundry space using:
cf push
Except where otherwise noted, content on this site is licensed under the Development License Agreement.