Using the promote builds plugin to tag subversion repository.

309 views
Skip to first unread message

Mark Kharitonov

unread,
May 30, 2011, 3:59:55 AM5/30/11
to Jenkins Users
We have a task which builds based on data from 4 different SVN
repositories.
I want to allow QA promote a build, so that the revisions
participating in the build are tagged with the build number and some
optional label.

I have encountered the following problem - the promoted build may not
be the most recent build. How do I know the SVN revision of each of
the four repositories used during that build? I know that each build
has this information in the revision.txt file, but how does it become
available in the context of promotion?

Thanks.

Mark Kharitonov

unread,
May 31, 2011, 10:35:31 AM5/31/11
to Jenkins Users
Anyone?

Pete

unread,
May 31, 2011, 9:26:57 PM5/31/11
to jenkins...@googlegroups.com
I do not see any code to pass through the SVN revision as a variable
available to the promotion actions. Maybe you could leverage the
PROMOTED_URL variable to call a remote API of the build to acquire the
SVN revision? I haven't tried this myself.

mark Kharitonov

unread,
Jun 23, 2011, 3:16:18 AM6/23/11
to jenkins...@googlegroups.com
Here is the value of PROMOTED_URL - http://dev-builder:8080/jenkins/job/Test/1/
Do you mean I should GET it and extract the revision information from the HTML output?
There must be a better way.

dreamtime

unread,
Jun 27, 2011, 7:15:15 AM6/27/11
to Jenkins Users
Have a look at http://dev-builder:8080/jenkins/job/Test/1/api/
Jenkins has different apis to allow plugins to read job specific
values like the ones you want.
For example the xml api (available as an xml file under
http://dev-builder:8080/jenkins/job/Test/1/api/xml) has <revision>-
tags for every scm-module with the path to the repository and the
revision number.

On 23 Juni, 09:16, mark Kharitonov <mark.kharito...@gmail.com> wrote:
> Here is the value of PROMOTED_URL -http://dev-builder:8080/jenkins/job/Test/1/

mark Kharitonov

unread,
Aug 29, 2011, 5:42:33 AM8/29/11
to jenkins...@googlegroups.com
Thanks for the information. I did not know about the api urls. I will look into it.
Reply all
Reply to author
Forward
0 new messages