Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

pre-build step?

I'm wondering if it is possible to perform any customized pre-build steps (= before loading the files to the filesystem).To be more concrete, when a build is requested, I want to check if there is anything to build for: does the build-stream/-workspace contain any changes compared to the previous build.


Regards,
Bernd.

0 votes



4 answers

Permanent link
To do operations before the load, you would turn off the "load"
parameter in the build, and then do the load via the RTC SCM command
line at the appropriate time in the build script.

Cheers,
Geoff

On 12/8/2010 8:38 AM, berndyman wrote:
I'm wondering if it is possible to perform any customized pre-build
steps (= before loading the files to the filesystem).To be more
concrete, when a build is requested, I want to check if there is
anything to build for: does the build-stream/-workspace contain any
changes compared to the previous build.


Regards,
Bernd.

0 votes


Permanent link
I see what you mean. However, I prefer to build on a stream and SCM LOAD doesn't support this (only repository workspace) ...
Are there any plans to implement and allow configuration of pre-build steps (e.g. execution of ant-script) through the user interface?

A use-case could also be: prepare the environment for JUnit, for instance load the testdata in a database. If this is not possible for one reason or another, the build should be stopped and there is no use to load anything to the filesystem.

Regards,
Bernd.

To do operations before the load, you would turn off the "load"
parameter in the build, and then do the load via the RTC SCM command
line at the appropriate time in the build script.

Cheers,
Geoff

On 12/8/2010 8:38 AM, berndyman wrote:
I'm wondering if it is possible to perform any customized pre-build
steps (= before loading the files to the filesystem).To be more
concrete, when a build is requested, I want to check if there is
anything to build for: does the build-stream/-workspace contain any
changes compared to the previous build.


Regards,
Bernd.

0 votes


Permanent link
I'm not aware of any plans to support configuration of pre-build steps,
but you should feel free to submit a work item request (remember to use
"find potential duplicates" to see if there might already be such a
submission).

Just for interest's sake, why do you prefer to build on a stream?

Cheers,
Geoff

On 12/9/2010 3:08 AM, berndyman wrote:
I see what you mean. However, I prefer to build on a stream and SCM
LOAD doesn't support this (only repository workspace) ...
Are there any plans to implement and allow configuration of pre-build
steps (e.g. execution of ant-script) through the user interface?

Regards,
Bernd.

gmclemmwrote:
To do operations before the load, you would turn off the
"load"
parameter in the build, and then do the load via the RTC SCM command

line at the appropriate time in the build script.

Cheers,
Geoff

On 12/8/2010 8:38 AM, berndyman wrote:
I'm wondering if it is possible to perform any customized pre-build
steps (= before loading the files to the filesystem).To be more
concrete, when a build is requested, I want to check if there is
anything to build for: does the build-stream/-workspace contain any
changes compared to the previous build.


Regards,
Bernd.

0 votes


Permanent link
The recommended way to build only if there are changes in the stream is to configure the build definition with a dedicated build workspace, and check both 'Accept latest changes before building' and 'Build only if there are changes accepted'.

Arbitrary preconditions are not currently well supported (see the existing enhancement request 69934: Generic pre-build participant support.

As an alternative, you could do a mix of the above and what Geoff suggests. For example:
- configure a dedicated build workspace, optionally choosing the other options above (if you don't want it to proceed at all if there are no source changes)
- set the build definition to load only the component containing the build script (by excluding all the others)
- in the build script, check the other preconditions
- if they don't pass, then just exit the script
- if they do, then do the rest of the load using the SCM CLI, or perhaps the teamFetch Ant task.

Note that building directly against a stream is not recommended. If the accept option is turned on, that can cause your stream's contents to get replaced with content from its flow target (if it has one), which isn't usually what you want. You also lose traceability, e.g. of links to work items with changes in the build. Using a build workspace also gives the build isolation from ongoing changes in the stream. For more details see:
https://jazz.net/wiki/bin/view/Main/BuildFAQ#LoadingJazzSCM

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Dec 08 '10, 8:26 a.m.

Question was seen: 5,557 times

Last updated: Dec 08 '10, 8:26 a.m.

Confirmation Cancel Confirm