Jump to content


Change the submitting user

Jenkins Submit

  • Please log in to reply
7 replies to this topic

#1 eranb

eranb

    Advanced Member

  • Members
  • PipPipPip
  • 55 posts

Posted 24 June 2014 - 08:00 AM

Hi all
We are working with Jenkins for running P4 scripts that we wrote in groovy/java.
We use the same user for all scripts and all P4 actions but we want the submitting user to be the user that is currently logged in to Jenkins.

how can I change the submit user (only for specific submit).

I have access to the user name. not to his password.

Thanks in advance,
Eran.

#2 P4Rusty

P4Rusty

    Member

  • Members
  • PipPip
  • 20 posts

Posted 24 June 2014 - 04:25 PM

If you have a super user account, you can run "p4 login any_user" and it
will create a login ticket for that user without asking for the password.

Regards,
Rusty



On Tue, Jun 24, 2014 at 1:05 AM, eranb <
perforce-user-forum@forums.perforce.com> wrote:

Quote


Posted on behalf of forum user 'eranb'.

Hi all
We are working with Jenkins for running P4 scripts that we wrote in
groovy/java.
We use the same user for all scripts and all P4 actions but we want the
submitting user to be the user that is currently logged in to Jenkins.

how can I change the submit user (only for specific submit).

I have access to the user name. not to his password.

Thanks in advance,
Eran.



--
Please click here to see the post in its original format:
http://forums.perfor...ic/3377-change-
the-submitting-user
_______________________________________________
perforce-user mailing list  -  perforce-user@perforce.com
http://maillist.perf...o/perforce-user




--
Rusty

775-636-6964 Office
_______________________________________________
perforce-user mailing list  -  perforce-user@perforce.com
http://maillist.perf...o/perforce-user



#3 eranb

eranb

    Advanced Member

  • Members
  • PipPipPip
  • 55 posts

Posted 24 June 2014 - 08:07 PM

Thanks!

#4 eranb

eranb

    Advanced Member

  • Members
  • PipPipPip
  • 55 posts

Posted 25 June 2014 - 06:36 AM

Adding one more question.
I was told that it is possible to change the submit account after the submit was done.
Any idea if and how it can be done?

Thanks

#5 Lennart Kjellén

Lennart Kjellén

    Advanced Member

  • Members
  • PipPipPip
  • 30 posts
  • LocationSweden

Posted 25 June 2014 - 07:58 AM

p4 change -f allows changing all fields of a submitted changelist except the status and client fields. The -f flag requires admin access.

#6 eranb

eranb

    Advanced Member

  • Members
  • PipPipPip
  • 55 posts

Posted 30 June 2014 - 10:56 AM

Hi Lennart.

We tried it (with admin user) and the error we got is: User cannot be changed in a committed change

The command we ran is: p4  change  -U userName -f  12345

We are still checking if we have any permissions issue but please let me know if you can think of any other direction.

Thanks a lot for the help!

Eran

#7 Lennart Kjellén

Lennart Kjellén

    Advanced Member

  • Members
  • PipPipPip
  • 30 posts
  • LocationSweden

Posted 30 June 2014 - 11:14 AM

The flag -U is only for changing the user of an empty pending changelist. Did you get the same error with "p4 change -f 12345"?

#8 eranb

eranb

    Advanced Member

  • Members
  • PipPipPip
  • 55 posts

Posted 01 July 2014 - 09:44 AM

No. We actually tried it right now and it worked.
It's easier for me to use one command since it's going to be in a script and I only want to change the user name.
I can pipe the content of a text file to the "p4 change" command but it's not my favorite way... to messy.

I'll try to use P4Java API for it.

Thanks for the help!





Also tagged with one or more of these keywords: Jenkins, Submit

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users