Thanks! the ace.gogo.script works for me and I need the gogo commands provided by ACE anyway.
2014/1/11 Marcel Offermans <[email protected]> > Hello Bram, > > On 11 Jan 2014, at 18:12 pm, Bram Pouwelse <[email protected]> wrote: > > > I've created a Jira issue [1] containing steps to reproduce the > > deploymentversionlimit. > > Thanks, I'll look into that. > > > I've also worked on a deployment script [2] to replace my current > > deployment process that uses the ContinousDeployer that comes with Ace. > > I've used one of the scripts you've shared earlier so thanks for sharing > > that made my life a lot easier ;). I've added some code to create the > > sourcerepo and features based on a bndrun file from a (bnd)tools project. > > > > I've tested this on my dev machine by running the script from the gogo > > shell in the ace client how can I start a gosh script without user > > interaction from my CI build environment? > > Gogo has the notion of a "startup script" so what we do is simply put a > script with the right name in the right location and then startup the > client. The script itself will stop the client again as soon as it's done. > > From the gogo project: > > # default gosh_profile > # only read if etc/gosh_profile doesn't exist relative to the System > property > # gosh.home or failing that the current directory. > > # catch all exceptions from this script to avoid it aborting startup > try { > > # ensure gogo commands are found first > SCOPE = gogo:* > > # add methods on BundleContext object as commands > #addcommand context ${.context} (${.context} class) > # bug: above invokes (String, Object, String) instead of (String, > Object, Class) > addcommand context ${.context} > > # add methods on System object as commands > addcommand system (((${.context} bundles) 0) loadclass java.lang.System) > > # alias to print full stack trace > e = { $exception printStackTrace } > > ## disable console auto-formatting of each result > # you will then need to explicitly use the 'format' command > # to print the result of commands that don't write to stdout. > #.Gogo.format = false > > ## disable printing the formatted result of a command into pipelines > #.Format.Pipe = false > > # set prompt > prompt = 'g! ' > > # print welcome message > cat ($0 resolve motd) > } { > echo "$0: ERROR: $exception" > } > > # end > > > As you can see, just add a script to etc/gosh_profile and you're good to > go. However, when you do this, you will run into a small issue: the script > will run as soon as the gogo bundles start, which might be before the whole > framework has been started (including other shell commands). > > So, we added a small feature to ACE that allows you to launch a script: > * Set a system property called "ace.gogo.script" and point it to the > script you want to run. > * Set a system property called "ace.gogo.script.delay" if the default > startup delay of 300ms does not work for you. > > Then you don't need etc/gosh_profile anymore, but you do need the gogo > commands that ACE provides. > > Hope this helps! > > Greetings, Marcel > >
