workspace structure

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

workspace structure

sakkew
Is it possible to change the way Hudson creates the workspace
structure? The problem is that our build files have relative paths to
each other. This works fine in Luntbuild, since I can define that I
want to check out my projects to the root. Here's an example:

(shared_project is used by other projects)

Luntbuild workspace:
project1
shared_project

Hudson workspace:
jobs/
  project1/workspace/project1
  shared_project/workspace/shared_project


If this is not possible, I have to give the directory locations as
parameters to ANT, so here's another question:

Is there a way to add own environment variables?
It is hard work to configure the same ANT properties for each job. It
would simplify dramatically if I could define environment properties
in Hudson and give them as parameters to ANT:

Build/Targets:
-Dsys.dir=${SYSTEM_DIR}


cheers,
Sakke Wiik

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: workspace structure

Wolfram Kroll-2
Sakke Wiik schrieb:

> Is it possible to change the way Hudson creates the workspace
> structure? The problem is that our build files have relative paths to
> each other. This works fine in Luntbuild, since I can define that I
> want to check out my projects to the root. Here's an example:
>
> (shared_project is used by other projects)
>
> Luntbuild workspace:
> project1
> shared_project
>
> Hudson workspace:
> jobs/
>  project1/workspace/project1
>  shared_project/workspace/shared_project
>

I think you could use URLs and wget or a similar command to access files
in other workspaces. If you have a master/slave environment the file
system paths wouldn't work anyway.

Wolfram

>
> If this is not possible, I have to give the directory locations as
> parameters to ANT, so here's another question:
>
> Is there a way to add own environment variables?
> It is hard work to configure the same ANT properties for each job. It
> would simplify dramatically if I could define environment properties
> in Hudson and give them as parameters to ANT:
>
> Build/Targets:
> -Dsys.dir=${SYSTEM_DIR}
>
>
> cheers,
> Sakke Wiik
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: workspace structure

Kohsuke Kawaguchi-2
In reply to this post by sakkew
Sakke Wiik wrote:

> Is it possible to change the way Hudson creates the workspace
> structure? The problem is that our build files have relative paths to
> each other. This works fine in Luntbuild, since I can define that I
> want to check out my projects to the root. Here's an example:
>
> (shared_project is used by other projects)
>
> Luntbuild workspace:
> project1
> shared_project
>
> Hudson workspace:
> jobs/
>   project1/workspace/project1
>   shared_project/workspace/shared_project
It's hard to make this configurable, and so I'm not really planning it.


> If this is not possible, I have to give the directory locations as
> parameters to ANT, so here's another question:
>
> Is there a way to add own environment variables?
> It is hard work to configure the same ANT properties for each job. It
> would simplify dramatically if I could define environment properties
> in Hudson and give them as parameters to ANT:
>
> Build/Targets:
> -Dsys.dir=${SYSTEM_DIR}
If you want to add environment variables, then you'd have to use the
shell to launch Ant. Not a big deal, and I do that fairly often, too.

But it sounds like what you are asking is to pass in properties to Ant,
which is also doable. See the help of the Ant configuration part of the
project config.


--
Kohsuke Kawaguchi
Sun Microsystems                   [hidden email]

smime.p7s (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: workspace structure

Kohsuke Kawaguchi-2
In reply to this post by Wolfram Kroll-2
Wolfram Kroll wrote:
> I think you could use URLs and wget or a similar command to access files
> in other workspaces. If you have a master/slave environment the file
> system paths wouldn't work anyway.

Yeah, if it's just a few files, wget is better.

--
Kohsuke Kawaguchi
Sun Microsystems                   [hidden email]

smime.p7s (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: workspace structure

sakkew
In reply to this post by Kohsuke Kawaguchi-2
On 1/19/07, Kohsuke Kawaguchi <[hidden email]> wrote:
> But it sounds like what you are asking is to pass in properties to Ant,
> which is also doable. See the help of the Ant configuration part of the
> project config.
>
Yes, I want to pass in properties to Ant, but I would like to define
these properties in a way that I don't need to define them in every
job.
Example:
Instead of doing this: "ant target
-Ddatabase-src.dir=<hudson_dir>/jobs/database/workspace/database/src"
in every build, I could define database-src.dir in for example system
configuration. Then I would need to define the path in just one place,
and pass it to ANT like this -Ddatabase-src.dir=${DATABASE_SRC_DIR}.

I know I can do this with environment variables, but in my case it is
not possible.


cheers,
Sakke Wiik

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: workspace structure

Kohsuke Kawaguchi-2
Sakke Wiik wrote:

> On 1/19/07, Kohsuke Kawaguchi <[hidden email]> wrote:
>> But it sounds like what you are asking is to pass in properties to Ant,
>> which is also doable. See the help of the Ant configuration part of the
>> project config.
>>
> Yes, I want to pass in properties to Ant, but I would like to define
> these properties in a way that I don't need to define them in every
> job.
> Example:
> Instead of doing this: "ant target
> -Ddatabase-src.dir=<hudson_dir>/jobs/database/workspace/database/src"
> in every build, I could define database-src.dir in for example system
> configuration. Then I would need to define the path in just one place,
> and pass it to ANT like this -Ddatabase-src.dir=${DATABASE_SRC_DIR}.
>
> I know I can do this with environment variables, but in my case it is
> not possible.
I see. Can you file this in the issue tracker?


--
Kohsuke Kawaguchi
Sun Microsystems                   [hidden email]

smime.p7s (4K) Download Attachment