Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
h3. Create a release branch

Current practice dictates that non-indie *.x branch pom versions must remain constant for the life of the branch. *.x branch pom files are versioned [major version].[minor version]-SNAPSHOT (e.g., 2.8-SNAPSHOT).  In addition, no snapshot jars are permitted in the Maven2 release repo.  Because of these rules, particularly the latter, a release branch must be created prior to a release for each non-indie project in order to reset each pom <version> to a non-snapshot version (e.g., 2.8.1). 

Release branches should only be created after all *.x branch blockers have been eliminated.  Once the release branch is created the *.x branch is free to accept merged code not intended for the release.  However, given the vagaries of CLE quality assurance late breaking release blockers are often discovered after the release branch is created.  This creates challenges for the release team and branch managers since blocker fixes must be merged both to the *.x maintenance branch AND the release branch.  Great vigilance is required to track the commit stream to ensure that fixes required for the release are not missed.

Indie projects, which leverage the Maven release plugin, are easier to manage.  Releases are performed from existing *.x maintenance branches (no release branch is required) and the plugin handles pom version changes, tag creation and binaries generation and deployment automatically.

Non-indie release branches (as well as tags) are created using the following bash script.  

TODO: add URL 

The script takes six arguments.
{noformat}
$ bash sakaitagbuilder-2.8.bash [Jira ticket number] \
[source branch] \ 
[take HEAD=true|false] \
[target=branches|tags] \
[sakai version] \
[version suffix=mXX|aXX|bXX|rcXX]

$ bash sakaitagbuilder-2.8.bash SAK-20967 sakai-2.8.x true branches 2.8.1
{noformat}

h3. Update pom.xml <version>, master pom.xml <properties>, sakai.properties

h5. 1. Update <version>; find/replace 2.*-SNAPSHOT with release version
{code:xml}
<version>2.8-SNAPSHOT</version> -> <version>2.8.1</version> 
{code}

h5. 2. Update <sakai.version> (master pom.xml)
{code:xml}
<sakai.version>2.8.1</sakai.version>
{code}

h5. 3. Update Indie version <properties> (master pom.xml)

{code:xml}
<sakai.version>2.8.1</sakai.version>
<sakai.kernel.version>1.2.5</sakai.kernel.version>
 . . .
<sakai.basiclti.version>1.3.3</sakai.basiclti.version>
<sakai.common.version>1.1.3</sakai.common.version>
<sakai.contentreview.version>2.8.5</sakai.contentreview.version>
<sakai.edu-services.version>1.1.2</sakai.edu-services.version>
<sakai.ets.version>0.5.3</sakai.ets.version>
<sakai.entitybroker.version>1.4.2</sakai.entitybroker.version>
<sakai.hybrid.version>1.1.4</sakai.hybrid.version>
<sakai.jsf.version>2.8.2</sakai.jsf.version>
<sakai.msgcntr.version>2.8.1</sakai.msgcntr.version>
<sakai.polls.version>1.4.2</sakai.polls.version>
<sakai.profile.version>2.8.2</sakai.profile.version>
<sakai.profile2.version>1.4.2</sakai.profile2.version>
<sakai.resetpass.version>2.8.2</sakai.resetpass.version>
<sakai.sakai-mock.version>2.8.2</sakai.sakai-mock.version>
<sakai.samigo.version>2.8.2</sakai.samigo.version>
<sakai.scheduler.version>2.8.1</sakai.scheduler.version>
<sakai.search.version>1.3.4</sakai.search.version>
<sakai.shortenedurl.version>1.0.2</sakai.shortenedurl.version>
<sakai.sitestats.version>2.2.1</sakai.sitestats.version>
<sakai.webservices.version>1.0.2</sakai.webservices.version>
{code}

h5. 4. Review other properties such as Tomcat or Quartz versions and update as necessary.

{code:xml}
<sakai.commons.lang.version>2.5</sakai.commons.lang.version>
<sakai.commons.fileupload.version>1.2.1</sakai.commons.fileupload.version>
<sakai.ehcache.groupId>net.sf.ehcache</sakai.ehcache.groupId>
<sakai.ehcache.artifactId>ehcache</sakai.ehcache.artifactId>
<sakai.ehcache.version>1.6.1</sakai.ehcache.version>
<sakai.hibernate.groupId>org.hibernate</sakai.hibernate.groupId>
<sakai.hibernate.artifactId>hibernate</sakai.hibernate.artifactId>
<sakai.hibernate.version>3.2.7.ga</sakai.hibernate.version>
<sakai.jcr.version>1.0</sakai.jcr.version>
<sakai.pluto.version>1.1.7</sakai.pluto.version>
<sakai.quartz.version>1.6.6</sakai.quartz.version>
<sakai.servletapi.version>2.4</sakai.servletapi.version>
<sakai.spring.groupId>org.springframework</sakai.spring.groupId>
<sakai.spring.artifactId>spring</sakai.spring.artifactId>
<sakai.spring.version>2.5.6.SEC01</sakai.spring.version>
<sakai.spring.test.artifactId>spring-test</sakai.spring.test.artifactId>
<sakai.spring.test.version>2.5.6.SEC01</sakai.spring.test.version>
<sakai.tomcat.version>5.5.33</sakai.tomcat.version>
<sakai.xerces.impl.version>2.6.2</sakai.xerces.impl.version>
<sakai.xerces.api.version>2.6.2</sakai.xerces.api.version>
{code}

h5. 5. Update sakai.properties

h6. {{default.sakai.properties}}
{noformat}
version.service=RELEASE
version.sakai=2.8.1
{noformat}

h6. {{demo.sakai.properties}}
{noformat}
version.service=DEMO
version.sakai=2.8.1
{noformat}

h6. {{sample.sakai.properties}}
{noformat}
version.service=SAMPLE
version.sakai=2.8.1
{noformat}

h5. 6. Check stealth settings and adjust accordingly for the default and demo sakai.properties

h6. {{default.sakai.properties}}
{noformat}
# STEALTH TOOLS  
# A stealth tool is a tool that is running in Sakai but is not available to be added to a site in Worksite Setup.
# For Development/QA purposes stealthTools property will be commented out; release artifacts will have the property uncommented.
stealthTools@org.sakaiproject.tool.api.ActiveToolManager=sakai.profile
{noformat}

h6. {{demo.sakai.properties}}
{noformat}
# STEALTH TOOLS.  A stealth tool is a tool that is running in Sakai, but is not available to be added to a site in Worksite Setup.
stealthTools@org.sakaiproject.tool.api.ActiveToolManager=sakai.profile,sakai.search
{noformat}

(-) Review {{reference/docs/sakai.properties}} {{version.service}} and {{version.sakai}}.  These files should not have been updated by developers. Check logs for changes.

{{reference/docs/sakai.properties}}
{noformat}
version.service=RELEASE
version.sakai=2.8.1
{noformat}

h5. Double check {{/reference/docs/conversion}}

(!) Review sql conversion scripts, update and commit as necessary.

h5. /master/pom.xml: confirm {{<distributionManagement>}}, {{maven-taglib-plugin}}, {{maven-javadoc-plugin}} and Sakai maven plugin settings. Commit changes if necessary.

h6. 1. {{<distributionManagement>}}
{code:xml}
<distributionManagement>
    <repository>
      <uniqueVersion>false</uniqueVersion>
      <id>local</id>
      <name>Local Test</name>
      <url>file:///tmp/maven2</url>
      <layout>default</layout>
    </repository>
    <site>
      <id>local</id>
      <name>Local Test</name>
      <url>file:///tmp/site</url>
    </site>
  </distributionManagement>
{code}

(!) Consider deploying directly to Maven2 release repo.  See rationale below.

h6. 2. {{maven-taglib-plugin}}
{code:xml}
<plugin>
	<groupId>net.sourceforge.maven-taglib</groupId>
	<artifactId>maven-taglib-plugin</artifactId>
	<configuration>
		<goalPrefix>taglib</goalPrefix>
		<taglib.src.dir>src</taglib.src.dir>
		<!-- <taglib.src.dir>src/webapp/WEB-INF</taglib.src.dir> -->
	</configuration>
</plugin>
{code}

h6 3. Confirm javadoc plugin definition.  Beware setting max memory settings too low.
{code:xml}
<plugin>
 {code:xml}
<distributionManagement>
        <downloadUrl>http://source.sakaiproject.org/maven2/</downloadUrl>
        <snapshotRepository>
            <uniqueVersion>false</uniqueVersion>
            <id>sakai-maven-snapshots-scp</id>
            <name>Sakai snapshot Repo</name>
            <url>scp://source.sakaiproject.org/var/www/html/maven2-snapshots</url>
            <layout>default</layout>
        </snapshotRepository>
        <repository>
            <uniqueVersion>false</uniqueVersion>
            <id>sakai-maven2-scp</id>
            <name>Sakai  <groupId>org.apache.maven.plugins</groupId>maven2 repository</name>
            <url>scp://source.sakaiproject.org/var/www/html/maven2</url>
    <artifactId>maven-javadoc-plugin</artifactId>        <layout>default</layout>
        <version>2.8<</version>repository>
        <site>
       <configuration>      <id>sakai-site</id>
            <name>Sakai release <debug>true<Site</debug>name>
            <url>${url.localsite}</url>
       <links> </site>
    </distributionManagement>
{code}

h6. 2. {{maven-taglib-plugin}}
{code:xml}
<plugin>
	<groupId>net.sourceforge.maven-taglib</groupId>
	<artifactId>maven-taglib-plugin</artifactId>
         <link>http://download.oracle.com/javase/1.5.0/docs/api/</link>
                        <link>http://download.oracle.com/javase/6/docs/api/</link>
                    </links>
       	<configuration>
		<goalPrefix>taglib</goalPrefix>
		<taglib.src.dir>src</taglib.src.dir>
		<!-- <taglib.src.dir>src/webapp/WEB-INF</taglib.src.dir> -->
	</configuration>
</plugin>
{code}

h6. 3. Confirm sakai maven plugin <version> equals 1.2.0

{code:xml}
<plugin>
  <inherited>true</inherited>
  <groupId>org.sakaiproject.maven.plugins</groupId>
  <artifactId>sakai</artifactId>
    <version>1.2.0</version>
    . . . .
</plugin>
{code}

h6. 4. Disable snapshot repo
(/) Insulate deployers against the possibility of snapshots leaking into release.

{code:xml}
<repositories>
. . .
     <repository>
      <breakiterator>true</breakiterator>      <id>sakai-maven2-snapshots</id>
            <name>Sakai Maven <verbose>false<Repo</verbose>name>
            <layout>default</layout>
       <aggregate>true</aggregate>        <url>http://source.sakaiproject.org/maven2-snapshots</url>
            <minmemory>168m</minmemory><snapshots>
                <enabled>false</enabled>
   <maxmemory>1024m</maxmemory>         </snapshots>
           <additionalJOption>-J-Xms168m -J-Xmx1024m -J-XX:PermSize=128m -J-XX:NewSize=64m</additionalJOption> <releases>
                <<enabled>false</configuration>enabled>
            </plugin>releases>
{code}  h6. 4. Confirm /master/pom.xml Sakai Maven plugin <version></repository>
from. 1.2 .0
<repositories>
{code:xml}
<plugin>
h5.  <inherited>true</inherited>
  <groupId>org.sakaiproject.maven.plugins</groupId>
  <artifactId>sakai</artifactId>
    <version>1.2.0</version>
    . . . .
</plugin>
{code}

h3. Check out, install, deploy and start up the release branch in Tomcat.

Perform a test build of the release branch.

Local environment set up
# Delete .m2/repository/org/sakaiproject (force fresh install)
# Create new MySQL 5.1.x database named "sakai" 
# Start with clean Tomcat 5.5.33 servlet container
# Confirm maven-taglib is defined in .m2/settings.xml

{code:xml}
<!-- Reference plugins in order to use <goalPrefix> short-hand -->
<pluginGroups>
    <pluginGroup>net.sourceforge.maven-taglib</pluginGroup>
</pluginGroups>
{code}

{no format}
svn co https://source.sakaiproject.org/svn/sakai/branches/sakai-2.8.1 2.8.1
cd 2.8.1
mvn clean install sakai:deploy
{no format}

If build fails, debug.  If build is successful, start Tomcat.  Check logs for warnings and errors.

h3. Build and deploy release binaries to Sakai Maven2 release repo.

(-) WARNING: create backup folder of /var/www/html/maven2/org/sakaiproject on source.sakaiproject.org before deploying release binaries to repo.

h5. Get copy of maven2/org/sakaiproject repo

Tar up {{maven2/org/sakaiproject}} and sftp or scp across the network to build machine and deploy binaries locally.  This step is now prohibitively expensive in terms of download time.  

(!) Consider eliminating this step and instead adjust build script to deploy non-indie projects directly to the repo via scp.

The challenge here is that you need all the Maven metadata files locally so that they can be properly updated during the release.Base pom.xml: confirm javadoc plugin definition.  Beware setting max memory settings too low.
{code:xml}
<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.8</version>
                <configuration>
                    <debug>true</debug>
                    <links>
                        <link>http://download.oracle.com/javase/1.5.0/docs/api/</link>
                        <link>http://download.oracle.com/javase/6/docs/api/</link>
                    </links>
                    <breakiterator>true</breakiterator>
                    <verbose>false</verbose>
        h5. /master/pom.xml          h5. (-) /reference/conversion<aggregate>true</aggregate>
     Review sql conversion scripts, update and commit as necessary.  h5. base pom.xml  1. Confirm<minmemory>168m</minmemory>
javadoc plugin definition.  Should be configured as follows:  {code:xml} <plugin>         <maxmemory>1024m</maxmemory>
       <!-- javadocs -->           <additionalJOption>-J-Xms168m -J-Xmx1024m     <groupId>org.apache.maven.plugins</groupId>-J-XX:PermSize=128m -J-XX:NewSize=64m</additionalJOption>
                <artifactId>maven-javadoc-plugin</artifactId></configuration>
            </plugin>
{code}

 <version>2.6.1</version>
                <configuration>
                    <debug>true</debug>
                    <links>
                        <link>http://java.sun.com/j2se/1.5.0/docs/api/
                        </link>
                    </links>
                    <breakiterator>true</breakiterator>
                    <verbose>false</verbose>
                    <aggregate>true</aggregate>
                        <maxmemory>512m</maxmemory>
               h3. Check out, install, deploy and start up the release branch in Tomcat.

Perform a test build of the release branch.

Local environment set up
# Delete .m2/repository/org/sakaiproject (force fresh install)
# Create new MySQL 5.1.x database named "sakai" 
# Start with clean Tomcat 5.5.33 servlet container
# Confirm maven-taglib is defined in .m2/settings.xml

{code:xml}
<!-- Reference plugins in order to use <goalPrefix> short-hand -->
<pluginGroups>
    <pluginGroup>net.sourceforge.maven-taglib</pluginGroup>
</pluginGroups>
{code}

{no format}
svn co https://source.sakaiproject.org/svn/sakai/branches/sakai-2.8.1 2.8.1
cd 2.8.1
mvn clean install sakai:deploy
{no format}

If build fails, debug.  If build is successful, start Tomcat.  Check logs for warnings and errors.

h3. Build and deploy release binaries to Sakai Maven2 release repo.

(-) Warn: create backup folder of /var/www/html/maven2/org/sakaiproject on source.sakaiproject.org before deploying release binaries to repo.

h5. Get copy of maven2/org/sakaiproject repo

Tar up {{maven2/org/sakaiproject}} and sftp or scp across the network to build machine and deploy binaries locally.  This step is now prohibitively expensive in terms of download time.  

(!) Consider eliminating this step and instead adjust build script to deploy non-indie projects directly to the repo via scp.






The challenge here is that you need all the Maven metadata files locally so that they can be properly updated during the release. 






 <additionalJOption>-J-Xms168m -J-Xmx512m -J-XX:PermSize=128m -J-XX:NewSize=64m</additionalJOption>h5. /master/pom.xml







h5. (-) /reference/conversion

Review sql conversion scripts, update and commit as </configuration>
</plugin>
{code}necessary.





h5.  Run sakaiartifactgenerator.bash 

{noformat}
sh sakaiartifactgenerator.sh 2.8.1 /Users/arwhyte/Development/svn/sakai/branches/sakai-2.8.1
{noformat}

h5. Download and check samigo audio jar for signature

{noformat}
jarsigner -verify sakai-samigo-audio-2.8.1.jar
{noformat}

h5. Check artifacts

1. Build and deploy the sakai-src archives. 

*WARNING* do not issue clean and install goals or local repo will get wiped prematurely (Sakai maven2 repo has yet to be updated).

{noformat}
cd master
mvn install
cd ..
mvn -o -Dmaven.test.skip=true sakai:deploy
{noformat}

2. Test the sakai-bin archives

Check that the ant task built the archives correctly.  Fix if necessary as follows:

{noformat}
tar -czvf sakai-bin-2.8.1.tgz ECLv2.text common components licenses server shared webapps
{noformat}

3. Run the demo artifact.

h3.  Update Sakai Maven2 repo

1.  Make backup copy of current maven2/org/sakaiproject folder where x.x.x equals the previous Sakai release number.  Then untar updated files:

{noformat}
sudo tar -xvzf mavenrepo-2.8.1.tgz -C /var/www/html/
{noformat}

h3. Cut release tag from 2.8.1 branch

The sakaitagbuilder.bash script accepts two arguments: Sakai version and tag suffix (e.g., blank, beta01, rc01, qa01).  In this case no tag suffix is required.

{noformat}
bash sakaitagbuilder-2.8.bash [JIRA ISSUE] sakai-2.8.1 tags 2.8.1
{noformat}

After the release is generated, backup .m2/repository/org/sakaiproject, whack original (to ensure someone new can populate their repo from scratch), download the release tag and build and deploy it to a fresh Tomcat and fresh MySQL database.

h3.  Update release pages

Make sure that external links to Confluence release pages are updated.