Skip to content

Instantly share code, notes, and snippets.

@matsjoyce
Last active September 5, 2018 12:16
Show Gist options
  • Save matsjoyce/e041ac7ee0384b9500479c86eb98e703 to your computer and use it in GitHub Desktop.
Save matsjoyce/e041ac7ee0384b9500479c86eb98e703 to your computer and use it in GitHub Desktop.

Using the Build System

The following instructions are given using the command line. Equivalent steps can be carried out in many grahical tools, but are given in the command line format to cover all use cases.

Branching

This process describes the branching of a 1.10 branch, with development continuing on a 1.11 branch. Change the numbers as needed.

First, create a release branch:

git checkout -b release/1.10

Push your branch:

git push origin release/1.10

Switch back to master and create a dummy commit for tagging. The reason for this is that the build system bases its version numbers on the last tag visible on the branch it is building. If there is no new tag both branches will build the same version numbers, which will cause the build on one branch to fail with an error.

git checkout master
git commit -m "New dev branch" --allow-empty

Then apply the new tag:

git tag -a release/T1.11.0-0 HEAD -m "Build: None"

And push:

git push --tags

Removing a build

The build being removed in the following instructions is T10.0.0-1. Replace as needed.

First remove the build from herring. Once you have done that, you need to remove the tag applied for that build from the bitbucket server:

git push origin --delete release/T10.0.0-1

You must then remove that tag from all clones of the repo (except build machines, this is done automatically by librelease):

git tag -d release/T10.0.0-1

If you fail to do this last step the tag may be pushed back when someone pushes their new commits, causing the build to reappear.

In Case of Build System Failure

BitBucket or Jenkins goes down:

If either BitBucket or Jenkins goes down the build will have to be created locally. To do so first install the deps needed for building (this varies between projects). Then install librelease for the correct version of python used by your build scripts (use the py3 branch for python3). Ensure your working directory is clean, as the build will remove your changes. Find the git hash you want to build and put it in the GIT_HASH environment variable. Set PACKAGE_LETTER to one of T, S, C, V depnding on the build type. Set UPLOAD_DIR to .. As librelease attempts to sync with the remote server you must set the remote server to be the same as the local one:

git remote set-url origin .

Then run the release script. Warnings will appear but the build should complete and leave the build in the current directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment