Executing ANT tasks before Build System fetch code from SCM
Is there any way to insert the execution of ANT tasks before the
built-in fetch tasks are executed? I need to do automatically some
delivers before that...
I understand I will have to disable the built-in fetch support and do it
myself, right? But I would like to be sure before that, that there is no
other solutions.
Thanks in advance,
Chemi.
built-in fetch tasks are executed? I need to do automatically some
delivers before that...
I understand I will have to disable the built-in fetch support and do it
myself, right? But I would like to be sure before that, that there is no
other solutions.
Thanks in advance,
Chemi.
2 answers
Chemi wrote:
Not that I know of.
That's what you'll have to do. All of the accept/fetch work that the
build engine does before starting the build can be done by the build
script using the Ant tasks in the build toolkit (except for canceling
the build if there are no changes to accept).
Is there any way to insert the execution of ANT tasks before the
built-in fetch tasks are executed? I need to do automatically some
delivers before that...
Not that I know of.
I understand I will have to disable the built-in fetch support and do
it myself, right? But I would like to be sure before that, that there
is no other solutions.
That's what you'll have to do. All of the accept/fetch work that the
build engine does before starting the build can be done by the build
script using the Ant tasks in the build toolkit (except for canceling
the build if there are no changes to accept).
David is correct. You can use the teamAccept and teamFetch Ant tasks, but since this precludes doing the pre-build check for whether there are changes to accept, you will lose the feature whereby scheduled builds get discarded if there are no new changes to accept.
The teamAccept task can, however, indicate whether changes were accepted via the changesAcceptedProperty attribute, so you could check this and avoid extra work. If no changes are accepted, the given property is unset (which is consistent with how Ant handles conditional targets; see the Targets section at http://ant.apache.org/manual/using.html).
See also 69934: Generic pre-build participant support.
The teamAccept task can, however, indicate whether changes were accepted via the changesAcceptedProperty attribute, so you could check this and avoid extra work. If no changes are accepted, the given property is unset (which is consistent with how Ant handles conditional targets; see the Targets section at http://ant.apache.org/manual/using.html).
See also 69934: Generic pre-build participant support.