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 Page History

« Previous Version 36 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


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.

rr_git.py --action branch --tag-label vX.X.X --branch-label Y.Y.Y --destination C:/MyWork/UKRR/Y.Y.Y

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

Error rendering macro 'jira' : Unable to locate Jira server for this macro. It may be due to Application Link configuration.
before that can be done.


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@Y.Y.Y#egg=rr.utils
-e git+ssh://jira.renalregistry.nhs.uk:7999/rr/rr_logging@Y.Y.Y#egg=rr_logging
-e git+ssh://jira.renalregistry.nhs.uk:7999/rr/rr_common@Y.Y.Y#egg=rr_common

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

You will need to commit each repo after the file has been updated.


The command

rr_git.py --action update --branch Y.Y.Y --destination C:/Mywork/UKRR/Y.Y.Y --message "Update requirements.txt"

Should do this automatically however it currently doesn't work if there is an existing branch in the URL (leading to duplication). This needs Unable to locate Jira server for this macro. It may be due to Application Link configuration. to be completed before it can be done automatically.


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.

You will need to commit each repo after the file has been updated.


Adding the Version to Jira

In Jira go to the "Renal Registry" Project and click the Settings ("Cog") button in the lower left hand side.

Go to the Versions section and add a new Version entry for the new version number


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


rr_git.py --branch-label Y.Y.Y --destination C:/MyWork/UKRR/Y.Y.Y




  • No labels