Continuos Integration from the scratch

r_sathliya created the topic: Continuos Integration from the scratch
Hi all,
I want to deploy continuous integration in my company. We are using Perforce. Can any one guide me for this.
(which tool is best? and How to do it? and any existing code/project example available?)

Thanks,
Raju

rajeshkumar replied the topic: Re:Continuos Integration from the scratch
Hi Raju,

Could you please tell me following inputs before answer your questions..
1. Build Script (ant, maven, shell or perl)
2. Do you need Static Code Analysis tools to be integrated or its already done.
3. Do you need testing tools and test coverage tools to be integrated.
4. What is the frequency of build you generate everyday?
5. Why do you need CI tools in your project?
6. Are you are looking for commercial tool or open Source Tools?

once you answer following questions, i will be able to tell you correct tools which you can go ahead and implement smoothly with the project?
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

r_sathliya replied the topic: Re:Continuos Integration from the scratch
Thanks Rajesh for replying !!

Here is answer to your question

1. Build Script (ant, maven, shell or perl)
Ans: In my company we are using technologies like .Net, Java, VB, C (Unix) and for this we are using different scripting lang as Nant, Ant, Shell)
I would prefere Ant

2. Do you need Static Code Analysis tools to be integrated or its already done.
Ans: No idea for this.

3. Do you need testing tools and test coverage tools to be integrated.
Ans: Not require now..

4. What is the frequency of build you generate everyday?
Ans: We have total 15-20 client and I guess for each client 1 build/per week is require.

5. Why do you need CI tools in your project?
Ans: 1. To create nightly build
2. To let developper if they sobmitted wronge code
3. Require Dashboard to see the build status and its shedule.

6. Are you are looking for commercial tool or open Source Tools?
Ans: Preferable OpenSource but comrcial tool will do if its best fit

Thanks,
Raju

r_sathliya replied the topic: Re:Continuos Integration from the scratch
Hello Rajesh,

Could you please provide me your update on my question posted above.

Thanks,
Raju

scmuser replied the topic: Re:Continuos Integration from the scratch
Hi,

By Given Senario, I Would recommend CruiseControl for Java and CruiseControl.net for Microsoft would be great deal.

if you are planning to migrate from ant to maven the Hudson+Sonar+Maven combination would be grt.

r_sathliya replied the topic: Re:Continuos Integration from the scratch
Thanks for answering my queries.

Is “C” build from Unix environment is posible by either of cruisecontrol.net Or cruisecontrol for java?

mnanjala replied the topic: Re:Continuos Integration from the scratch
Hello,

If you want build C code or java code, Any continuous integration server should take care of that provided you have repository and build scripts well placed.I prefer Hudson is more efficient thank CC

rajeshkumar replied the topic: Re:Continuos Integration from the scratch
Hi,

Well said by praveen, As any CI tools will serve your purpose as soon as you have proper build script which noo only depends on CI tools instead of their own build capabilities.

So have proper build script which can be used to CI tools. I would rather suggest you CC.net or Visual Build Professional.
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

rajeshkumar replied the topic: Re:Continuos Integration from the scratch
Hi Raju,

just to add few more points on this. More often build tool such as (Ant, Make, Maven, Nanat) is not dependent of any specific platform…but build tools may be have more feature to integrate with specific platform may be Java or Microsoft technology just as make is more suitable for c and c++ and ant/maven is more with java.

but in any scenario, you can use any build tool with any technology and all build tools are technology independent.
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged :

Perforce Proxy Server: Caching selective files

scmuser created the topic: Perforce Proxy Server: Caching selective files
Hi,
I have setup p4 proxy server…

I would like to sync only few branches which are needed in development but not the entire depot files.

It will take more time as well as nobody is there to use it all the branches.

Any idea how to do this

rajeshkumar replied the topic: Re: Perforce Proxy Server: Caching selective files
The proxy only caches what you request from the server, so if you “haven’t had to sync it”, it won’t be cached. If you don’t want the entire sandbox directory cached, don’t sync the entire sandbox directory. Only sync what you need. It sounds like your doing this:
p4 sync //depot/sandbox/…

instead of this (let’s say your sandbox directory is named fbrereto):
p4 sync //depot/sandbox/fbrereto/…
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged :

Locking a branch in perforce?

scmuser created the topic: Locking a branch in perforce?
Hi,

I have requirement to lock branch while doing code freeze and making release but the challenge is that i dont have access on perforce server so i can use p4 protect..

Hows it feasible to achieve without having perforce server accesss.

mnanjala replied the topic: Re: Locking a branch in perforce?
If you are not an admin, then you should take a look at the “group owner” feature introduced in 2007.3. This will let a non-super user to be able to add & remove people from a group. Later you have to combine with this protections table,at this point you may need to work one time with perforce admin i.e. get site admin to set up the protections table, and restrict rights to a group named “Release 1.0 Authorised”, and make you the group owner. You can then add and remove users (or subgroups) from that group to control access.

mnanjala replied the topic: Re: Locking a branch in perforce?
Straight answer is you should get the admin access else you should just pass this to perforce admins.:)

Tagged :

Add and removes files from label

scmuser created the topic: Add and removes files from label
Hi,

Could you please tell me how to add and remove files from already created labels?

mnanjala replied the topic: Re: Add and removes files from label
P4Web Release 2010.1 User Guide
[Getting Started] [How To…] [Browser Tips] [Glossary] [Road Map]
Adding and Replacing Files in a Label

There are essentially two steps to creating a label:

Create the label spec, which defines the name of the label and label view.
Tag the files with that label using Add/Replace files…
Add/Replace files… tags a set of files with a label. Once you have tagged them, you can refer to a set of files by their label name.
For more information about labels, see Working with Labels.

Add/Replace restrictions

Bear in mind that you cannot use Add/Replace files to update a label if:
The label’s Owner: field is not your userid. You can only update labels you own.
The label has its Options: field set to locked
For more information about a label’s fields, see Creating and Editing Labels.
To Add/Replace files in a label

Select the Labels tab.
Click on the name of the label to which you want to add or replace files.
Select Add/Replace labels… from the pulldown list.
On the Add/Replace Files page
Under Revision: select one of the following radio buttons:
Workspace Revision: tags the file revisions currently synced in your workspace with the label.
Head Revision: tags the file revisions that are currently the latest versions in the depot with the label.
Label, Changelist or Date: enter a label name, a changelist number, or a date to tag files at revisions matching that criteria.
Under Options: select one of the following radio buttons:
Replace label contents completely: specified files are added or replaced. Files previously in the label that do not match your specification are removed from the label.
Add files to label: adds or replaces only the files that you specify. Labeled files that do not match your specifications are unaffected.
Remove files from label: removes the named files from the label.
Under Files: you can specify or restrict the files to add or replace. Select one of the following options:
All files in label view: includes all files in this label’s label view.
Files in [path]: this option is only available when your current path is not the root of the depot tree. Select and subdirectories or at this level only, depending on which files you want to include.
Files in this list: includes only the files listed in the textbox. You must provide a full pathname for these files, and you can use wildcards. Note that the files you specify must be in the label’s view, or P4Web displays a “No such file” error. You can also specify revisions if you have selected the Workspace Revision option.
When you have finished defining the parameters, click the Preview Add/Replace button to see the results before actually updating the label. If the command has the expected results, click your browser’s “Back” button and click the Add/Replace button to proceed.
Source : www.perforce.com

Tagged :

Error while deleting perforce users

scmuser created the topic: Error while deleting perforce users
Hi,

I am deleting perforce user using following command…
p4 user -d -f Ani

but i got some error message such as …
User Anil has file(s) open on 3 client(s) and can’t be deleted.

any help on this

mnanjala replied the topic: Re: Error while deleting perforce users
Try deleting particular user client first later you should able to delete user.

Thanks
Pravin

Tagged :

Opened files issues in perforce

rajeshkumar created the topic: Opened files issues in perforce
I am having one issues in perforce…Any help

User name “ram” has created client name “client1” in one hostmachine. Next day username “ramesh” has used same client name in same host machine and opened few files using his own ids.

The problem with Perforce Admin is: Admin should delete all the opened files open by ramesh in same client and hostname.

Senario:
Admin should not delete any user account and re-create it
Admin can not delete client as files are opened n deletion would not be allowed
Ramesh is not available / not his machine / not his client / for reverting their own files

Last options, reverting opened file from admin.

I tried to revert back by admin user by using following command but it says its opened by ramesh
> p4 revert -c 164680 *

Any other solution where admin can revert these opened files
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Ways to Pass Password in Triggers file in Perforce

rajeshkumar created the topic: Ways to Pass Password in Triggers file in Perforce
Option 1
If your Perforce server is set to security level 2 or lower you can have your trigger script run as the same user every time (typically a “background” user). Then, either have the server’s P4PASSWD environment variable set to the background user’s password,

Option 2
You can also use the -P flag to specify the password with the P4 commands issued by the script.

Option 3
You can echo the password and pipe it to the login command. Note that there is no space between the password and the pipe symbol.
echo | p4 login

Option 4
If you do not want to place a password in the script, you can use a text file containing the password. Make sure this password file has appropriate read and write privileges.
p4 login < password.txt Option 5 A more secure method is to use ticket based authentication and a group to keep a background user "logged in" at the Perforce server: 1. Create a group: p4 group always_on 2. Add your background user to the "Users" field. 3. Change the timeout from the default setting (12 hours), which is set in seconds. The new value depends on the server version: # 2008.1 and later: Set this value to "unlimited". A timeout value of zero is no longer accepted. # 2005.1 to 2007.3: Set this value to zero. # 2004.2 and earlier: Set this to a very large value -- but not too large, as some server versions do not handle situations where the timeout is set to exceed the "Unix Epoch", which is approximately in the year 2038. A safe value is 315532800 seconds, which is about 10 years. # Save the group. # In your trigger script, log the background user in and run the trigger once. echo password| p4 -p server:port -u username login # If the trigger runs properly, you can remove the password line. The user now remains logged in. Since this is ticket based authentication, they remain logged in even if the server is shut down or the hardware is rebooted. Regards, Rajesh Kumar Twitt me @ twitter.com/RajeshKumarIn

Tagged :

rsync in perforce

scmuser created the topic: rsync in perforce
I have to replicate my perforce server to remot location.. I am trying somthing different this time of not using p4 prox but rsync

i can setup a rsync to sync all filesystem from one perforce server instance to another perforce server but how to replicate metadata which will be autosync with each other n enable the p4 operation at both end and sync each other?

rajeshkumar replied the topic: Re: rsync in perforce
There is no way to keep two seperate Perforce systems in sync with each other by merging changes in both directions automatically.

Perforce 2010.2 does includes replication for creating read-only or warm standby servers:

www.perforce.com/perforce/r10.2/manuals/…/10_replication.html

However this is one way replication from main Perforce server to replica. If users at the replica site wanted to make changes they would still need to connect to the main Perforce server.

Perforce also provide remote depots. They do have some limitations and a performance overhead so it is recomended that they are mainly used to import code from one Perforce server to another and not as a gateway through which most developers work. This is discussed in:

kb.perforce.com/article/30/using-remote-depots#conclusion
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged :

Alternate to p4 proxy

scmuser created the topic: Alternate to p4 proxy
Hi,

I know p4 proxy which enables the p4 server working in distributed environment…do you know any alternate to p4 proxy which can replicate the p4 server to remote location with all p4 operationb supported as its in p4 proxy?

rajeshkumar replied the topic: Re: Alternate to p4 proxy
Hi,

if you are looking for any of the answer of the following questions, perforce answer is NO…

1/ Is there any alternate ways to setup P4 Proxy Server? NOT using p4p/p4ps

ANSWER: NO

2/ Is There ways to setup perforce server distributed in 2 different location where each time submit operation happens with nearest located server and BOTH server sync the DB and versioning files with each other?

ANSWER: NO
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged :

Showing Perforce changelists submitted since last

scmuser created the topic: Showing Perforce changelists submitted since last
Before I sync my Perforce client in the morning, I’d like to read the diffs and log messages for any changelists that will affect me. Unfortunately, though, I can’t find a simple way to list such changelists using either p4 changes or P4V. I suspect I’m missing something simple, though.

Is there a way that I can list all the changelists submitted since I last sync’ed my client? If I can get the full descriptions and diffs from previous depot revisions, as p4 describe does for a single changelist, that would be even better.

rajeshkumar replied the topic: Re: Showing Perforce changelists submitted since last
Please find answer below;

stackoverflow.com/questions/1064636/show…tted-since-last-sync
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged :