Planning of a single build
Hi, is there a way to plan a single build. In my case I'd like to have my user to plan a deploy (made using ant deploy task, and so, a build definition) for a specific hour (for example during the night) and I can't use schedule because it is based on presence of new change-set and in my case it could be change-set but user can have not decided to deploy it yet.
Alternatively is possible to have a precondition running on a scheduled launch of a build? I've tried with Request Build operation pre-condition but it only applies on user request and not schedule request.
Any answer will be appreciated.
Alternatively is possible to have a precondition running on a scheduled launch of a build? I've tried with Request Build operation pre-condition but it only applies on user request and not schedule request.
Any answer will be appreciated.
9 answers
The schedule is based on the presence of a new change-set only if the
build definition has "Build only if there are changes accepted" selected
in the Jazz Source Control page. So if you want to unconditionally run
the build, just de-select that option.
Cheers,
Geoff
mikyjpeg wrote:
build definition has "Build only if there are changes accepted" selected
in the Jazz Source Control page. So if you want to unconditionally run
the build, just de-select that option.
Cheers,
Geoff
mikyjpeg wrote:
Hi, is there a way to plan a single build. In my case I'd like to have
my user to plan a deploy (made using ant deploy task, and so, a build
definition) for a specific hour (for example during the night) and I
can't use schedule because it is based on presence of new change-set
and in my case it could be change-set but user can have not decided
to deploy it yet.
Alternatively is possible to have a precondition running on a
scheduled launch of a build? I've tried with Request Build operation
pre-condition but it only applies on user request and not schedule
request.
Any answer will be appreciated.
Thank you for the answers.
I'm trying to create the following configuration:
I have a stream on which I delivery my change-set. This change-set is related to a work-item called RU (release unit). This work-item could be related to another work-item type called TechnicalActivity which contains information and attachment to use in case of system activity to be done before deploy. I would like to permit the build only if linked TechnicalActivities are closed. And this is why I'd like to put a precondition on my build operation.
For the first answer, the case is if I can't use pre-condition and so I have to manually launch build after TecnicalActivities are completed. But I want that technical user can "authorize" a build that will run during the night and not at the moment of the request.
I hope this could be quite clear as description of my case.
I'm trying to create the following configuration:
I have a stream on which I delivery my change-set. This change-set is related to a work-item called RU (release unit). This work-item could be related to another work-item type called TechnicalActivity which contains information and attachment to use in case of system activity to be done before deploy. I would like to permit the build only if linked TechnicalActivities are closed. And this is why I'd like to put a precondition on my build operation.
For the first answer, the case is if I can't use pre-condition and so I have to manually launch build after TecnicalActivities are completed. But I want that technical user can "authorize" a build that will run during the night and not at the moment of the request.
I hope this could be quite clear as description of my case.
Thanks for the extra details. Unfortunately it's not possible to do these kinds of advanced checks out-of-the-box, but it would be possible to implement either a Process precondition (which could control manually requested builds, but not automatically-scheduled ones), or a pre-build participant in the build.
Jazz SCM is a good example of a pre-build participant: if the user has configured it as such, it checks whether there are any changes to accept, and if none it simply deletes the build.
Jazz SCM is a good example of a pre-build participant: if the user has configured it as such, it checks whether there are any changes to accept, and if none it simply deletes the build.
Thanks for the extra details. Unfortunately it's not possible to do these kinds of advanced checks out-of-the-box, but it would be possible to implement either a Process precondition (which could control manually requested builds, but not automatically-scheduled ones), or a pre-build participant in the build.
Jazz SCM is a good example of a pre-build participant: if the user has configured it as such, it checks whether there are any changes to accept, and if none it simply deletes the build.
Thank you for the answer. I don't think to have problem on writing pre-condition (I've already done someones), the only point is that if I cannot use it on schedules builds I really don't know how to run a build during the night....
Some ideas on how can I do it in other way?
One option would be to use a cron job to have your build script run at a specific time, and let that trigger the build instead of having jbe poll for a request.
To clarify: normally jbe fetches the next build request, starts it, runs the script, then completes the build. But it's possible for your script to do all of this itself.
See the getNextTeamBuildRequest, startTeamBuild, and completeTeamBuild tasks in the Jazz build Ant task reference help topic (available online here: http://publib.boulder.ibm.com/infocenter/rtc/v2r0m0/topic/com.ibm.team.build.doc/topics/r_ant-tasks.html)
Alternatively, you could have a separate script submit the build request at the time you want (rather than doing so manually, or using the regular scheduling support), then have jbe pick this up as usual. See the requestTeamBuild task for this.
To clarify: normally jbe fetches the next build request, starts it, runs the script, then completes the build. But it's possible for your script to do all of this itself.
See the getNextTeamBuildRequest, startTeamBuild, and completeTeamBuild tasks in the Jazz build Ant task reference help topic (available online here: http://publib.boulder.ibm.com/infocenter/rtc/v2r0m0/topic/com.ibm.team.build.doc/topics/r_ant-tasks.html)
Alternatively, you could have a separate script submit the build request at the time you want (rather than doing so manually, or using the regular scheduling support), then have jbe pick this up as usual. See the requestTeamBuild task for this.