Skip to content
This repository has been archived by the owner on Dec 4, 2020. It is now read-only.

Added info about Pluggable SCM #189

Merged
merged 1 commit into from
Jul 20, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions site/_docs/architecture/cartridges.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ Cartridges are defined according to the [cartridge specification](https://github

## Cartridge Collections
Cartridges can be grouped together into collections so that related cartridges can be loaded in one go.

## Pluggable modules
Cartridges can also support Pluggable modules. At the moment [Pluggable SCM](https://accenture.github.io/adop-cartridges-cookbook/docs/recipes/adding-a-pluggable-scm/) is supported with which help you are able to use your desired SCM provider - _Gerrit_ or _BitBucket_
10 changes: 8 additions & 2 deletions site/_docs/developing/cartridges.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ The process for developing a cartridge is:
* Take a look at the [cartridge cookbook](/adop-cartridges-cookbook/)
* Utilise the [Cartridge Development cartridge](#using-the-cartridge-development-cartridge)
* [Develop the cartridge content](#developing-cartridge-content)
* [Add Pluggable SCM to your cartridge](#adding-pluggable-scm)
* [Test the cartridge against the platform](#testing-the-cartridge)
* [Publish the cartridge](#publishing-cartridges)

Expand All @@ -31,8 +32,9 @@ High-level guidelines for writing Jenkins jobs in Job DSL:
* Do not make any credentials visible anywhere in your job i.e. do not echo passwords in your shell script or store credentials as plain-text build parameters. Ensure you are always using the maskPasswords() and injectPasswords() wrappers in your Job DSL.
* Credentials can also be added manually to the Jenkins credential store and then referenced in your job.
* It is highly recommended that the sshAgent() wrapper be used with the Jenkins credentials specified in order to allow Jenkins to clone all local git repositories from Gerrit over SSH.
* Git SCM
* Ensure that all your git clones are over SSH (not HTTPS) using the Jenkins SCM plugin (it is advisable not to do any git clones in your shell script unless specifically required to do so).
* Pluggable SCM
* This is the recommended way!
* [Pluggable SCM library](https://accenture.github.io/adop-pluggable-scm/docs/about-pluggable-scm/) allows you to clone repositories over SSH, HTTPS and HTTP protocols, at the moment _Gerrit_ and _BitBucket_ are supported.
* When cloning from external git repositories, ensure that you only clone from trusted git repositories.
* When cloning a git repository, it better to clone using a reference rather than a branch specifier. The way to do this is by specifying the variable $GERRIT_NEWREV in the "Branch Specifier" variable. This is useful in the case of jobs that need to be rebuilt, and it is preferred that the code from that specific build be cloned as opposed to the latest code on a specific branch.
* Miscellaneous
Expand Down Expand Up @@ -102,6 +104,10 @@ More advanced pipelines may also include:

Cartridges can also include jobs for creating and destroying environments, or these stages can be included as part of the main pipeline.

## Adding Pluggable SCM

To use _Gerrit_ or _BitBucket_ SCM provider, you can now add [Pluggable SCM](https://accenture.github.io/adop-pluggable-scm/docs/about-pluggable-scm/) library to your cartridge. More information can be found here - [Add Pluggable SCM to cartridge](https://accenture.github.io/adop-cartridges-cookbook/docs/recipes/adding-a-pluggable-scm/)

## Testing the Cartridge
Once a cartridge has been developed it is necessary to test it against the platform in the same way that consuming users would.

Expand Down