This repository uses tito to make building and tracking revisions easy.
For more information on tito, please see the Tito home page
To build the python-openshift-tools-* and openshift-tools-* rpms, we use Tito
Tito makes several assumptions that aren’t 100% compatible with the github workflow.
-
Tito uses tags to keep track of revisions. You can’t create a PR for tags in github, so you have to push them directly to the upstream repo.
-
Tito calls the upstream repo
origin
, whereas we call our own fork of the upstream repoorigin
. This is very confusing because tito will output git commands to run againstorigin
.
So, in order to keep everything straight, the recommended setup when using tito is to setup a git repo structure specifically for tito, and only use it for tito related activities.
-
Create a place to house the tito setup
[user@desktop]$ mkdir -p ~/tito ~/.tito-build
-
Go into the new place:
[user@desktop]$ cd ~/tito
-
Clone the openshift-tools repo:
[user@desktop]$ git clone [email protected]:openshift/openshift-tools.git
-
Change directory into the openshift_tools directory (this is where the spec file is):
[user@desktop]$ cd ~/tito/openshift-tools/openshift_tools
-
Do a test build using tito:
[user@desktop]$ time tito build --test --rpm --output "$HOME/.tito-build"
-
Output should look something like this:
Building package [python-openshift-tools-0.0.6-1] Wrote: /tmp/tito/python-openshift-tools-git-0.88fc030.tar.gz [... snip ...] Successfully built: /tmp/tito/python-openshift-tools-0.0.6-1.git.0.88fc030.el6.src.rpm /tmp/tito/noarch/python-openshift-tools-0.0.6-1.git.0.88fc030.el6.noarch.rpm /tmp/tito/noarch/python-openshift-tools-monitoring-0.0.6-1.git.0.88fc030.el6.noarch.rpm /tmp/tito/noarch/python-openshift-tools-web-0.0.6-1.git.0.88fc030.el6.noarch.rpm real 0m3.311s user 0m1.159s sys 0m1.896s [user@desktop]$
-
Change into openshift-tools/openshift_tools directory
cd ~/tito/openshift-tools/openshift_tools
-
Get the latest code
git pull
-
Get the latest tags
git fetch --tags
-
Build test packages (no tagging needed)
time tito build --test --rpm --output "$HOME/.tito-build"
-
OPTIONAL: If a new version of the package is needed, follow these instructions:
-
Tag a new build (bumps version number and adds log entries)
tito tag
# Something like this (copy it from the tito output): git push && git push origin package-name-and-new-VERSION
-
Follow the on screen tito instructions to push the tags
-
-
Build new packages based on the latest tag information
time tito build --rpm --output "$HOME/.tito-build"
-
Change into openshift-tools/scripts directory
cd ~/tito/openshift-tools/scripts
-
Get the latest code
git pull
-
Get the latest tags
git fetch --tags
-
Build test packages (no tagging needed)
time tito build --test --rpm --output "$HOME/.tito-build"
-
OPTIONAL: If a new version of the package is needed, follow these instructions:
-
Tag a new build (bumps version number and adds log entries)
tito tag
-
Follow the on screen tito instructions to push the tags
# Something like this (copy it from the tito output): git push && git push origin package-name-and-new-VERSION
-
-
Build new packages based on the latest tag information
time tito build --rpm --output "$HOME/.tito-build"
-
Change into openshift-tools/web directory
cd ~/tito/openshift-tools/web
-
Get the latest code
git pull
-
Get the latest tags
git fetch --tags
-
Build test packages (no tagging needed)
time tito build --test --rpm --output "$HOME/.tito-build"
-
OPTIONAL: If a new version of the package is needed, follow these instructions:
-
Tag a new build (bumps version number and adds log entries)
tito tag
-
Follow the on screen tito instructions to push the tags
# Something like this (copy it from the tito output): git push && git push origin package-name-and-new-VERSION
-
-
Build new packages based on the latest tag information
time tito build --rpm --output "$HOME/.tito-build"