-
Notifications
You must be signed in to change notification settings - Fork 289
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #388 from jpmorin/submodule-ssh-support
SSH support for submodule
- Loading branch information
Showing
3 changed files
with
84 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,19 +66,42 @@ Tracks the commits in a [git](http://git-scm.com/) repository. | |
* `fetch_tags`: *Optional.* If `true` the flag `--tags` will be used to fetch | ||
all tags in the repository. If `false` no tags will be fetched. | ||
|
||
* `submodule_credentials`: *Optional.* List of credentials for HTTP(s) auth when pulling/pushing private git submodules which are not stored in the same git server as the container repository. | ||
Example: | ||
|
||
``` | ||
* `submodule_credentials`: *Optional.* List of credentials for HTTP(s) or SSH auth when pulling git submodules which are not stored in the same git server as the container repository or are protected by a different private key. | ||
* http(s) credentials: | ||
* `host` : The host to connect too. Note that `host` is specified with no protocol extensions. | ||
* `username` : Username for HTTP(S) auth when pulling submodule. | ||
* `password` : Password for HTTP(S) auth when pulling submodule. | ||
* ssh credentials: | ||
* `url` : Submodule url, as specified in the `.gitmodule` file. Support full or relative ssh url. | ||
* `private_key` : Private key for SSH auth when pulling submodule. | ||
* `private_key_passphrase` : *Optional.* To unlock `private_key` if it is protected by a passphrase. | ||
* exemple: | ||
```yaml | ||
submodule_credentials: | ||
# http(s) credentials | ||
- host: github.com | ||
username: git-user | ||
password: git-password | ||
- <another-configuration> | ||
# ssh credentials | ||
- url: [email protected]:org-name/repo-name.git | ||
private_key: | | ||
-----BEGIN RSA PRIVATE KEY----- | ||
MIIEowIBAAKCAQEAtCS10/f7W7lkQaSgD/mVeaSOvSF9ql4hf/zfMwfVGgHWjj+W | ||
<Lots more text> | ||
DWiJL+OFeg9kawcUL6hQ8JeXPhlImG6RTUffma9+iGQyyBMCGd1l | ||
-----END RSA PRIVATE KEY----- | ||
private_key_passphrase: ssh-passphrase # (optionnal) | ||
# ssh credentials with relative url | ||
- url: ../org-name/repo-name.git | ||
private_key: | | ||
-----BEGIN RSA PRIVATE KEY----- | ||
MIIEowIBAAKCAQEAtCS10/f7W7lkQaSgD/mVeaSOvSF9ql4hf/zfMwfVGgHWjj+W | ||
<Lots more text> | ||
DWiJL+OFeg9kawcUL6hQ8JeXPhlImG6RTUffma9+iGQyyBMCGd1l | ||
-----END RSA PRIVATE KEY----- | ||
private_key_passphrase: ssh-passphrase # (optionnal) | ||
``` | ||
|
||
Note that `host` is specified with no protocol extensions. | ||
|
||
* `git_config`: *Optional.* If specified as (list of pairs `name` and `value`) | ||
it will configure git global options, setting each name with each value. | ||
|
||
|
@@ -292,7 +315,7 @@ the case. | |
|
||
* `.git/commit_message`: For publishing the Git commit message on successful builds. | ||
|
||
* `.git/commit_timestamp`: For tagging builds with a timestamp. | ||
* `.git/commit_timestamp`: For tagging builds with a timestamp. | ||
|
||
* `.git/describe_ref`: Version reference detected and checked out. Can be templated with `describe_ref_options` parameter. | ||
By default, it will contain the `<latest annoted git tag>-<the number of commit since the tag>-g<short_ref>` (eg. `v1.6.2-1-g13dfd7b`). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters