Creating a release
Standard Release
Project is ready to be released not for a specific event, e.g. at the end of a sprint. Script Generator version number always differs to the client’s.
Pre Testing
- Find out anything that needs to be in the release that isn’t and mark with - for releaselabel. (This does not prevent a release)
- Ensure the version of - cs-studioreferenced in the GUI’s target platform is recent enough to include the most recent changes in the- isis_css_toprepository.
- Update the upgrade script to include the latest version (this is done on master). Steps to do this are in Config Upgrader in section creating a production upgrade script - After committing these changes to - masteron the- EPICS-upgradesubmodule, don’t forget to push the new submodule version to- masteron the top- EPICSbranch. This is needed to make sure you changes appear on the release branch created in the next step.
 
- For packages which are published on - PyPI, in particular- genie_pythonand- ibex_bluesky_core, create PyPI releases if needed.- These packages are released by performing a - git tag x.y.zon a checkout of- main, where- x.y.zis the new version you want to release. Push the tag using- git push origin tag x.y.z. They will then build in github actions, and prompt to “approve” the release pipeline to PyPI.
- genieshould be released with a version number matching the main IBEX version number. The release takes around 15 minutes in GHA.
- ibex_bluesky_coreshould generally have a minor/patch version incremented for now until we reach v1. The release takes a couple of minutes in GHA.
- Ensure these releases were successful by checking on pypi for the new release number before proceeding. 
 
- Start the Github Actions pipeline - create-release-branches.- Click on ‘Run workflow’ 
- Set - VERSIONto the new release version (e.g.- X.x.m).
- Set - TAGif you wish to branch off a commit other than the latest top level- HEAD. If you do branch off an earlier commit, also set- REMOTEto- falseas it now does not make sense to verify if you are on the latest submodule versions.
- The script will then (as selected): - Create the release branches (named - Release_X.x.mexcept- Release_Script_Gen_X.x.mfor script generator) for:- EPICSand submodules.
- IBEX GUI.
- Script Generator.
- Uktena.
 
- Update or add version numbers: - In - ioc/master/INSTETC/INSTETC-IOC-01App/Db/svn-revision.db.tmplfor- EPICS.
- In - /uk.ac.stfc.isis.ibex.e4.client/pom.xmland- /uk.ac.stfc.isis.ibex.e4.client/META-INF/MANIFEST.mffor- IBEX GUI.
- In - /uk.ac.stfc.isis.scriptgenerator.client/pom.xmland- /uk.ac.stfc.isis.scriptgenerator.client/META-INF/MANIFEST.mffor- Script Generator.
- Note: - genie_pythonlibrary version numbers are set automatically from the git tag, and no longer need manually updating.
 
- Push these changes to remote release branch. 
 
 
- Start all of these builds in Jenkins. 
- Copy the new version’s release notes (copy & paste) into a new blank - Release Notes "X.x.m"(where- X.x.mis the upcoming version) file and clear the contents: Check that all of the merged tickets have also had their release notes merged. Check that the release notes are as understandable as possible.
- Create a released version entry in the releases table (including link to release notes) and commit to master. 
- Update the “Latest Stable Release” and “Upcoming release” links on the IBEX wiki homepage to be the new release and commit to master. 
- If applicable, update the dependencies since the last release and add them to the bottom of the release notes. To find the python dependencies list, run a - pip freezeon a cleanly released- uktena. Note that you will need to specify the scripts directory to run pip commands. i.e.- C:\Instrument\Apps\Python3\Scripts\Pip.exe freeze
- copy the release to the - git$share on- control-svcs(see Keeper for the username and password for this), this is so we can set git remotes for hotfixes etc. as part of the deploy. So if release is number 1.2.3- robocopy "\\isis\inst$\Kits$\CompGroup\ICP\Releases\1.2.3\EPICS\.git" "\\control-svcs.nd.rl.ac.uk\git$\releases\1.2.3\EPICS.git" /mir /nfl /ndl
- edit - EPICS.git\configon the control-svcs version (you can browse straight to the- \\control-svcsshare above)- change - bare = falseto- bare = true
- Add an extra section at end of file 
 
 
[http]
        receivepack = true
- Do the same for the - EPICS3232-bit build, replacing- EPICSwith- EPICS32everywhere in the commands above.
- Check release is now listed in - https://control-svcs.isis.cclrc.ac.uk/git/?a=project_list;pf=releases
Testing
Update \\isis\shares\ISIS_Experiment_Controls_Public\ibex_utils - this is so the most recent install script will be used for testing and install. You should:
- do a - git branchand check it is on- masterand not e.g. a test or ticket branch
- do a - git statusand check for any changes, if there are post on Teams
- do a - git pullso you are on the latest- masterbranch with no local changes
One or more people should do manual system tests, using this page.
Post Testing
These steps should only be done once all changes to a release have been made and we are ready to deploy. Here we are creating a tag which will become inconsistent if further changes are made to the release branch. Hence it is important to delete the relevant release branch after it has been tagged.
- Create a release tag in the EPICS, ibex_gui and uktena repositories. For each repo - Go to - [REPO_URL]/releases, e.g.- https://github.com/ISISComputingGroup/ibex_gui/releases
- Click - Draft a new release
- Enter the tag version in the format - vX.x.pand target the release branch
- Enter the title - Release version X.x.p
- Add a link to the release notes in the description 
- Delete the release branch once the release and tag has been created. 
 
- Create release tag from the release branch for each submodules in EPICS, then delete the release branch. To do this, run the following two git commands in top level EPICS (replace - X.x.xwith the release number):- git submodule foreach --recursive "git fetch && git tag Release_ibex_X.x.x origin/Release_X.x.x || exit 0"// Create tag
- git submodule foreach --recursive "git push origin tag Release_ibex_X.x.x && git push --delete origin Release_X.x.x || exit 0"// Push tags and delete release branch
 - Note: you may need to run - git config fsck.badEmail ignorefor the above step
- Make sure any changes on the release branch are merged back onto master for EPICS, ibex_gui, and uktena (except version numbering) 
- Consider which instruments need this release: - Breaking release: upgrade everyone 
- Big improvement: upgrade everyone if there is a big improvement that everyone will benefit from 
- Standard release: upgrade instruments that need updates, i.e. they need a newly released feature, and all those that are in the current release group, see column in instruments table. Note on the release ticket which instruments need to be released to using checkboxes (one for start and one for finish). 
 
- Create repository for recording instrument changes post release the deploy script automatically puts the instrument onto a branch of this repository 
Partial Release
For any release in which GUI version increments but server version does not, ensure the previous server version is added to the release folder via symbolic links or junctions, see this ticket.
Patch Release
The is a release when a change needs to be made between standard releases; i.e. a standard release is inappropriate because it includes lots of code which has not been through a code freeze and test.
- Follow all Pre Testing steps above except: - For step 4 (creating the release branch) instead of creating from master create it from the latest release tag 
- Update GUI Java JRE 
- Finding the most significant change 
- Updating the MySQL and Java being deployed 
 
- Is the code for the bug/enhancement already written? - No: Make the changes on the branch. 
- Yes: Cherry pick commits needed from the branch with the written code 
 
- Test 
- Release as per a standard release but - Use this branch instead of master 
- Only include the change you have made in the release notes 
- Copy the release notes issues into the development page 
 
- Merge the new code back into master 
Adding late commits to the release Branch for EPICS
- Test and merge the change into master 
- Create a release branch in the submodule (if it doesn’t exist) - Navigate to EPICS in github 
- navigate to the submodule 
- Create new branch (this means it will be branched from the release point) 
 
- Switch the branch of the submodule: - git checkout Release_X.x.m
- Pull the latest release branch: - git pull
- Merge in the ticket - git merge XXX
- push that branch 
- cd to EPICS 
- checkout release branch and pull 
- update submodule reference, commit and push.