[Anthill-pro] Best way to implement this?
emerson cargnin
echofloripa.yell at gmail.com
Mon Jun 16 11:01:34 CDT 2008
I have other cases that I need to run a workflow in an environment
which doesn't depend at all in having a build life ready.
So far I was using an existing build life to run these workflows, but
as they are growing in numbers I see the need to actually have a
independent secondary workflow, or a why to easily populate the
primary workflow with all environment options dinamically which would
be used by secundary workflows...
It would be cool if there was the option to have a utilitary secondary
workflows, that could be run independent of primary workflows. It
would also be a primary workflow which could be run in deployment
agents.
Thanks
Emerson
On 06/06/2008, Eric Minick <etm at urbancode.com> wrote:
> Why not a single "Restart the app servers" project that contains a
> seperate originating workflow per environment - all calling the same
> job?
>
> -- Eric
>
> On Fri, Jun 6, 2008 at 3:54 AM, emerson cargnin
> <echofloripa.yell at gmail.com> wrote:
> > I need to implement a workflow that will stop and restart our webserver (resin)
> >
> > At this moment I have it as part of the deployment workflow, so that
> > it stop before the deployment and starts afterwards.
> >
> > Now I need to have it also separated so that support could
> > start/stop/restart resin directly without deploying anything.
> >
> > This should be a originating workflow as it doesn't depend on any
> > artifact, it just connects to the agent and restarts resin.
> >
> > The thing is that as an originating workflow can't run in multiple
> > environments, just one.
> >
> > It would be interesting to have the possibility to run a secondary
> > workflow without a primary one in special cases like this.
> >
> > So I thought in having a step in my originating workflow that would
> > call a script that would get the secondary workflow, get the
> > environment property and set as the server group of my secondary
> > workflow, and then run it for the current buildlife.
> >
> > I researched and i found how to get the secondary workflow and set the
> > environment:
> > -----------------------------------------------
> > Workflow resinStart =
> > WorkflowLookup.getForProjectAndName(ProjectLookup.getCurrent(),"resinStart");
> > String env = PropertyLookup.getValue("environment");
> > EnvironmentGroup envGroup =
> > EnvironmentGroupFactory.getInstance().restoreForName("Default
> > Environment Group");
> > ServerGroup[] serverGroups = envGroup.getServerGroupArray();
> > for (int sg=0; sg<serverGroups.length; sg++) {
> > if (env.equals(serverGroups[sg].getName())){
> > resinStart.addServerGroup(serverGroups[sg]);
> > break;
> > }
> > }
> > ----------------------------------------------
> >
> > But I think that what I really need is to get the current BuildLife
> > and execute a secondary workflow on it. I then get:
> >
> > BuildLife buildLife = BuildLifeLookup.getCurrent();
> >
> >
> > I will probably have to mix the first script with the current build
> > life, but I can't find how. Could someone give me a hint on this?
> >
> > Thank you
> > Emerson
> > _______________________________________________
> > Anthill-pro mailing list
> > Anthill-pro at lists.urbancode.com
> > http://lists.urbancode.com/mailman/listinfo/anthill-pro
> >
> _______________________________________________
> Anthill-pro mailing list
> Anthill-pro at lists.urbancode.com
> http://lists.urbancode.com/mailman/listinfo/anthill-pro
>
More information about the Anthill-pro
mailing list