Skip to main content

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.

Jump to: navigation, search

Difference between revisions of "Common Build Infrastructure/Publishing"

(New page: OK, so you've built your SDK or runtime zip, your examples, your docs, your tests, and a p2 repo / update site. Great. How do you get those bits out to the world? Well, for the simple cas...)
 
Line 5: Line 5:
 
=== Example: VE Nightly and Integration Builds ===
 
=== Example: VE Nightly and Integration Builds ===
  
 +
[[Image:Hudson-Config-Parameterized-Build.png|right|thumb]]
 
Say you want to run Nightlies every day, and a single Integration build once a week. First, set up two jobs in Hudson:
 
Say you want to run Nightlies every day, and a single Integration build once a week. First, set up two jobs in Hudson:
  
Line 10: Line 11:
 
# https://build.eclipse.org/hudson/view/Athena%20CBI/job/cbi-ve-1.4-integration-Ganymede/
 
# https://build.eclipse.org/hudson/view/Athena%20CBI/job/cbi-ve-1.4-integration-Ganymede/
  
(To save time, create the Nightly job, then copy it to produce the Integration build, passing in slightly different parameters like BUILDTYPE=N or BUILDTYPE=I.)
+
(To save time, create the Nightly job, then copy it to produce the Integration build, passing in slightly different parameters like <code>BUILDTYPE = N</code> or <code>BUILDTYPE = I</code>.)
  
 
Next, create crontab entries which match the frequency of your N and I builds. In this example, the latest Nightly VE build will be published every day at 15h40 EST. The latest Integration will be published every Tuesday at 16h00 EST. Note that the promote.xml is identical, but the properties file differs.
 
Next, create crontab entries which match the frequency of your N and I builds. In this example, the latest Nightly VE build will be published every day at 15h40 EST. The latest Integration will be published every Tuesday at 16h00 EST. Note that the promote.xml is identical, but the properties file differs.
Line 26: Line 27:
 
       2>/dev/null 1> ~/promo_logs/cbi-ve-1.4-integration-Ganymede-promo.txt
 
       2>/dev/null 1> ~/promo_logs/cbi-ve-1.4-integration-Ganymede-promo.txt
  
In the N build properties file, we use "add" mode to incrementally publish N builds as they happen. In the I properties file, we use "replace" mode to scrub any accumulated builds and publish only the latest I build. So, once a week, we automatically purge the old garbage and get a fresh build.
+
In the [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.ve/org.eclipse.ve.releng/promote-N.properties?root=Tools_Project&view=markup N build properties file], we use "add" mode to incrementally publish N builds as they happen. In the [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.ve/org.eclipse.ve.releng/promote-I.properties?root=Tools_Project&view=markup I properties file], we use "replace" mode to scrub any accumulated builds and publish only the latest I build. So, once a week, we automatically purge the old garbage and get a fresh build.
  
 
In addition to publishing your zips, the promote.xml script also unpacks your Update zip into the path you specify, so you will have a daily/weekly up to date update site.
 
In addition to publishing your zips, the promote.xml script also unpacks your Update zip into the path you specify, so you will have a daily/weekly up to date update site.

Revision as of 02:20, 9 May 2009

OK, so you've built your SDK or runtime zip, your examples, your docs, your tests, and a p2 repo / update site. Great. How do you get those bits out to the world?

Well, for the simple case of "built on build.eclipse.org, published over NFS to download.eclipse.org", you can use a simple Ant script, run from your crontab on build.eclipse.org.

Example: VE Nightly and Integration Builds

Hudson-Config-Parameterized-Build.png

Say you want to run Nightlies every day, and a single Integration build once a week. First, set up two jobs in Hudson:

  1. https://build.eclipse.org/hudson/view/Athena%20CBI/job/cbi-ve-1.4-nightly-Ganymede/
  2. https://build.eclipse.org/hudson/view/Athena%20CBI/job/cbi-ve-1.4-integration-Ganymede/

(To save time, create the Nightly job, then copy it to produce the Integration build, passing in slightly different parameters like BUILDTYPE = N or BUILDTYPE = I.)

Next, create crontab entries which match the frequency of your N and I builds. In this example, the latest Nightly VE build will be published every day at 15h40 EST. The latest Integration will be published every Tuesday at 16h00 EST. Note that the promote.xml is identical, but the properties file differs.

# daily N builds
40 15 * * * /opt/public/common/apache-ant-1.7.1/bin/ant -f
  /opt/users/hudsonbuild/.hudson/jobs/cbi-ve-1.4-nightly-Ganymede/workspace/build/org.eclipse.ve.releng/promote.xml
    -Dpromote.properties=/opt/users/hudsonbuild/.hudson/jobs/cbi-ve-1.4-nightly-Ganymede/workspace/build/org.eclipse.ve.releng/promote-N.properties
      2>/dev/null 1> ~/promo_logs/cbi-ve-1.4-nightly-Ganymede-promo.txt
# weekly I build
00 16 * * 2 /opt/public/common/apache-ant-1.7.1/bin/ant -f
  /opt/users/hudsonbuild/.hudson/jobs/cbi-ve-1.4-integration-Ganymede/workspace/build/org.eclipse.ve.releng/promote.xml
    -Dpromote.properties=/opt/users/hudsonbuild/.hudson/jobs/cbi-ve-1.4-integration-Ganymede/workspace/build/org.eclipse.ve.releng/promote-I.properties
      2>/dev/null 1> ~/promo_logs/cbi-ve-1.4-integration-Ganymede-promo.txt

In the N build properties file, we use "add" mode to incrementally publish N builds as they happen. In the I properties file, we use "replace" mode to scrub any accumulated builds and publish only the latest I build. So, once a week, we automatically purge the old garbage and get a fresh build.

In addition to publishing your zips, the promote.xml script also unpacks your Update zip into the path you specify, so you will have a daily/weekly up to date update site.

References

Back to the top