Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
git fetch origin --prune
git checkout developmaster
git pull
Note

Please remember to keep BOM subproject in sync - <struts-version.version>X.X.X</struts-version.version> - must be the same as the parent pom.

Create a release branch

Code Block
git flow release start X.X.X.X
git flow release publish X.X.X.X

...

The latest Maven version handles this case very well but it's worth checking if the bits are in sync.

Prepare release

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

...

Code Block
mvn release:perform -DretryFailedDeploymentCount=10

Follow the link to get more information about performed operation by release plugin. After this step the artifacts will be hosted by Nexus. The -DretryFailedDeploymentCount=10 is needed when there are problems with network connection (used just in case).

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

...

To simplify testing, the assemblies have to be moved to the https:/www/peopledist.apache.org/buildsrepos/dist/dev/struts/$VERSION dir.

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

...

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

none
Code Block
none
#!/bin/sh
# create
#create the destination directory
echo "Creating working dir $VERSION"
mkdir $VERSION
cd $VERSION

# get the distro
echo "Getting distro $VERSION"
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
echo "Renaming files"
for f in *2-assembly*.zip*
do
 mv $f `echo $f | sed s/2-assembly//g`
done

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

# remove unneeded hashes
echo "Removing unneeded files"
rm *.asc.md5
rm *.asc.sha1

After that move the assemblies directory to the builds destination with

...


cd ..
 
# checking in new version
echo "Pushing test version $VERSION"
svn --no-auth-cache co --depth empty https://dist.apache.org/repos/dist/dev/struts/ struts-dev
mv $VERSION struts-dev/
cd struts-dev
svn add --force ./
svn --no-auth-cache commit -m "Updates test release $VERSION"
cd ..

# cleaning up
rm -r struts-dev

echo "Done!"

After this step artifacts are available for test here https://dist.apache.org/repos/dist/dev

...

/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:

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

Push changes

Do not forget to push your local changes to the Apache repo-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:

Code Block
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

Code Block
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.

Note

Do not remove the tag! It clearly indicates what was planned and it can be used as a history marker. Always used the next version number, do not redeploy the same version as it breaks Maven's policy and you will have to manually clean up Maven repository.

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.

...

After the vote, if the distribution is being mirrored (there was a favourable release vote) copy the Sources and Binariesmove all the artefacts from dev folder into release folder:

Code Block
ssh people.apache.org
cd /www/peoplesvn mv https://dist.apache.org/buildsrepos/struts/$VERSION
cp struts-$VERSION-src.*  /www/www.apache.org/distdist/dev/struts/source
cp struts-$VERSION-docs.*  /www/www.apache.org/dist/struts/documentation
cp struts-$VERSION-lib.* /www/www.$VERSION/ https://dist.apache.org/dist/struts/library
cp struts-$VERSION-apps.* /www/www.apache.org/dist/struts/examples
cp struts-$VERSION-all.* /www/www.apache.org/distrepos/dist/release/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.

...

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

No Format
cdsvn del https:/www/wwwdist.apache.org/repos/dist/release/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 24 hours before proceeding.

Update site

  • Make sure you have linked your Apache and Github account in Apache GitBox (Dual Master Git alowing you to directly push to GitHub), see https://gitbox.apache.org/setup/

  • Check out site src code

    Code Block
    svngit coclone https://svngithub.apache.org/repos/asfcom/apache/struts/site/ -site.git

    or use SSH instead:

    Code Block
    git clone git@github.com:apache/struts-site
    .git
  • 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)
  • Generate site with Docker Jekyll image
    • jekyll build
    • you must have Docker installed and running
    • if you are doing this the first time, download the official Struts image to build the site from https://hub.docker.com/r/theapachestruts/struts-site-jekyll/
    • start docker-machine
    • now you can use one of the bash scripts already provided in the struts-site:
      • docker-run.sh - used with Bash
      • docker-run.fish - to use with Fish Shell (via fish docker-run.fish)
    • now with jekyll serve -w you can check the generated site at http://localhost:4000
  • Commit the changes and the generated content

...

It's a good idea to keep that working copy to be used with future releases. Right now copy content of struts-site/content folder to struts-production folder, 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

...

docs (Optional)

  • Checkout source of the website and export Confluence pages

    Code Block
    svn co https://svn.apache.org/repos/asf/struts/site/trunk struts-site
    cd struts-site
    mvn package

    Now the whole Confluence space is exported to target/cwiki/WW/docs/

  • Checkout copy of production website (if you didn't that before)

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

    (you can checkout just a subtree, but it's better to checkout the whole repo especially when you want to update also the main web page)

  • Update production

    Code Block
    cp -r struts-site/target/cwiki/WW/docs/* struts-production/development/2.x/docs/
    cd struts-production
    svn commit "Updates production"

...

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, announcements@struts.a.o and  announce@a.o, samples are available at Sample announcements page