Git clone hook
Project description
Git Clone
This package is a Sceptre Hook to clone a git repository. It executes two actions:
- removes, if exists, the current folder that you have passed
- clones the git repository that you have passed, in that folder
Installation
git clone https://github.com/bilardi/sceptre-git-clone-hook
cd sceptre-git-clone-hook
make plugin TARGET=<relative_path_of_existing_sceptre_project_root>
Syntax
You have to pass two parameters:
- the git repository url can have the follow protocols: http, https or git
- the local repository folder is a relative path from your Sceptre project root where you want to clone the repository
You can clone more git repositories using the syntax below for each git repository you need
<hook_point>:
- !git_clone <git repository url> <repository folder>
or you can clone one git repository and save the details in the property named sceptre_user_data, for using them in other steps
<hook_point>:
- !git_clone
sceptre_user_data:
GitRepository: <git repository url>
RepositoryFolder: <repository folder>
Example
For cloning one repository before create the stack
before_create:
- !git_clone https://github.com/bilardi/sceptre-git-clone-hook my-folder
for cloning two different repositories before create the stack
before_create:
- !git_clone https://github.com/bilardi/sceptre-git-clone-hook my-folder-one
- !git_clone https://github.com/bilardi/sceptre-zip-code-s3 my-folder-two
or for cloning one repository before create the stack and sharing the details with other steps
before_create:
- !git_clone
sceptre_user_data:
GitRepository: https://github.com/bilardi/sceptre-git-clone-hook
RepositoryFolder: my-folder
Development
# after your change
python3 -m pytest tests/test_git_clone.py
git add .
git commit
bumpversion --dry-run --verbose patch|minor|major
bumpversion patch|minor|major
git push origin master
git push origin vX.Y.Z
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for sceptre-git-clone-hook-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 807b95751d2f35280818cfe36ee5b9bbb06d9c78113af49044752a500d2de14e |
|
MD5 | 5f0684852b19a70067b4ea641558b54a |
|
BLAKE2b-256 | 82fedde72e5c096afa05f7eeb06a40a10610f4a10d310485355e327cd8cc3577 |
Close
Hashes for sceptre_git_clone_hook-1.0.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f66746ce3af9718fc28afd821bd4b4c3e7da31d7e5a1b0cb17ff02b9321cdf69 |
|
MD5 | e5c86991c697d05da84fe2157679d681 |
|
BLAKE2b-256 | 992f8ffa4ec7fa774abea49ff4a8d1b72a328ef3c5ac06e3adc53990c976727a |