Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "WTP/Build/WTP Batch Build"
(→How to setup WTP batch Build locally) |
m (→How to setup WTP batch Build locally) |
||
(61 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
== How to setup WTP batch Build locally == | == How to setup WTP batch Build locally == | ||
− | + | The below instructions are for a Linux-like systems, mostly due to issues with path lengths. One could probably make it work on windows as well with some time spent to tweak it. | |
− | a. | + | |
− | + | ||
− | + | ||
− | [[Category: | + | 1. Setup prereqs |
+ | :a. apache ant 1.7 => http://ant.apache.org/ | ||
+ | :b. Both Java SDK 1.4 and 1.5 | ||
+ | |||
+ | 2. Check out build files | ||
+ | : mkdir <BUILD HOME>, for example mkdir /shared/webtools | ||
+ | : cd <BUILD HOME> | ||
+ | :<b> cvs -Q -f -d :pserver:anonymous@dev.eclipse.org:/cvsroot/webtools export -d ./releng.control -r HEAD webtools.releng/releng.control</b> | ||
+ | |||
+ | :If you are doing this behind a proxy, you need to alter the above command to specify the proxy information. Note the quotes. | ||
+ | :<b> cvs -Q -f -d ":pserver;proxy=[proxy.server.name];proxyport=[port]:anonymous@dev.eclipse.org:/cvsroot/webtools export -d ./releng.control -r HEAD webtools.releng/releng.control"</b> | ||
+ | |||
+ | :You should see the releng.control dir created in the <BUILD HOME> dir after running this command | ||
+ | :Set permissions to ensure how checked out files are exe permission <b> chmod -R 755 <BUILD HOME> </b> | ||
+ | |||
+ | 3. Modifying properties files for your local build environment (you can do this either in eclipse or by opening the files from command line) | ||
+ | |||
+ | :a. You can always get a fresh copy of all properties files from CVS by running the <BUILD HOME>/releng.control/get-relengControl.sh script, however to avoid your already modified properties files from being overwritten when the command is executed, you should make a copy of the properties directory first and modify the copied version | ||
+ | :e.g. cp –R <BUILD HOME>/releng.control/localBuildExample ../new_props | ||
+ | |||
+ | :b. Modifying <BUILD HOME>/releng.control/commonVariations.shsource (You can copy this file into your /home/<user>/bin directory so that these variables are always loaded when this user is logged on) | ||
+ | ::BUILD_HOME to location you defined in step 2 | ||
+ | ::ANT_HOME to location of where your ant | ||
+ | ::JAVA_4_HOME to location of where your java 4 | ||
+ | ::JAVA_5_HOME to location of where your java 5 | ||
+ | |||
+ | ::LOCAL_BUILD_PROPERTIES_DIR to the copied properties directory from the last step | ||
+ | |||
+ | ::BUILD_CVS_READ_PROTOCOL = pserver | ||
+ | ::BUILD_CVS_READ_USER=anonymous | ||
+ | ::BUILD_CVS_WRITE_PROTOCOL=pserver | ||
+ | ::BUILD_CVS_WRITE_USER=anonymous | ||
+ | ::BUILD_CVS_SERVER=dev.eclipse.org | ||
+ | |||
+ | ::SKIPUSER=true | ||
+ | |||
+ | :c. Modifying <BUILD HOME>/new_props/runbuild.properties | ||
+ | ::Update this file to point the java locations to where the JAVA prereqs you've created in step 1 | ||
+ | :d. Review all the files in <BUILD HOME>/new_props/ Read the comments for each property and make the appropriate changes. | ||
+ | In order to build the 3.0.3 driver, I needed to: | ||
+ | ::Add two properties: | ||
+ | :::releng.jsf-mapVersionTag=R3_0_maintenance | ||
+ | :::releng.dali-mapVersionTag=R2_0_maintenance | ||
+ | ::and change these properties | ||
+ | :::mapVersionTag=R3_0_maintenance | ||
+ | :::buildType=M | ||
+ | :::buildBranch=R3.0 | ||
+ | |||
+ | 4. Running the build: | ||
+ | |||
+ | :a. cd <BUILD HOME>/releng.control/ | ||
+ | :b. <b>./ant.sh –f cc_project_build.xml –Dprojectname=wtp-R3.0-I</b> | ||
+ | |||
+ | ::You may run into this failure on first attempt ./ant.sh: line #: commonVariations.shsource: No such file or directory | ||
+ | :: You can get around this by modifying the ant.sh by commenting out the below on line within the if block | ||
+ | :: # cd ${RELENG_CONTROL} | ||
+ | |||
+ | ::Please note that <b>projectname</b> is mandatory, all available projects are: | ||
+ | :::wtp-R3.0-I for current 3.0 integration build | ||
+ | :::wtp-R2.0-M for 2.0.2 maintenance build | ||
+ | :::wtp-R3.0-N HEAD build for 3.0 | ||
+ | :::wtp-R3.0-M for 3.0.x maintenance build | ||
+ | |||
+ | 5. Checking the build results | ||
+ | |||
+ | :After the build is done, you should find the following directories created inside the <BUILD HOME> directory:basebuilders | ||
+ | {| border="3" | ||
+ | |+ | ||
+ | ! Resulting Directories!! Description!! | ||
+ | |- | ||
+ | ! basebuilders | ||
+ | | build plug-ins used from eclipse | ||
+ | |- | ||
+ | ! committers | ||
+ | | final output of the log files | ||
+ | |- | ||
+ | ! logcache | ||
+ | | used to generate log files | ||
+ | |- | ||
+ | ! logs | ||
+ | | used to generate log files | ||
+ | |- | ||
+ | ! prereqCache | ||
+ | | location for wtp build prereq files | ||
+ | |- | ||
+ | ! projectBuilders | ||
+ | | builder projects supporting wtp build | ||
+ | |- | ||
+ | ! projects | ||
+ | | wtp projects, final build output | ||
+ | |- | ||
+ | ! tests | ||
+ | | Storage for downloaded test cases and the executed test results | ||
+ | |- | ||
+ | ! releng.control | ||
+ | | This is the original directory checked out from CVS in step 2, and the build staring directory | ||
+ | |- | ||
+ | ! new_props | ||
+ | | This is the properties directory created in step 3a, storing all of the properties files | ||
+ | |} | ||
+ | |||
+ | == Viewing the results == | ||
+ | 1. Run <b>.<BUILD HOME>/releng.control/get-customPages.sh</b> to retrieve the necessary files from CVS to display results | ||
+ | |||
+ | 2. Setup alias on linux to work with default webserver | ||
+ | :i./sbin/service httpd start to start webserver and ensure http://localhost can be accessed post starting webserver | ||
+ | :ii.Modify /etc/http/conf/httpd.conf to setup alias to your <BUILD HOME dir> | ||
+ | ::Alias /wtpbuild/ <BUILD HOME dir>/committers/ | ||
+ | ::<Directory "<Build Home dir> /"> | ||
+ | :::Options Indexes MultiViews | ||
+ | :::AllowOverride None | ||
+ | :::Order allow,deny | ||
+ | :::Allow from all | ||
+ | ::</Directory> | ||
+ | |||
+ | :iii. Restart webserver to pick up changes /sbin/service httpd restart | ||
+ | :iv. http://localhost/wtpbuild should bring up the index.php file where you can view the build and test results | ||
+ | |||
+ | |||
+ | |||
+ | [[Category:WTP Build Related| ]] |
Latest revision as of 11:22, 7 October 2008
How to setup WTP batch Build locally
The below instructions are for a Linux-like systems, mostly due to issues with path lengths. One could probably make it work on windows as well with some time spent to tweak it.
1. Setup prereqs
- a. apache ant 1.7 => http://ant.apache.org/
- b. Both Java SDK 1.4 and 1.5
2. Check out build files
- mkdir <BUILD HOME>, for example mkdir /shared/webtools
- cd <BUILD HOME>
- cvs -Q -f -d :pserver:anonymous@dev.eclipse.org:/cvsroot/webtools export -d ./releng.control -r HEAD webtools.releng/releng.control
- If you are doing this behind a proxy, you need to alter the above command to specify the proxy information. Note the quotes.
- cvs -Q -f -d ":pserver;proxy=[proxy.server.name];proxyport=[port]:anonymous@dev.eclipse.org:/cvsroot/webtools export -d ./releng.control -r HEAD webtools.releng/releng.control"
- You should see the releng.control dir created in the <BUILD HOME> dir after running this command
- Set permissions to ensure how checked out files are exe permission chmod -R 755 <BUILD HOME>
3. Modifying properties files for your local build environment (you can do this either in eclipse or by opening the files from command line)
- a. You can always get a fresh copy of all properties files from CVS by running the <BUILD HOME>/releng.control/get-relengControl.sh script, however to avoid your already modified properties files from being overwritten when the command is executed, you should make a copy of the properties directory first and modify the copied version
- e.g. cp –R <BUILD HOME>/releng.control/localBuildExample ../new_props
- b. Modifying <BUILD HOME>/releng.control/commonVariations.shsource (You can copy this file into your /home/<user>/bin directory so that these variables are always loaded when this user is logged on)
- BUILD_HOME to location you defined in step 2
- ANT_HOME to location of where your ant
- JAVA_4_HOME to location of where your java 4
- JAVA_5_HOME to location of where your java 5
- LOCAL_BUILD_PROPERTIES_DIR to the copied properties directory from the last step
- BUILD_CVS_READ_PROTOCOL = pserver
- BUILD_CVS_READ_USER=anonymous
- BUILD_CVS_WRITE_PROTOCOL=pserver
- BUILD_CVS_WRITE_USER=anonymous
- BUILD_CVS_SERVER=dev.eclipse.org
- SKIPUSER=true
- c. Modifying <BUILD HOME>/new_props/runbuild.properties
- Update this file to point the java locations to where the JAVA prereqs you've created in step 1
- d. Review all the files in <BUILD HOME>/new_props/ Read the comments for each property and make the appropriate changes.
In order to build the 3.0.3 driver, I needed to:
- Add two properties:
- releng.jsf-mapVersionTag=R3_0_maintenance
- releng.dali-mapVersionTag=R2_0_maintenance
- and change these properties
- mapVersionTag=R3_0_maintenance
- buildType=M
- buildBranch=R3.0
- Add two properties:
4. Running the build:
- a. cd <BUILD HOME>/releng.control/
- b. ./ant.sh –f cc_project_build.xml –Dprojectname=wtp-R3.0-I
- You may run into this failure on first attempt ./ant.sh: line #: commonVariations.shsource: No such file or directory
- You can get around this by modifying the ant.sh by commenting out the below on line within the if block
- # cd ${RELENG_CONTROL}
- Please note that projectname is mandatory, all available projects are:
- wtp-R3.0-I for current 3.0 integration build
- wtp-R2.0-M for 2.0.2 maintenance build
- wtp-R3.0-N HEAD build for 3.0
- wtp-R3.0-M for 3.0.x maintenance build
- Please note that projectname is mandatory, all available projects are:
5. Checking the build results
- After the build is done, you should find the following directories created inside the <BUILD HOME> directory:basebuilders
Resulting Directories | Description | |
---|---|---|
basebuilders | build plug-ins used from eclipse | |
committers | final output of the log files | |
logcache | used to generate log files | |
logs | used to generate log files | |
prereqCache | location for wtp build prereq files | |
projectBuilders | builder projects supporting wtp build | |
projects | wtp projects, final build output | |
tests | Storage for downloaded test cases and the executed test results | |
releng.control | This is the original directory checked out from CVS in step 2, and the build staring directory | |
new_props | This is the properties directory created in step 3a, storing all of the properties files |
Viewing the results
1. Run .<BUILD HOME>/releng.control/get-customPages.sh to retrieve the necessary files from CVS to display results
2. Setup alias on linux to work with default webserver
- i./sbin/service httpd start to start webserver and ensure http://localhost can be accessed post starting webserver
- ii.Modify /etc/http/conf/httpd.conf to setup alias to your <BUILD HOME dir>
- Alias /wtpbuild/ <BUILD HOME dir>/committers/
- <Directory "<Build Home dir> /">
- Options Indexes MultiViews
- AllowOverride None
- Order allow,deny
- Allow from all
- </Directory>
- iii. Restart webserver to pick up changes /sbin/service httpd restart
- iv. http://localhost/wtpbuild should bring up the index.php file where you can view the build and test results