This project defines cloud-native pipelines to deploy your apps to Kubernetes and Pivotal Platform, leveraging Concourse, Pivotal Build Service, a container registry such as Harbor, and Spinnaker.
These pipelines are built with modularization in mind: you can build your own pipeline
depending on the modules you want to include. To build tailored pipelines, use the
ytt
CLI to add overlays to a base pipeline.
This pipeline would build a Java application using Pivotal Build Service. Unit tests are first executed, before an image is built with Java buildpacks. The resulting container image is deployed to a container registry, and then a Spinnaker pipeline is triggered to process this image. You may also add a job to run acceptance tests using Cypress.
Base:
- Pipeline:
k8s-java-pipeline.yml
. - Pipeline parameters (template):
k8s-java-app.yml.template
Overlays:
- Acceptance tests:
acceptance-pipeline-overlay.yml
- Spinnaker:
k8s-spinnaker-overlay.yml
Use k8s-java-app.yml.template
to set pipeline parameters in a new file.
Deploy this pipeline to your Concourse instance using this command:
$ fly -t mytarget set-pipeline -p myapp -c k8s-java-pipeline.yml -l myapp.yml
To enable additional modules with pipeline overlays, use ytt
:
$ ytt -f k8s-java-pipeline.yml -f acceptance-pipeline-overlay.yml -f k8s-spinnaker-pipeline-overlay.yml > myapp-pipeline.yml
Then reuse the same command to deploy this custom pipeline to Concourse:
fly -t mytarget set-pipeline -p myapp -c myapp-pipeline.yml -l myapp.yml
The Spinnaker pipeline is triggered using a webhook you must define in your configuration. This webhook must accept a reference to a container image as input parameters (previously built by Pivotal Build Service and deployed to your container registry.
Contributions are always welcome!
Feel free to open issues & send PR.
Copyright © 2019 Pivotal Software, Inc.
This project is licensed under the Apache Software License version 2.0.