Perforce plugin problem?

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

Perforce plugin problem?

Brent Ryan-2
I'm using the perforce plugin and if I have a perforce user 'hudson' pointed to a default workspace of /home

And then I have a hudson project that has a workspace (client) that has a default directory of /home/administrator/.hudson/jobs/projectName/workspace/

Then Hudson will not sync the files to /home/administrator/.hudson/jobs/projectName/workspace/

It only syncs the files of the default workspace for files in /home.

Is there anyway to fix this?

--
Brent Ryan
Reply | Threaded
Open this post in threaded view
|

RE: Perforce plugin problem?

bwestrich
Ryan,

Could you post the two p4 clientspecs, as well as the location of the
file that is not synching?  One way to generate a text description of
a Perforce workspace is:

c:\> p4 client my_client_name

which yields something like this....


Client: Brian-mcwest5-testhudson-testfw

Update: 2007/10/28 14:45:55

Access: 2007/10/29 22:09:04

Owner: Brian

Host: mcwest5

Description:
        Created by Brian.

Root: C:\Documents and Settings\Brian\.hudson\jobs\testfw\workspace\

Options: noallwrite noclobber nocompress unlocked nomodtime normdir

SubmitOptions: submitunchanged

LineEnd: local

View:
        //testfw/... //Brian-mcwest5-testhudson-testfw/...


---------- Forwarded message ----------
From: "Brent Ryan" <[hidden email]>
To:
Date: Mon, 29 Oct 2007 07:31:53 -0700
Subject: Perforce plugin problem?
I'm using the perforce plugin and if I have a perforce user 'hudson'
pointed to a default workspace of /home

And then I have a hudson project that has a workspace (client) that
has a default directory of
/home/administrator/.hudson/jobs/projectName/workspace/

Then Hudson will not sync the files to
/home/administrator/.hudson/jobs/projectName/workspace/

It only syncs the files of the default workspace for files in /home.

Is there anyway to fix this?

--
Brent Ryan

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

Reply | Threaded
Open this post in threaded view
|

Re: Perforce plugin problem?

Brent Ryan-2
Yes.  There is a daemon perforce user called DevelopmentSystem logged in at all times on our Linux build box that has a default workspace named "phx-build".

Here's what it looks like:

# A Perforce Client Specification.
#
#  Client:      The client name.
#  Update:      The date this specification was last modified.
#  Access:      The date this client was last used in any way.
#  Owner:       The user who created this client.
#  Host:        If set, restricts access to the named host.
#  Description: A short description of the client (optional).
#  Root:        The base directory of the client workspace.
#  AltRoots:    Up to two alternate client workspace roots.
#  Options:     Client options:
#                      [no]allwrite [no]clobber [no]compress
#                      [un]locked [no]modtime [no]rmdir
#  SubmitOptions:
#                      submitunchanged/submitunchanged+reopen
#                      revertunchanged/revertunchanged+reopen
#                      leaveunchanged/leaveunchanged+reopen
#  LineEnd:     Text file line endings on client: local/unix/mac/win/share.
#  View:        Lines to map depot files into the client workspace.
#
# Use 'p4 help client' to see more about client views and options.

Client: phx-build

Update: 2007/10/29 10:02:40

Access: 2007/10/30 06:47:44

Owner:  DevelopmentSystem

Host:   phx-build

Description:
        Created by rfidler.

Root:   /home/administrator/perforce

Options:        noallwrite noclobber nocompress unlocked nomodtime rmdir

SubmitOptions:  submitunchanged

LineEnd:        local

View:
        //depot/... //phx-build/depot/...

In Hudson, I configure my Maven 2 project to use perforce with the DevelopmentSystem user and a client workspace of tautilities-hudson which looks like this:

# A Perforce Client Specification.
#
#  Client:      The client name.
#  Update:      The date this specification was last modified.
#  Access:      The date this client was last used in any way.
#  Owner:       The user who created this client.
#  Host:        If set, restricts access to the named host.
#  Description: A short description of the client (optional).
#  Root:        The base directory of the client workspace.
#  AltRoots:    Up to two alternate client workspace roots.
#  Options:     Client options:
#                      [no]allwrite [no]clobber [no]compress
#                      [un]locked [no]modtime [no]rmdir
#  SubmitOptions:
#                      submitunchanged/submitunchanged+reopen
#                      revertunchanged/revertunchanged+reopen
#                      leaveunchanged/leaveunchanged+reopen
#  LineEnd:     Text file line endings on client: local/unix/mac/win/share.
#  View:        Lines to map depot files into the client workspace.
#
# Use 'p4 help client' to see more about client views and options.

Client: tautilities-hudson

Update: 2007/10/29 13:35:27

Access: 2007/10/29 06:55:33

Owner:  DevelopmentSystem

Host:   phx-build

Description:
        Created by DevelopmentSystem.

Root:   /home/administrator/.hudson/jobs/TAUtilities_1.2_DEV/workspace/

Options:        noallwrite noclobber nocompress unlocked nomodtime normdir

SubmitOptions:  submitunchanged

LineEnd:        local

View:
        //depot/Library/TAUtilities_1.2_DEV/... //tautilities-hudson/...


When Hudson goes to sync the files for the project I setup, it looks like it pulls the files into the phx-build workspace and not the tautilities-hudson workspace that I configured the project for.  Then, when Hudson goes to build the project, there is no pom.xml file in the exected /home/administrator/.hudson/jobs/TAUtilities_1.2_DEV/workspace/ directory.



Am I doing something wrong here?


Thanks,
Brent

On Oct 29, 2007 10:15 PM, Brian Westrich <[hidden email]> wrote:
Ryan,

Could you post the two p4 clientspecs, as well as the location of the
file that is not synching?  One way to generate a text description of
a Perforce workspace is:

c:\> p4 client my_client_name

which yields something like this....


Client: Brian-mcwest5-testhudson-testfw

Update: 2007/10/28 14:45:55

Access: 2007/10/29 22:09:04

Owner:  Brian

Host:   mcwest5

Description:
       Created by Brian.

Root:   C:\Documents and Settings\Brian\.hudson\jobs\testfw\workspace\

Options:        noallwrite noclobber nocompress unlocked nomodtime normdir

SubmitOptions:  submitunchanged

LineEnd:        local

View:
       //testfw/... //Brian-mcwest5-testhudson-testfw/...


---------- Forwarded message ----------
From: "Brent Ryan" < [hidden email]>
To:
Date: Mon, 29 Oct 2007 07:31:53 -0700
Subject: Perforce plugin problem?
I'm using the perforce plugin and if I have a perforce user 'hudson'
pointed to a default workspace of /home

And then I have a hudson project that has a workspace (client) that
has a default directory of
/home/administrator/.hudson/jobs/projectName/workspace/

Then Hudson will not sync the files to
/home/administrator/.hudson/jobs/projectName/workspace/

It only syncs the files of the default workspace for files in /home.

Is there anyway to fix this?

--
Brent Ryan

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




--
Brent Ryan
Reply | Threaded
Open this post in threaded view
|

Re: Perforce plugin problem?

bwestrich
In reply to this post by bwestrich
Ryan,

I don't see anything that you're doing incorrectly. When a perforce
enabled Hudson job is built, the plugin does a get latest using the
clientspec you've specified for the job, not for some other
clientspec.

One possibility is that the sync is using the clientspec known by
Hudson, but Perforce thinks the files are already sync'ed. For
example, if some other process were to have deleted these files from
the workspace, Perforce would think the files are still there. If this
is the problem, doing a forced sync (the one-time checkbox that's
visible in the p4 section of the job configuration page) will resolve
it.

Another thing that might help is watching your app server logs when
you do a Hudson build. Each time a Perforce related Hudson job builds
these logs will say which Perforce clientspec is being used, as well
as whether Hudson has done any modfications to the clientspec. Another
possibility is the clientspec you've specified for the Hudson job does
not exist, or is owned by a different user than the user you specified
for the Hudson project, in which case the plugin will create a new
clientspec.  But this latter possibility probably isn't relevant, as
it would still result in your workspace being populated.


Brian


Date: Tue, 30 Oct 2007 07:08:26 -0700
From: Brent Ryan <[hidden email]>
Content-Type: multipart/alternative;
        boundary="----=_Part_710_33255883.1193753306976"
Subject: Perforce plugin problem?


Yes.  There is a daemon perforce user called DevelopmentSystem logged in at
all times on our Linux build box that has a default workspace named
"phx-build".

Here's what it looks like:

# A Perforce Client Specification.
#
#  Client:      The client name.
#  Update:      The date this specification was last modified.
#  Access:      The date this client was last used in any way.
#  Owner:       The user who created this client.
#  Host:        If set, restricts access to the named host.
#  Description: A short description of the client (optional).
#  Root:        The base directory of the client workspace.
#  AltRoots:    Up to two alternate client workspace roots.
#  Options:     Client options:
#                      [no]allwrite [no]clobber [no]compress
#                      [un]locked [no]modtime [no]rmdir
#  SubmitOptions:
#                      submitunchanged/submitunchanged+reopen
#                      revertunchanged/revertunchanged+reopen
#                      leaveunchanged/leaveunchanged+reopen
#  LineEnd:     Text file line endings on client: local/unix/mac/win/share.
#  View:        Lines to map depot files into the client workspace.
#
# Use 'p4 help client' to see more about client views and options.

Client: phx-build

Update: 2007/10/29 10:02:40

Access: 2007/10/30 06:47:44

Owner:  DevelopmentSystem

Host:   phx-build

Description:
        Created by rfidler.

Root:   /home/administrator/perforce

Options:        noallwrite noclobber nocompress unlocked nomodtime rmdir

SubmitOptions:  submitunchanged

LineEnd:        local

View:
        //depot/... //phx-build/depot/...

In Hudson, I configure my Maven 2 project to use perforce with the
DevelopmentSystem user and a client workspace of tautilities-hudson which
looks like this:

# A Perforce Client Specification.
#
#  Client:      The client name.
#  Update:      The date this specification was last modified.
#  Access:      The date this client was last used in any way.
#  Owner:       The user who created this client.
#  Host:        If set, restricts access to the named host.
#  Description: A short description of the client (optional).
#  Root:        The base directory of the client workspace.
#  AltRoots:    Up to two alternate client workspace roots.
#  Options:     Client options:
#                      [no]allwrite [no]clobber [no]compress
#                      [un]locked [no]modtime [no]rmdir
#  SubmitOptions:
#                      submitunchanged/submitunchanged+reopen
#                      revertunchanged/revertunchanged+reopen
#                      leaveunchanged/leaveunchanged+reopen
#  LineEnd:     Text file line endings on client: local/unix/mac/win/share.
#  View:        Lines to map depot files into the client workspace.
#
# Use 'p4 help client' to see more about client views and options.

Client: tautilities-hudson

Update: 2007/10/29 13:35:27

Access: 2007/10/29 06:55:33

Owner:  DevelopmentSystem

Host:   phx-build

Description:
        Created by DevelopmentSystem.

Root:   /home/administrator/.hudson/jobs/TAUtilities_1.2_DEV/workspace/

Options:        noallwrite noclobber nocompress unlocked nomodtime normdir

SubmitOptions:  submitunchanged

LineEnd:        local

View:
        //depot/Library/TAUtilities_1.2_DEV/... //tautilities-hudson/...


When Hudson goes to sync the files for the project I setup, it looks like it
pulls the files into the phx-build workspace and not the tautilities-hudson
workspace that I configured the project for.  Then, when Hudson goes to
build the project, there is no pom.xml file in the exected
/home/administrator/.hudson/jobs/TAUtilities_1.2_DEV/workspace/ directory.



Am I doing something wrong here?


Thanks,
Brent

On Oct 29, 2007 10:15 PM, Brian Westrich <[hidden email]> wrote:

> Ryan,

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

Reply | Threaded
Open this post in threaded view
|

Re: Perforce plugin problem?

Brent Ryan-2
I figured out the problem.

The issue was that I had P4CONFIG environment variable defined with the P4CLIENT variable defined.  Apparently this overwrites any command line options so I had to take this out.

Everything works now, but it only works if I leave the daemon perforce user logged in on the server.  Otherwise, things don't work right.

--Brent

On Oct 31, 2007 1:41 AM, Brian Westrich <[hidden email]> wrote:
Ryan,

I don't see anything that you're doing incorrectly. When a perforce
enabled Hudson job is built, the plugin does a get latest using the
clientspec you've specified for the job, not for some other
clientspec.

One possibility is that the sync is using the clientspec known by
Hudson, but Perforce thinks the files are already sync'ed. For
example, if some other process were to have deleted these files from
the workspace, Perforce would think the files are still there. If this
is the problem, doing a forced sync (the one-time checkbox that's
visible in the p4 section of the job configuration page) will resolve
it.

Another thing that might help is watching your app server logs when
you do a Hudson build. Each time a Perforce related Hudson job builds
these logs will say which Perforce clientspec is being used, as well
as whether Hudson has done any modfications to the clientspec. Another
possibility is the clientspec you've specified for the Hudson job does
not exist, or is owned by a different user than the user you specified
for the Hudson project, in which case the plugin will create a new
clientspec.  But this latter possibility probably isn't relevant, as
it would still result in your workspace being populated.


Brian


Date: Tue, 30 Oct 2007 07:08:26 -0700
From: Brent Ryan <[hidden email]>
Content-Type: multipart/alternative;
       boundary="----=_Part_710_33255883.1193753306976"
Subject: Perforce plugin problem?


Yes.  There is a daemon perforce user called DevelopmentSystem logged in at
all times on our Linux build box that has a default workspace named
"phx-build".

Here's what it looks like:

# A Perforce Client Specification.
#
#  Client:      The client name.
#  Update:      The date this specification was last modified.
#  Access:      The date this client was last used in any way.
#  Owner:       The user who created this client.
#  Host:        If set, restricts access to the named host.
#  Description: A short description of the client (optional).
#  Root:        The base directory of the client workspace.
#  AltRoots:    Up to two alternate client workspace roots.
#  Options:     Client options:
#                      [no]allwrite [no]clobber [no]compress
#                      [un]locked [no]modtime [no]rmdir
#  SubmitOptions:
#                      submitunchanged/submitunchanged+reopen
#                      revertunchanged/revertunchanged+reopen
#                      leaveunchanged/leaveunchanged+reopen
#  LineEnd:     Text file line endings on client: local/unix/mac/win/share.
#  View:        Lines to map depot files into the client workspace.
#
# Use 'p4 help client' to see more about client views and options.

Client: phx-build

Update: 2007/10/29 10:02:40

Access: 2007/10/30 06:47:44

Owner:  DevelopmentSystem

Host:   phx-build

Description:
       Created by rfidler.

Root:   /home/administrator/perforce

Options:        noallwrite noclobber nocompress unlocked nomodtime rmdir

SubmitOptions:  submitunchanged

LineEnd:        local

View:
       //depot/... //phx-build/depot/...

In Hudson, I configure my Maven 2 project to use perforce with the
DevelopmentSystem user and a client workspace of tautilities-hudson which
looks like this:

# A Perforce Client Specification.
#
#  Client:      The client name.
#  Update:      The date this specification was last modified.
#  Access:      The date this client was last used in any way.
#  Owner:       The user who created this client.
#  Host:        If set, restricts access to the named host.
#  Description: A short description of the client (optional).
#  Root:        The base directory of the client workspace.
#  AltRoots:    Up to two alternate client workspace roots.
#  Options:     Client options:
#                      [no]allwrite [no]clobber [no]compress
#                      [un]locked [no]modtime [no]rmdir
#  SubmitOptions:
#                      submitunchanged/submitunchanged+reopen
#                      revertunchanged/revertunchanged+reopen
#                      leaveunchanged/leaveunchanged+reopen
#  LineEnd:     Text file line endings on client: local/unix/mac/win/share.
#  View:        Lines to map depot files into the client workspace.
#
# Use 'p4 help client' to see more about client views and options.

Client: tautilities-hudson

Update: 2007/10/29 13:35:27

Access: 2007/10/29 06:55:33

Owner:  DevelopmentSystem

Host:   phx-build

Description:
       Created by DevelopmentSystem.

Root:   /home/administrator/.hudson/jobs/TAUtilities_1.2_DEV/workspace/

Options:        noallwrite noclobber nocompress unlocked nomodtime normdir

SubmitOptions:  submitunchanged

LineEnd:        local

View:
       //depot/Library/TAUtilities_1.2_DEV/... //tautilities-hudson/...


When Hudson goes to sync the files for the project I setup, it looks like it
pulls the files into the phx-build workspace and not the tautilities-hudson
workspace that I configured the project for.  Then, when Hudson goes to
build the project, there is no pom.xml file in the exected
/home/administrator/.hudson/jobs/TAUtilities_1.2_DEV/workspace/ directory.



Am I doing something wrong here?


Thanks,
Brent

On Oct 29, 2007 10:15 PM, Brian Westrich <[hidden email]> wrote:

> Ryan,

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




--
Brent Ryan
Reply | Threaded
Open this post in threaded view
|

Re: Perforce plugin problem?

bwestrich
In reply to this post by Brent Ryan-2
I've found I don't have to leave the daemon perforce user logged on,
as long as I have a p4ticket.txt file in the home directory of the
account that's running the hudson server (the ticket has to have a
line that has your perforce user and your perforce server on it).
Also, it works well to put the perforce user is a group that has
unlimited ticket timeout, otherwise you'll need to repeatedly log in
and then log back out.

> ---------- Forwarded message ----------
> From: "Brent Ryan" <[hidden email]>
> To: [hidden email]
> Date: Wed, 31 Oct 2007 06:12:56 -0700
> Subject: Re: Perforce plugin problem?
> I figured out the problem.
>
> The issue was that I had P4CONFIG environment variable defined with the
> P4CLIENT variable defined.  Apparently this overwrites any command line
> options so I had to take this out.
>
> Everything works now, but it only works if I leave the daemon perforce user
> logged in on the server.  Otherwise, things don't work right.
>
> --Brent
>

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