Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Version History

« Previous Version 34 Next »

Preamble - Create the Tools

  1. git clone ssh://git@bitbucket.renalregistry.nhs.uk:7999/inf/housekeeping.git
  2. cd housekeeping
  3. /c/Python36/python -m virtualenv venv
  4. venv/scripts/activate

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.

The destination folder should be empty beforehand (in particular don't have the housekeeping folder in it)

Branching

Run

python scripts/rr_git.py --action branch --tag-label vX.X.X --branch-label X.X.X --destination ~/tmp

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'.

Will branch all the products.

Modifying requirements.txt

For each of the checked out components modify requirements.txt so that they're pointing at the new branch.

E.g. in rr_data on the master file, the subcomponents

-e git+ssh://jira.renalregistry.nhs.uk:7999/rr/utils#egg=rr.utils
-e git+ssh://jira.renalregistry.nhs.uk:7999/rr/rr_logging#egg=rr_logging
-e git+ssh://jira.renalregistry.nhs.uk:7999/rr/rr_common#egg=rr_common

Need to be changed to:

-e git+ssh://jira.renalregistry.nhs.uk:7999/rr/utils@1.0.14#egg=rr.utils
-e git+ssh://jira.renalregistry.nhs.uk:7999/rr/rr_logging@1.0.14#egg=rr_logging
-e git+ssh://jira.renalregistry.nhs.uk:7999/rr/rr_common@1.0.14#egg=rr_common

for branch 1.0.14

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 -

python c:\temp\housekeeping\scripts\rr_git.py --action update --branch 1.1.10 --destination ~/tmp --message "Update requirements.txt"

to do the above automatically, however it doesn't work correctly - particularly if the requirements.txt already contains a branch tag.



Updating Version Numbers

Update:

  • version.txt
  • __init__.py


The version should be kept in sync for rr_validation, rr_merge, rr_editor and rr_site_validation.

Checking out branched code (for 2nd person to work on branch)

python scripts/rr_git.py --action branch --tag-label vX.X.X --branch-label X.X.X --destination ~/tmp

(the same command as above)


  • No labels