Sei sulla pagina 1di 14

Steps to Configure the Nightly Builds in Test Servers.

Copy over the NightlyBuild folder from a working environment (choose a 32 bit or 64 bit env based on type you are trying to set up) Ensure the host server has a scheduled task set up for Automated Nightly Build (similar to other servers). Ensure it is set up to run as autobuilder id. Autobuilder id should be added to Administrators group on this host server

Ensure all of below settings are accurately configured by comparing to a working env

1. First change the E-mail notifications properties (To and CC addresses). Based on the release this will change. 2. Change Database names under the Database related properties like database name, userid, password, Database server name and port number. If you missed to change the database values it will lead to an serious issue. So check twice this part before running the scripts. 3. Configure the same in the WAS console also and test connect it. 4. Configure the CICS name in the Script as well as in the WAS console. 5. Change the redirect page values in the Nightly builds file. 6. Change the Brach name, branch name.alt and trunk branch name. This part is the important one, because, the code will be checked out based on this value. 7. Check the WAS console credentials, Binding values, PeopleSoft information's, web test properties, If it's wrong change it

8. Change Nightly build floating tag names in NightlyBuild.cmd and also change the host server name. If env is 64 bit, then ensure the Nightlybuilds_64bit.xml is referenced in the ant script

Additional notes added by Prashant :

For Development (Daily nightly build) servers we have installed DB2 server on App server instead of the just the Run time client. This was done so that Windows databases like ACRDM, ACRMIS & MRLDM can be deployed locally on App Server. This is because we cannot use Remote_Refresh target for Windows databases. Only local_rebuild target needs to be configured in the Nightly builds.

Set up Instructions :

If the environment had been set up and working before, then backup the following folders : Apps Inetpub

set up ANT_HOME and JAVA_HOME in Environment variables - System variables section

From the ANT_HOME directory run ant -f fetch.xml -Ddest=system to get the library dependencies of most of the Ant tasks that require them. If you don't do this, many of the dependent Ant tasks will not be available. The ANT set up instructions are also available at http://ant.apache.org/manual/install.html

Compare the D:\apache-ant-1.7.0\lib jars between the environment to be set up with a working environment. Some jars like intware_ant.jar and intware_xml.jar would be additionally present in the working env. Copy over the missing jars into same path for the environment to be set up

Ensure that autobuilder id is included under Administrators group also. If its not included, pls include it.

When logged in as jhrpsadmin, check the System variables under Env variables. Below cvsroot property should be set for Automated_build cvs id.

Login with autobuilder id to both the environment being set up, as well as the reference working environment and verify that the Environment variables (autobuilder ids user variables ) are set up in Identical manner. The path user variable for autobuilder id should be set up to reference CVSNT path etc.

While you are still logged in as autobuilder , Set CVS root once and login to CVS using command line so that the server registry remembers the password. Once this is done, the command prompt window can be closed & you can log off. Login to CVS as the following 2 ids so that the server registry remembers the password credentials for these CVS ids. After below task is complete, the command prompt can be closed : Automated_Build this has to be case sensitive only. This is the id which is used for check outs etc. If we use a persons id, then the code cannot be

updated by any other person using their id. Hence we use this generic id for Automated builds Prashant_Wakode (this can be the ID used for re-tag command in floating tag target). The tagging commands can only be executed by an actual id, not as the Automated_Build id

Do above using below commands : set cvsroot=:pserver:Automated_Build@jhrpscvs:/USGP_Repository cvs login set cvsroot=:pserver:Prashant_Wakode@jhrpscvs:/USGP_Repository cvs login (provide indiv password) set cvsroot=:pserver:Automated_Build@jhrpscvs:/USGP_Repository cvs login (Provide password as auto1234)

Add the additional user variable path for the env to be set up

Re-start the machine for all of the above changes to take effect

Ensure Wiki page for the Env is updated with Latest build, all build logs links etc

__________________________________________________________________________ Typical issues :

Nightly build log shows the following class not found errors

Buildfile: Nightlybuilds_64bit.xml The specified logger class com.intware.devtools.ant.AutobuildLogger could not be used because Class not found: com.intware.devtools.ant.AutobuildLogger java.lang.RuntimeException at org.apache.tools.ant.Main.createLogger(Main.java:793)

Root cause and Resolution : Ant has not been deployed properly. From the ANT_HOME directory run ant -f fetch.xml -Ddest=system to get the library dependencies of most of the Ant tasks that require them. If you don't do this, many of the dependent Ant tasks will not be available

Nightly build log shows the following Create Process error

Autobuilder: FAILED! [floating_tag]


[10:20:03.141]nightly_build: [10:20:03.235]backup_dirs: [echo] D: [10:20:03.329]floating_tag: [echo] Tag Dec2011_NightlyBuilds_Tag02 BUILD FAILED D:\CVS\Buildscripts\NightlyBuilds\Nightlybuilds_64bit.xml:275: The following error occurred while executing this line: D:\CVS\Buildscripts\NightlyBuilds\Nightlybuilds_64bit.xml:1739: java.io.IOException: CreateProcess: cvs -d:pserver:Vijayababu_Adapa@jhrpscvs:/USGP_Repository rtag -r Sept2011_Release_branch -F Dec2011_NightlyBuilds_Tag02 AccountService ACR Batch CMA common ConfigurationScripts ContractService Databases\ACR Databases/CustomerService Databases\PERA Databases\PlanSponsorContent Databases/Replication Databases/ViewFunds DirectMailEkit DistributionService EmployeeService eReports EventApp ezk ezkActionPlan FundService MessageService OrderService PlanSponsor PlanSponsorCMA PlanSponsorTests ReportService SecurityService STP SupportCentral USGPSServiceTests USGPSWebTest error=2

D:\CVS\Buildscripts\NightlyBuilds\Nightlybuilds_64bit.xml:1739: java.io.IOException: CreateProcess:

Upon failure of Nightly build even the failure email is not triggered. This is because the ANT is configured for attachments and the ant installation is customized for the sending emails with attachments. If ANT is not installed properly, then the emails wont work
Root cause and Resolution : Ant has not been deployed properly. From the ANT_HOME directory run ant -f fetch.xml -Ddest=system to get the library dependencies of most of the Ant tasks that require them. If you don't do this, many of the dependent Ant tasks will not be available

If it is still not working, it means you may be trying to run the script from Scheduled tasks, and the task is set up to run as rmiuser instead of autobuilder and that could cause issues. (Note that we need to set path user variable for whatever user id runs the nightly build script from scheduler to ensure that the executable cvs.exe is set)

Nightly build fails because of Authorization failed issues during Rte-tag or Checkout/update operations

Autobuilder: FAILED! [floating_tag]


[13:34:48.036]floating_tag: [echo] Tag Dec2011_NightlyBuilds_Tag01 [cvs] Empty password used - try 'cvs login' with a real password [cvs] cvs [rtag aborted]: authorization failed: server jhrpscvs rejected access to /USGP_Repository for user Prashant_Wakode BUILD FAILED D:\CVS\Buildscripts\NightlyBuilds\Nightlybuilds_64bit.xml:275: The following error occurred while executing this line: D:\CVS\Buildscripts\NightlyBuilds\Nightlybuilds_64bit.xml:1740: cvs exited with error code 1 Command line was [Executing 'cvs' with arguments: '-d:pserver:Prashant_Wakode@jhrpscvs:/USGP_Repository' 'rtag' '-r' 'Sept2011_Release_branch' '-F' 'Dec2011_NightlyBuilds_Tag01' 'AccountService' The ' characters around the executable and arguments are not part of the command. ]

D:\CVS\Buildscripts\NightlyBuilds\Nightlybuilds_64bit.xml:1740: cvs exited with error code 1 Command line was [Executing 'cvs' with arguments: '-d:pserver:Prashant_Wakode@jhrpscvs:/USGP_Repository' 'rtag' '-r' 'Sept2011_Release_branch' '-F' 'Dec2011_NightlyBuilds_Tag01' 'AccountService' The ' characters around the executable and arguments are not part of the command. ]

HOW TO TROUBLESHOOT Login to the server with autobuilder id. Navigate to d:\temp, and try the following commands : Set CVS root with the appropriate id set cvsroot=:pserver:Prashant_Wakode@jhrpscvs:/USGP_Repository AT THIS STAGE DO NOT DO A CVS LOGIN (BECAUSE IT WAS ALREADY DONE DURING SET UP ONLY ONCE. NIGHTLY BUILD SCRIPT DOES NOT DO A CVS LOGIN AND DOES NOT PROVIDE PASSWORD EACH TIME. IT MERELY SETS CVSROOT AND PROCEED TO RE-TAG MODULES) DIRECTLY TRY OUT A CVS CHECKOUT FOR ANY MODULE IN SOME TEMP LOCATION cvs co -P -r HEAD common If you see the error :
authorization failed: server jhrpscvs rejected access to /USGP_Repository for user Prashant_Wakode - THIS HAPPENS BECAUSE THE SET UP STEP WHERE WE NEED TO LOGIN AS autobuilder id, and do the cvs root set up and one time CVS login for both CVS ids Automated_Build and Prashant_Wakode was never done. Review instructions above on how to do this. Once this is done, we can log off autobuilder id and resume nightly build execution via Scheduled tasks OR If you have done above steps, you have not re-booted the server. So Re-boot and re-try

Issue During Ant execution:

While executing the ant command and if you receive and error like Files unexpected at this time Solution: Check the environment variables for classpath and path. It may contains . Please remove those and re-run the ant with the new cmd.

Nightly build fails while creating local windows databases like ACRWD1D1, ACRMISD1, MRLDM

Things to check are : Ensure that the host server is full db2 server install (not just a Runtime Client). Full Db2 server install should have DB2Control center If the error says that START or STOP DATABASE MANAGER failed. Reason code "3" it means that there was some issue with install of DB2 server with some profile file. To resolve, go to services and manually start the db2 service, and also set it for Auto re-start

If the error says userid/password blank issue, then we need to execute the commands as shown below by passing user id and password cd \cvs\Databases\ACR ant -f ACRDM_Database.xml -Djdbc.userid=db2admin -Djdbc.password=db2admin> D:\ACRDM.logs

ant -f ACR_MIS_Database.xml -Djdbc.userid=db2admin -Djdbc.password=db2admin> D:\ACR_MIS.logs

cd \cvs\Databases\MrlDataMart ant -f MRLDM_Database.xml -Djdbc.userid=db2admin -Djdbc.password=db2admin> D:\MRLDM.logs

Potrebbero piacerti anche