It's all about the answers!

Ask a question

Change class of a project on the fly


Matt Wietlisbach (1145) | asked Dec 14 '10, 10:20 a.m.
We have a situation where we have 1 Build Forge project per UCM project in ClearCase. The user selects various info on start page, one being the stream. Based on these selections the Build will behave differently.

We need the ability to set the class for the job based on that selection. Basically if the build is run on INT stream we use one class and if it is on any other stream we use another. I looked at the dot commands and did not find anything. Does anyone have a solution for this?

Thanks in advance for help

Matt

3 answers



permanent link
Robert haig (1.0k16) | answered Dec 14 '10, 11:22 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
We have a situation where we have 1 Build Forge project per UCM project in ClearCase. The user selects various info on start page, one being the stream. Based on these selections the Build will behave differently.

We need the ability to set the class for the job based on that selection. Basically if the build is run on INT stream we use one class and if it is on any other stream we use another. I looked at the dot commands and did not find anything. Does anyone have a solution for this?

Thanks in advance for help

Matt

you can change the class on build start, but not during the build run.

I can think of two ways to accomplish this off the top of my head. There may be more or better ways.

1) create a wrapper project that would fire a build based on it's environment. It would have the same information for your other projects, but it would run a program that would make API calls to start a new build.

2) create a custom front-end that would set the class of the build based on one of the other options selected. That front end would make the same API calls referenced in the first solution possibility in order to fire the new build.

permanent link
Matt Wietlisbach (1145) | answered Dec 14 '10, 11:29 a.m.
We have a situation where we have 1 Build Forge project per UCM project in ClearCase. The user selects various info on start page, one being the stream. Based on these selections the Build will behave differently.

We need the ability to set the class for the job based on that selection. Basically if the build is run on INT stream we use one class and if it is on any other stream we use another. I looked at the dot commands and did not find anything. Does anyone have a solution for this?

Thanks in advance for help

Matt

you can change the class on build start, but not during the build run.

I can think of two ways to accomplish this off the top of my head. There may be more or better ways.

1) create a wrapper project that would fire a build based on it's environment. It would have the same information for your other projects, but it would run a program that would make API calls to start a new build.

2) create a custom front-end that would set the class of the build based on one of the other options selected. That front end would make the same API calls referenced in the first solution possibility in order to fire the new build.


I understand exactly what you are saying but to front end 300+ projects seems like allot of work. I am wondering if I could use that API idea to search for jobs with certain names and then change the class that way. Could have a BF project run weekly to run that scan and update and then the purge process would purge all the DEV jobs based on the class change.

Something good to think about.

Thanks

permanent link
Robert haig (1.0k16) | answered Dec 14 '10, 3:07 p.m.
FORUM MODERATOR / JAZZ DEVELOPER
If what you want is the class changed after it was run, then you could even go as far as to have something scan jobs that have run since the last time it ran (keep a date stamp stored somewhere) and look for an env var set to a certain value (no need to limit yourself to the build name or tag).

For that matter, you could execute this in a chain from the end of the project (would have to be a chain to let the parent complete before modifying the class).

I think the API prog to scan the completed builds might be a better choice for you though. I thought you were wanting the class changed at execution time.

Your answer


Register or 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.