Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "EclipseSCADA/Release/Perform"
m (→Generate Qualifier) |
|||
Line 1: | Line 1: | ||
{{Note|This page is work in progress}} | {{Note|This page is work in progress}} | ||
− | == | + | == Preface == |
− | All release builds are performed using the "aggregator" project. | + | === Common stuff === |
+ | |||
+ | All release builds are performed using the "aggregator-release" project -> https://hudson.eclipse.org/scada/job/aggregator-release/ | ||
Related pages: | Related pages: | ||
* [[Common Build Infrastructure/Build Types]] | * [[Common Build Infrastructure/Build Types]] | ||
+ | |||
+ | This document uses "bash" shell commands and assumes your are running a Linux system with the following tools installed: | ||
+ | |||
+ | * Git | ||
+ | * Java 1.7 | ||
+ | * Maven | ||
+ | |||
+ | === Naming === | ||
+ | |||
+ | Release Branch: 0.1.x-release | ||
+ | Tags (Release): R0.1.0 | ||
+ | Tags (Milestone): S0.1.0.M1 | ||
+ | |||
+ | === Settings === | ||
+ | |||
+ | All commands below will make use of the following shell variables: | ||
+ | |||
+ | branch=0.1.x-release | ||
+ | buildType=S | ||
+ | version=0.1.0 | ||
+ | qualifier=M1 | ||
+ | |||
+ | repos=external utils chart protocols base core hmi ide deploy releng | ||
+ | |||
+ | release="$version" | ||
+ | [ ! -z "$qualifier" ] && release="$release.qualifier" | ||
+ | |||
+ | tag="$buildType$release" | ||
== Prepare new release branch == | == Prepare new release branch == | ||
Create a new branch for each release cycle: e.g. '''0.1.x-release''' | Create a new branch for each release cycle: e.g. '''0.1.x-release''' | ||
+ | |||
+ | for i in "repos"; do | ||
+ | repo="org.eclipse.scada.${i}" | ||
+ | echo $repo | ||
+ | git clone git://git.eclipse.org/gitroot/eclipsescada/$repo | ||
+ | pushd $repo | ||
+ | git branch "$branch" | ||
+ | git push origin "$branch" | ||
+ | popd | ||
+ | done | ||
Changes on the master must be merged to the release branch during the release cycle. New features that should not be included in the release must go to separate feature branches. After the final release is performed they may be merged on the master. | Changes on the master must be merged to the release branch during the release cycle. New features that should not be included in the release must go to separate feature branches. After the final release is performed they may be merged on the master. | ||
Line 18: | Line 58: | ||
== Checkout == | == Checkout == | ||
+ | git clone git://git.eclipse.org/gitroot/eclipsescada/org.eclipse.scada.external.git -b "$branch" | ||
+ | git clone git://git.eclipse.org/gitroot/eclipsescada/org.eclipse.scada.utils.git -b "$branch" | ||
+ | git clone git://git.eclipse.org/gitroot/eclipsescada/org.eclipse.scada.chart.git -b "$branch" | ||
+ | git clone git://git.eclipse.org/gitroot/eclipsescada/org.eclipse.scada.protocols.git -b "$branch" | ||
+ | git clone git://git.eclipse.org/gitroot/eclipsescada/org.eclipse.scada.base.git -b "$branch" | ||
+ | git clone git://git.eclipse.org/gitroot/eclipsescada/org.eclipse.scada.core.git -b "$branch" | ||
+ | git clone git://git.eclipse.org/gitroot/eclipsescada/org.eclipse.scada.hmi.git -b "$branch" | ||
+ | git clone git://git.eclipse.org/gitroot/eclipsescada/org.eclipse.scada.ide.git -b "$branch" | ||
+ | git clone git://git.eclipse.org/gitroot/eclipsescada/org.eclipse.scada.deploy.git -b "$branch" | ||
+ | git clone git://git.eclipse.org/gitroot/eclipsescada/org.eclipse.scada.releng.git -b "$branch" | ||
+ | |||
+ | # checkout master branch -- for testing only | ||
+ | |||
git clone git://git.eclipse.org/gitroot/eclipsescada/org.eclipse.scada.external.git | git clone git://git.eclipse.org/gitroot/eclipsescada/org.eclipse.scada.external.git | ||
git clone git://git.eclipse.org/gitroot/eclipsescada/org.eclipse.scada.utils.git | git clone git://git.eclipse.org/gitroot/eclipsescada/org.eclipse.scada.utils.git | ||
Line 28: | Line 81: | ||
git clone git://git.eclipse.org/gitroot/eclipsescada/org.eclipse.scada.deploy.git | git clone git://git.eclipse.org/gitroot/eclipsescada/org.eclipse.scada.deploy.git | ||
git clone git://git.eclipse.org/gitroot/eclipsescada/org.eclipse.scada.releng.git | git clone git://git.eclipse.org/gitroot/eclipsescada/org.eclipse.scada.releng.git | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== Generate Qualifier == | == Generate Qualifier == | ||
Line 48: | Line 89: | ||
bundles, features and repositories. | bundles, features and repositories. | ||
− | + | mvn versions:set -f org.eclipse.scada.releng/superParent -DnewVersion=$release | |
mvn org.eclipse.scada.releng:build-helper:0.0.12:generate-qualifier \ | mvn org.eclipse.scada.releng:build-helper:0.0.12:generate-qualifier \ | ||
-f org.eclipse.scada.releng/aggregator/pom.xml \ | -f org.eclipse.scada.releng/aggregator/pom.xml \ | ||
Line 63: | Line 104: | ||
Commit the changed qualifiers to the branch and tag it. | Commit the changed qualifiers to the branch and tag it. | ||
− | + | for i in "repos"; do | |
− | + | repo="org.eclipse.scada.${i}" | |
− | + | ||
− | + | pushd "$repo" | |
− | pushd "$ | + | |
git add . | git add . | ||
git commit -m "Generate version qualifiers for $release" | git commit -m "Generate version qualifiers for $release" | ||
− | git tag -a "$release" -m "Tag release $release" | + | git tag -a "$release" -m "Tag release - $release" |
popd | popd | ||
done | done | ||
Line 82: | Line 122: | ||
-Ddownload.root=/tmp/my-download-test \ | -Ddownload.root=/tmp/my-download-test \ | ||
-Declipse.download.root=http://download.eclipse.org | -Declipse.download.root=http://download.eclipse.org | ||
+ | |||
+ | == Check the output == | ||
+ | |||
+ | The output goes to: | ||
+ | /tmp/my-download-test | ||
+ | |||
+ | Unless you changed the previous command ;-) | ||
+ | |||
+ | {{Note|Output from the local build is not signed}} | ||
== Push commit and tag == | == Push commit and tag == | ||
Push the commit and tag if the local build was successful. | Push the commit and tag if the local build was successful. | ||
+ | |||
+ | for i in "repos"; do | ||
+ | repo="org.eclipse.scada.${i}" | ||
+ | |||
+ | pushd "$repo" | ||
+ | git push origin refs/heads/$branch refs/tags/$tag | ||
+ | popd | ||
+ | done | ||
== Perform build == | == Perform build == | ||
Perform the build on the Eclipse SCADA Hudson instance | Perform the build on the Eclipse SCADA Hudson instance | ||
+ | |||
+ | Job: https://hudson.eclipse.org/scada/job/aggregator-release/ | ||
+ | |||
+ | Which should execute the following build command: | ||
mvn clean verify -Prpm -Pdeb -Peclipse-sign -Peclipse-hudson -Pmilestone '-P!integration' | mvn clean verify -Prpm -Pdeb -Peclipse-sign -Peclipse-hudson -Pmilestone '-P!integration' |
Revision as of 05:31, 22 November 2013
Contents
Preface
Common stuff
All release builds are performed using the "aggregator-release" project -> https://hudson.eclipse.org/scada/job/aggregator-release/
Related pages:
This document uses "bash" shell commands and assumes your are running a Linux system with the following tools installed:
- Git
- Java 1.7
- Maven
Naming
Release Branch: 0.1.x-release Tags (Release): R0.1.0 Tags (Milestone): S0.1.0.M1
Settings
All commands below will make use of the following shell variables:
branch=0.1.x-release buildType=S version=0.1.0 qualifier=M1 repos=external utils chart protocols base core hmi ide deploy releng release="$version" [ ! -z "$qualifier" ] && release="$release.qualifier" tag="$buildType$release"
Prepare new release branch
Create a new branch for each release cycle: e.g. 0.1.x-release
for i in "repos"; do repo="org.eclipse.scada.${i}" echo $repo git clone git://git.eclipse.org/gitroot/eclipsescada/$repo pushd $repo git branch "$branch" git push origin "$branch" popd done
Changes on the master must be merged to the release branch during the release cycle. New features that should not be included in the release must go to separate feature branches. After the final release is performed they may be merged on the master.
If it turns out that merging on the release branch is to cumbersome we will make branches for every release tag in order to prevent merge issues.
Checkout
git clone git://git.eclipse.org/gitroot/eclipsescada/org.eclipse.scada.external.git -b "$branch" git clone git://git.eclipse.org/gitroot/eclipsescada/org.eclipse.scada.utils.git -b "$branch" git clone git://git.eclipse.org/gitroot/eclipsescada/org.eclipse.scada.chart.git -b "$branch" git clone git://git.eclipse.org/gitroot/eclipsescada/org.eclipse.scada.protocols.git -b "$branch" git clone git://git.eclipse.org/gitroot/eclipsescada/org.eclipse.scada.base.git -b "$branch" git clone git://git.eclipse.org/gitroot/eclipsescada/org.eclipse.scada.core.git -b "$branch" git clone git://git.eclipse.org/gitroot/eclipsescada/org.eclipse.scada.hmi.git -b "$branch" git clone git://git.eclipse.org/gitroot/eclipsescada/org.eclipse.scada.ide.git -b "$branch" git clone git://git.eclipse.org/gitroot/eclipsescada/org.eclipse.scada.deploy.git -b "$branch" git clone git://git.eclipse.org/gitroot/eclipsescada/org.eclipse.scada.releng.git -b "$branch" # checkout master branch -- for testing only git clone git://git.eclipse.org/gitroot/eclipsescada/org.eclipse.scada.external.git git clone git://git.eclipse.org/gitroot/eclipsescada/org.eclipse.scada.utils.git git clone git://git.eclipse.org/gitroot/eclipsescada/org.eclipse.scada.chart.git git clone git://git.eclipse.org/gitroot/eclipsescada/org.eclipse.scada.protocols.git git clone git://git.eclipse.org/gitroot/eclipsescada/org.eclipse.scada.base.git git clone git://git.eclipse.org/gitroot/eclipsescada/org.eclipse.scada.core.git git clone git://git.eclipse.org/gitroot/eclipsescada/org.eclipse.scada.hmi.git git clone git://git.eclipse.org/gitroot/eclipsescada/org.eclipse.scada.ide.git git clone git://git.eclipse.org/gitroot/eclipsescada/org.eclipse.scada.deploy.git git clone git://git.eclipse.org/gitroot/eclipsescada/org.eclipse.scada.releng.git
Generate Qualifier
In order to be able to create proper maven release builds the -SNAPSHOT qualifier must be removed. This is done by the build helper "generate qualifier" mojo from the Eclipse SCADA releng repository. It uses the tycho jgit build timestamp provider to create timestamp based qualifiers and sets the qualifiers in all maven projects and synchs it back to bundles, features and repositories.
mvn versions:set -f org.eclipse.scada.releng/superParent -DnewVersion=$release mvn org.eclipse.scada.releng:build-helper:0.0.12:generate-qualifier \ -f org.eclipse.scada.releng/aggregator/pom.xml \ -Prpm \ -DdefaultNameProvider=static \ -DnameProviderMap.eclipse-plugin=timestamp \ -DnameProviderMap.eclipse-feature=timestamp \ -DnameProviderMap.eclipse-test-plugin=timestamp \ -DnameProviderProperties.staticQualifier=$qualifier \ -DnameProviderProperties.timestampProvider=jgit
Commit and Tag
Commit the changed qualifiers to the branch and tag it.
for i in "repos"; do repo="org.eclipse.scada.${i}"
pushd "$repo" git add . git commit -m "Generate version qualifiers for $release" git tag -a "$release" -m "Tag release - $release" popd done
Build the tag locally
mvn clean verify \ -f org.eclipse.scada.releng/aggregator/pom.xml \ -Prpm -Pdeb -Peclipse-hudson \ -Pmilestone '-P!nightly' '-P!integration' \ -Ddownload.root=/tmp/my-download-test \ -Declipse.download.root=http://download.eclipse.org
Check the output
The output goes to:
/tmp/my-download-test
Unless you changed the previous command ;-)
Push commit and tag
Push the commit and tag if the local build was successful.
for i in "repos"; do repo="org.eclipse.scada.${i}"
pushd "$repo" git push origin refs/heads/$branch refs/tags/$tag popd done
Perform build
Perform the build on the Eclipse SCADA Hudson instance
Job: https://hudson.eclipse.org/scada/job/aggregator-release/
Which should execute the following build command:
mvn clean verify -Prpm -Pdeb -Peclipse-sign -Peclipse-hudson -Pmilestone '-P!integration'
Test
The usual…
Promote
To be written…