This section covers how to build the project. It covers:
The following diagram shows the folder structure of Spring Cloud Pipelines:
. ├── common ├── concourse ├── dist ├── docs ├── docs-sources └── jenkins
common folder, you can find all the Bash scripts that contain the pipeline logic. These
scripts are reused by both the Concourse and Jenkins pipelines.
concourse folder, you can find all the necessary scripts and setup information to run the Concourse demo.
dist folder, you can find the packaged sources of the project. Since the package
contains no tests or documentation, it is extremely small and can be used in the pipelines.
docs folder, you can find the whole generated documentation of the project.
docs-source folder, you can find the sources required to generate the documentation.
jenkins folder, you can find all the necessary scripts and setup information to run the Jenkins demo.
To install the required software on Linux, type the following command:
$ sudo apt-get install -y ruby jq
If you use a Mac, run the following commands to install the missing software:
$ brew install jq $ brew install ruby $ brew install bats $ brew install shellcheck
bats work properly, we needed to attach Git submodules. To have them
initialized, either clone the project or (if you have already cloned the project)
pull to update it. The following command clones the project:
$ git clone --recursive https://github.com/spring-cloud/spring-cloud-pipelines.git
The following commands pull the project:
$ git submodule init $ git submodule update
If you forget about this step, Gradle runs these steps for you.
Once you have installed all the prerequisites, you can run the following command to build and test the project:
$ ./gradlew clean build
To generate the documentation, run the following command:
$ ./gradlew generateDocs
Spring Cloud Pipelines has a lot of tests, including Git repositories. Those
and the documentation “weigh” a lot. That is why, under the
dist folder, we
tar.gz distributions of the sources without tests and documentation.
Whenever we release a distribution, we attach a
VERSION file to it that contains
build and SCM information (build time, revision number, and other details). To skip the
distribution generation pass the
skipDist property on the command line, as follows:
$ ./gradlew build -PskipDist
You can run the
release task to automatically test the project,
build the distributions, change the versions, build the docs, upload the docs to Spring Cloud Static,
tag the repo, and then revert the changed versions back to default. To do so, run the
$ ./gradlew release -PnewVersion=1.0.0.RELEASE