|
| 1 | +## CloudFoundry CLI Image |
| 2 | + |
| 3 | +The CX Server is a collection of [_Dockerfiles_](https://docs.docker.com/engine/reference/builder/) for images that can be used in _Continuous Delivery_ (CD) pipelines for SAP development projects. |
| 4 | +The images are optimized for use with project ["Piper"](https://github.com/SAP/jenkins-library) on [Jenkins](https://jenkins.io/). |
| 5 | +Docker containers simplify your CD tool setup, encapsulating tools and environments that are required to execute pipeline steps. |
| 6 | + |
| 7 | +If you want to learn how to use project "Piper" please have a look at [the documentation](https://github.com/SAP/jenkins-library/blob/master/README.md). |
| 8 | +Introductory material and a lot of SAP scenarios not covered by project "Piper" are described in our [Continuous Integration Best Practices](https://developers.sap.com/tutorials/ci-best-practices-intro.html). |
| 9 | + |
| 10 | +This repository contains Dockerfiles that are designed to run project "Piper" pipelines. |
| 11 | +Nevertheless, they can also be used flexibly in any custom environment and automation process. |
| 12 | + |
| 13 | +## About this repository |
| 14 | + |
| 15 | +Dockerfile for an image with the CloudFoundry CLI and plugins for blue-green deployment and MTA. |
| 16 | +This image is intended to be used in Jenkins pipelines. |
| 17 | + |
| 18 | +## Download |
| 19 | + |
| 20 | +This image is published to Docker Hub and can be pulled via the command |
| 21 | + |
| 22 | +``` |
| 23 | +docker pull ppiper/cf-cli |
| 24 | +``` |
| 25 | + |
| 26 | +## Build |
| 27 | + |
| 28 | +To build this image locally, open a terminal in the directory of the Dockerfile an run |
| 29 | + |
| 30 | +``` |
| 31 | +docker build -t ppiper/cf-cli . |
| 32 | +``` |
| 33 | + |
| 34 | +## Usage |
| 35 | + |
| 36 | +Recommended usage of this image is via [`cloudFoundryDeploy`](https://sap.github.io/jenkins-library/steps/cloudFoundryDeploy/) pipeline step. |
| 37 | + |
| 38 | +For using the `cf` tool via this image, it can be invoked like in this command |
| 39 | + |
| 40 | +``` |
| 41 | +docker run ppiper/cf-cli cf |
| 42 | +``` |
| 43 | + |
| 44 | +## Testing |
| 45 | + |
| 46 | +### Running as a Service |
| 47 | + |
| 48 | +See `.travis.yml` file for configuration. |
| 49 | + |
| 50 | +Configure the following variables (secrets) |
| 51 | + |
| 52 | +* `CX_INFRA_IT_CF_USERNAME` (user name for deployment to SAP Cloud Platform) |
| 53 | +* `CX_INFRA_IT_CF_PASSWORD` (password for deployment to SAP Cloud Platform) |
| 54 | + |
| 55 | +### Running locally |
| 56 | + |
| 57 | +Docker is required, and at least 4 GB of memory assigned to Docker. |
| 58 | + |
| 59 | +```bash |
| 60 | +export CX_INFRA_IT_CF_USERNAME="myusername" |
| 61 | +export CX_INFRA_IT_CF_PASSWORD="mypassword" |
| 62 | +./runTests.sh |
| 63 | +``` |
| 64 | + |
| 65 | +## License |
| 66 | + |
| 67 | +Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. |
| 68 | +This file is licensed under the Apache Software License, v. 2 except as noted |
| 69 | +otherwise in the [LICENSE file](https://github.com/SAP/devops-docker-images/blob/master/LICENSE). |
| 70 | + |
| 71 | +Please note that Docker images can contain other software which may be licensed under different licenses. This License file is also included in the Docker image. For any usage of built Docker images please make sure to check the licenses of the artifacts contained in the images. |
0 commit comments