...
There is also a help command - python scripts/rr_git.py --help
Tagging
Bamboo uses branches to build - and the recommended way is to branch on a tag. Go to the housekeeping clone you create and run
python scripts/rr_git.py --action tag --tag-label vX.X.X.--destination ~/tmp
will clone and tag all the main products and their components. We do this because they share components. It uses the requirements file to get the sub-components.
Info |
---|
The destination folder should be empty beforehand (in particular don't have the housekeeping folder in it) |
Branching
Run
...
Check out the Code
The following command will checkout SiteValidation, Validation, Editor and Merge into the specified folder, along with any direct requirements from their requirements.txt files.
The destination folder must exist but also MUST be empty beforehand - in particular do not checkout the housekeeping folder under it. Also do not add any other sub-folders to it yourself later.
Code Block |
---|
rr_git.py --action branch --tag-label vX.X.X --branch-label |
...
Y. |
...
Y. |
...
Y --destination |
...
Note |
---|
Git, or at least the version of Git on my PC breaks if a tag and branch exist with the same names. I am trying to prefix the tag with a 'v'. |
...
C:/MyWork/UKRR/Y.Y.Y |
Note | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
The Tag Version vX.X.X should be the latest tag in the Master branch i.e the previous release. While I think this should be okay I think it would be more correct when doing a non-hotfix build to branch from master. I think this requires
|
Modifying requirements.txt
...
-e git+ssh://jira.renalregistry.nhs.uk:7999/rr/utils@1utils@Y.0Y.14#eggY#egg=rr.utils
-e git+ssh://jira.renalregistry.nhs.uk:7999/rr/rr_logging@1logging@Y.0Y.14#eggY#egg=rr_logging
-e git+ssh://jira.renalregistry.nhs.uk:7999/rr/rr_common@1common@Y.0Y.14#eggY#egg=rr_common
for branch 1.0.14Where Y.Y.Y is the new version number and the name of our branch.
In the branching step, all the components that are needed to be changed will have been cloned in the destination folder so finding the requirements.txt files to be changed will be easy.
...
There appears to be a command -
...
You will need to commit each repo after the file has been updated.
Note | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
The command
to Should do the above this automatically , however it currently doesn't work correctly - particularly if the requirements.txt already contains a branch tagif there is an existing branch in the URL (leading to duplication). This needs
|
Updating Version Numbers
...
The version should be kept in sync for rr_validation, rr_merge, rr_editor and rr_site_validation.
You will need to commit each repo after the file has been updated.
Checking out already branched code (for 2nd person to work on branch)
...
Code Block |
---|
rr_git.py -- |
...
branch |
...
- |
...
label |
...
Y. |
...
Y. |
...
Y -- |
...
destination C:/MyWork/UKRR/Y.Y.Y |