You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 50 Next »

Content

Building Steps (Struts)

Getting ready

  1. Create an "Struts 2.x.y omnibus ticket" ticket in JIRA to refer to in upcoming release related commit comments and for general documentation purposes. Mark it with priority "Blocker".
  2. Switch to branch develop
  3. Ensure that the master POM and Struts Annotations have current releases
  4. Review JIRA for any issues without a fix version set, and for any issues that should be resolved for the pending release.
  5. Ensure that there are no repositories or pluginRepositories listed in the poms.
  6. If you have committed all changes regarding the release process, close the omnibus ticket as it is the last open ticket for the upcoming release
  7. Release the upcoming version in JIRA (under Administration/Manage Releases) and tag the release date
  8. Add next milestone version to the JIRA roadmap
  9. Create DONE and TODO filters for the new version, share with all, and remove obsolete TODO filter
  10. Create a new Version Notes page in Confluence, link from Migration Guide, and link to prior release page and JIRA DONE filters of the version to release
  11. Export wiki pages and put them under /docs

Be sure your local copy is up-to-date

git checkout develop
git pull

git fetch origin --prune

Create a release branch

git flow release start X.X.X.X
git flow release publish X.X.X.X

Now you should be on release/X.X.X.X branch (git status supposes confirm that). You must push changes to remote repo as the Release plugins will push changes to remote as well.

Prepare release

Tag the release by using the "release:prepare" goal of Maven:

mvn release:prepare -DautoVersionSubmodules=true -Dusername=yourSvnUsername -Dpassword=yourSvnPassword

For a dry run, add -DdryRun=true. If you do a dry run, use mvn release:clean to clean up after you have looked at the output.

When prompted for the SCM tag name, follow this pattern: STRUTS_2_3_[PATCH_VERSION]

If you get an error message, try to re-run mvn release:prepare -Dusername=yourSvnUsername -Dpassword=yourSvnPassword -DautoVersionSubmodules=true command again, -Dresume flag is set to true by default and the plugin will resume the release process from where it failed before.

Follow the link to get more information about performed operation by release plugin.

Perform the release

mvn release:perform -Dusername=yourSvnUsername

Follow the link to get more information about performed operation by release plugin. After this step the artifacts will be hosted by Nexus.

If you need to run perform again, (or in a different box), do:

git checkout STRUTS_2_3_[PATCH_VERSION]
mvn javadoc:javadoc deploy --no-plugin-updates -DperformRelease=true -Papache-release

Next, log in to Nexus and close staging repository.

Repository is identified by user name and public IP address, so if in meantime your IP changed, a new staging repository will be created so you must drop the old one (check the dates!) - if IP is the same, artifacts will be uploaded to the same repository as first attempt.

Move the assemblies

To simplify testing, the assemblies have to be moved to the /www/people.apache.org/builds/struts/$VERSION dir.

After closing repository in Nexus, check if the release files are available from staging repository as bellow:

https://repository.apache.org/content/groups/staging/org/apache/struts/struts2-assembly/$VERSION/

In order to move the assemblies login to people.apache.org and execute the following code:

#!/bin/sh
# create the destination directory
mkdir $VERSION
cd $VERSION

# get the distro
wget -erobots=off -nv  -l 1 --accept=zip,md5,sha1,asc -r --no-check-certificate -nd -nH https://repository.apache.org/content/groups/staging/org/apache/struts/struts2-assembly/$VERSION

# rename files
for f in *2-assembly*.zip*
do
 mv $f `echo $f | sed s/2-assembly//g`
done

# remove unneeded files
for f in struts2-assembly-*.pom*
do
 rm $f
done

# remove unneeded hashes
rm *.asc.md5
rm *.asc.sha1

After that move the assemblies directory to the builds destination with

mv $VERSION /www/people.apache.org/builds/struts/

Announce availability

Send a short e-mail to dev@struts.a.o informing about the new packages and to give people enough time to test the distribution (actual bits). Wait around a week before posting Vote. If no show-stoppers reported, start a vote thread for build quality designation.

Clean up repository

It doesn't matter if the bits will be accepted or not, development continues (smile) Switch to release/X.X.X.X branch and execute the below command:

git flow release finish -n X.X.X.X

-n option is need to avoid tagging the release, the Maven Release plugin did that already. If the release branch was published to the remote it won't be deleted locally, it must be done manually after removing branch from the remote:

git push --delete origin release/X.X.X.X

This will remove the branch from the remote, now we can merge once more the release branch (when on develop) and remove it

git merge --no-ff release/X.X.X.X
git branch -d release/X.X.X.X

Now both master and develop branches should be up to date with the changes introduced by the release.

Vote on it

Post a release/quality vote to the dev list (and only the dev list). The example mail is on Sample announcements page.
If the vote result is for an ASF release (i.e. not test build), update site, announce. If the vote result is for GA, push to central.

Copy files

After the vote, if the distribution is being mirrored (there was a favourable release vote) copy the Sources and Binaries:

ssh people.apache.org
cd /www/people.apache.org/builds/struts/$VERSION
cp struts-$VERSION-src.*  /www/www.apache.org/dist/struts/source
cp struts-$VERSION-docs.*  /www/www.apache.org/dist/struts/documentation
cp struts-$VERSION-lib.* /www/www.apache.org/dist/struts/library
cp struts-$VERSION-apps.* /www/www.apache.org/dist/struts/examples
cp struts-$VERSION-all.* /www/www.apache.org/dist/struts/binaries   

Promote release

Log in again to Nexus and release the repository, it will be automatically replicated across Maven Repositories
See Releasing a Maven-based project for further details.

Clean up old releases

Remove the old files from under /www/www.apache.org/dist/struts/ to synchronise only the latest version with peers. All the files from /www/www.apache.org/dist/ are always mirrored to http://archive.apache.org/dist/struts/. You can use the below command:

cd /www/www.apache.org/dist/struts/
find . -type f -name "struts-2.3.x*" -exec rm -f {} \;

where x is the previous version to remove (or one more previous to keep current and one version back).

Wait for rsync

Wait 24 hours before proceeding.

(Optional) - Update Security Bulletins

If the release will fix a - hopefully yet undisclosed - security issue, it's now time to update the Security Bulletins page and add a new announcement. For a template, just check former announcements

Update site

  • Check out site src code

    svn co https://svn.apache.org/repos/asf/struts/site/ struts-site
    
  • If a new DTD was defined, add it to source/dtds
  • Update current version and release date in struts-site/_config.yml
  • Update page source files
    • struts-site/source/announce.md (if applicable, refer also to corresponding security bulletin)
    • struts-site/source/downloads.html (Prior Releases section)
    • struts-site/source/index.html (some parts will updated automatically with values defined in _config.yml)
    • struts-site/source/archetype-catalog.xml
  • Generate site with Jekyll
    • jekyll build
    • with jekyll serve -w you can check the generated site at http://localhost:4000
  • Commit the changes and the generated content

Now the changes must be deployed to production which is basically a separated Subversion repository, you check it out with command below:

svn co https://svn.apache.org/repos/infra/websites/production/struts/content struts-production

It's a good idea to keep that working copy to be used with future releases. Right now copy content of struts-site/content to struts-production, then commit changes. Next step is to update exported wiki pages. With current approach the pages are kept in struts-production/release/2.X.x/docs where X is the current branch (ie. 2.3.x, 2.2.x and so on). Simply remove the whole content from under /docs and update it with docs from assembly (you can download one from Maven repository or copy generated during release process which supposes to be in struts/assembly/target/cwiki). And commit changes.

Redeploy the draft docs (Optional)

Make public available all the pages that could leak confidential information about the vulnerability. Wait or manually export the space in Confluence. Build snapshot locally and copy assembly/target/assembly/out/struts2-#.#.#-SNAPSHOT-docs.zip to people.apache.org and update /www/struts.apache.org/2.x/docs

Post announcements

We leave this as the last step, once the artifacts have had time to sync up on the mirrors. Target it to: user@struts.a.o and announcements@struts.a.o, samples are available at Sample announcements page

  • No labels