Hi Roman, I'm facing exactly the same issue and so far solved it by adding a "commit" String parameter with default value "origin/master" and then running this shell step:
echo "Updating to commit [$commit]" git checkout $commit git log --format=format:[%h]-[%cn]-[%cr]-[%s] -10 TeamCity allows one to choose a commit to build in its Run Custom Build dialog. Then I face an issue of adding this to all 5 jobs we have in a pipeline which starts looking a bit tiresome so I also wonder if other people have solved this problem in a more elegant way. On Friday, March 16, 2012 12:43:26 AM UTC+1, Roman Ovchinnikov wrote: > > Hello! > > I've tried to search myself, but looks like my google-fu is weak. > > I want to know how what is proper way to specify certain git revision to > be built ? I've found how to specify branch via (parameterized option), but > not revision. Trying > git-parameter plugin, but it looks to be too smart - it is getting all > commits and showing them to select from (and for now isn't listing the > latest commits i have, but this is another question i guess). > > The only way for now I've found - is 1) add string param with name like > MYGITREV, 2) in build phase, specify script like "if ! [ -z "$MYGITREV" > ];then git checkout $MYGITREV;fi" . > I can't believe I'm the only one in the world who wants to be able specify > revision, like buildbot's "Force build" option. >