blob: 812686f09867c2e57119943772a1207b6a2145bd [file] [log] [blame]
[[PromotingARelease]]
= Promoting a release
After the voting process has ended and the vote passed, following steps need to be taken to promote and create all release artifacts.
== Renaming and moving the source code
The first step is to move the source code from the staging to the release folder in SVN, as the release candidate has been approved it will be renamed to the official release artifact.
Checkout or update your svn repository pointing to the staging area
[source,bash]
----
# Checkout
svn co https://dist.apache.org/repos/dist/dev/incubator/hop hop_release
# Update
svn update
----
Checkout the release area
[source,bash]
----
svn co https://dist.apache.org/repos/dist/release/incubator/hop/ hop_public_release
----
Create a new folder in the hop_public_release location with the version number and copy the artifacts
[source,bash]
----
cd hop_public_release
svn mkdir X.XX
cp ../hop_release/apache-hop-X.XX-incubating-rcX/* X.XX
----
Remove the rc from the files and fix the link in the sha512 file
[source,bash]
----
#Rename Files
mv apache-hop-X.XX-incubating-rcX.tar.gz apache-hop-X.XX-incubating.tar.gz
mv apache-hop-X.XX-incubating-rcX.tar.gz.asc apache-hop-X.XX-incubating.tar.gz.asc
mv apache-hop-X.XX-incubating-rcX.tar.gz.sha512 apache-hop-X.XX-incubating.tar.gz.sha512
#Remove rcx from sha512
vi apache-hop-X.XX-incubating.tar.gz.sha512
#Remove rcx and save
----
Test if both key and sha512 still work
[source,bash]
----
gpg --verify apache-hop-X.XX-incubating.tar.gz.asc
sha512sum -c apache-hop-X.XX-incubating.tar.gz.sha512
----
== Creating the client
The client included in the release has to be build using the source code in the release. Copy the source you just prepared to a temp location to generate the client.
[source,bash]
----
# Copy source to temp build location
mkdir /tmp/client_build
cp apache-hop-x.xx-incubating.tar.gz /tmp/client_build/
cd /tmp/client_build
# Extract
tar -xvf apache-hop-X.XX-incubating.tar.gz
cd apache-hop-X.XX-incubating
# Run Build
mvn -T 4 clean install -DskipTests=true
# Copy client back (and rename)
cp assemblies/client/target/hop-client-X.XX.zip SVN_LOCATION/hop_public_release/X.XX/apache-hop-client-X.XX-incubating.zip
# Switch back to your SVN folder
cd SVN_LOCATION/hop_public_release/X.XX/
----
As we now added a new binary file we also need to sign and create a sha512 for it.
[source,bash]
----
# Create keyfile and sha512
gpg --armor --default-key username@apache.org --output apache-hop-client-X.XX-incubating.zip.asc --detach-sig apache-hop-client-X.XX-incubating.zip
sha512sum apache-hop-client-X.XX-incubating-.zip > apache-hop-client-X.XX-incubating.zip.sha512
# Validate
gpg --verify apache-hop-client-X.XX-incubating.zip.asc
sha512sum -c apache-hop-client-X.XX-incubating.zip.sha512
----
Commit everything to SVN
[source,bash]
----
svn add *
svn status
svn commit -m 'Add release files for Apache Hop X.XX'
----
== Creating Dockerhub Artifacts
To create the docker images you can use the build used to create the client, go to the folder with the code and do following steps
[source,bash]
----
unzip ./assemblies/client/target/hop-client-*.zip -d ./assemblies/client/target/
unzip ./assemblies/web/target/hop.war -d ./assemblies/web/target/webapp
unzip ./assemblies/plugins/dist/target/hop-assemblies-*.zip -d ./assemblies/plugins/dist/target/
# Create image (make sure to add correct version)
docker build . -f docker/Dockerfile -t docker.io/apache/incubator-hop:X.XX -t docker.io/apache/incubator-hop:latest
# Push to dockerhub
docker image push --all-tags docker.io/apache/incubator-hop
# Create Hop Web
docker build . -f docker/Dockerfile.web -t docker.io/apache/incubator-hop-web:X.XX -t docker.io/apache/incubator-hop-web:latest
# Push to dockerhub
docker image push --all-tags docker.io/apache/incubator-hop-web
----