Re: building certain git revision

2012-12-07 Thread Evgeny Goldin
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:



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.



-
Best regards,
Evgeny
http://evgeny-goldin.com/

--
View this message in context: 
http://jenkins.361315.n4.nabble.com/building-certain-git-revision-tp4476761p4648444.html
Sent from the Jenkins users mailing list archive at Nabble.com.


Re: building certain git revision

2012-12-07 Thread Evgeny Goldin
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.
>


building certain git revision

2012-03-15 Thread Roman Ovchinnikov
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.