Skip to content

kriskrishna/concourse-ci-pipelines

Repository files navigation

Sample Spring Cloud Service Pipelines

The master branch uses Spring Cloud Pipelines to create pipelines for a single small Spring Boot to demonstrate how easy it is to customize for your own microservices. These pipelines are modified slightly from the official source code because our application does not require Eureka or Spring Cloud Contract as demonstrated by the sample applications for which the official pipelines are initially designed to use.

Customized Pipelines

* == Gradle Modifications

You need to make the following changes to your build.gradle.

  1. Make sure your gradle/ directory isn’t being ignored and is checked into git.

  2. Make sure any scripts in your project such as gradlew are checked in as executable. You can run this command to add executable permissions to a file that’s currently in git.

   git update-index --chmod=+x <path-to-file>
   git push
  1. Make sure your build.gradle is set up correctly for retrieving and publishing from/to .

For example, the following commits were made to Java_REST_API_Template to configure it for the pipeline:

* == References

Configuring for use with Pivotal Cloud Foundry (Concourse)

PCF Concourse Pipeline
Figure 1. pipeline diagram

If you do not have a PCF account

  • Request a Universal Security Groups from ]

    • it is recommended that you name the group with this pattern orgname_rolename (e.g. dtemove_developer)

    • You can review the Org, Space, Role structure of PCF here: http://docs.pivotal.io/pivotalcf/1-9/concepts/roles.html

    • If you do not have a service account (for automation) request one here: TODO

  • After you group is created, request an account with PCF.

    • The recommended setup would be an Org on PCF-Pre with three spaces (Dev, Test, and Stage) and the same Org in PCF-Prod with a single Prod space.

    • You should request the Universal Security Group be given the space_developer role for the Dev space and space_auditor role for Test, Stage, and Prod

    • You should also have the service account be assigned space_developer role for Test, Stage, and Prod

Configuring the credentials.yml

  • Copy the concourse/credentials-sample.yml and rename locally as credentials.yml (DO NOT check this file into source control)

    • The top section should have all of the parameters that need to be added by you. The Default section at the bottom of the file contains parameters that normally should be left alone.

Setting the pipeline

  • you will use fly to set the pipeline, if you do not have fly you can download the correct version from the concourse UI.

    • navigate to http://10.59.227.243:8080 and click on the icon for you OS to download the correct version.

    • add the file to you PATH so you can access it from any directory.

Windows 7 users
  • run: vagrant box add c:\temp\rhel7u2-bp0-dev.box --name rhel7u2-bp0-dev --insecure

  • cd into to ci-pipelines repo

  • run: vagrant up

  • run: vagrant ssh

  • you should now be in the VM

  • run: cd /vagrant/concourse

  • you should be good to work with concourse now. If you see an /bin/sh^M: bad interpreter: No such file or directory error when running the shell scripts it is because you have windows line endings. The VM has a utility to change that. Run dos2unix *.sh

  • run the ./login.sh from the /concourse directory

  • run the ./set_pipeline.sh to set the pipeline

The pipeline should kick off automatically

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published