Versions Compared

Key

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

...

Code Block
languagebash
titleprepare-email.sh
#!/bin/bash

# Load configuration
source ./configuration.sh

# Get Apache Nexus Repository number from staging artifacts
REPOSITORIES_URL=https://repository.apache.org/content/repositories/
REPOSITORY_NAME=$(curl -s ${REPOSITORIES_URL}|grep orgapachenifi|cut -d '>' -f 3|cut -d / -f 1)

# Get Jira Version and Issues
VERSIONS_JSON=$(curl -s https://issues.apache.org/jira/rest/api/2/project/NIFI/versions)
JIRA_VERSION=$(echo ${VERSIONS_JSON}|jq -r ".[] | select(.name==\"${RELEASE_VERSION}\") | .id" )
PROJECT_ID=$(echo ${VERSIONS_JSON}|jq -r ".[] | select(.name==\"${RELEASE_VERSION}\") | .projectId" )
JIRA_RELEASE_NOTES="https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=${PROJECT_ID}&version=${JIRA_VERSION}"

# Get Total Issues
ISSUES_JSON=$(curl -s https://issues.apache.org/jira/rest/api/2/version/${JIRA_VERSION}/relatedIssueCounts)
TOTAL_ISSUES=$(echo ${ISSUES_JSON}|jq -r ".issuesFixedCount")

# Set total number of Jira issues changed
TOTAL_ISSUES=0

# Set SHA-512 hash of source release archive
SHA512_HASH=`cat ${WORK_DIR}/${GIT_REPO}/target/${ARTIFACT_ID}-${RELEASE_VERSION}-source-release.zip.sha512`

# Change to cloned working directory
cd ${WORK_DIR}/${GIT_REPO}

# Get current Git commit ref
GIT_COMMIT_ID=`git rev-parse HEAD`
PROJECT_LABEL="Apache NiFi"

echo """
[VOTE] Release ${PROJECT_LABEL} ${RELEASE_VERSION} (RC${CANDIDATE_NUMBER})

Team,

I am pleased to be calling this vote for the source release of ${PROJECT_LABEL} ${RELEASE_VERSION}.

Please review the following guide for how to verify a release candidate build:

https://cwiki.apache.org/confluence/display/NIFI/Release+Candidate+Verification

The source being voted on the and the convenience binaries are available on the Apache Distribution Repository:

${DIST_DEV_REPO}${ARTIFACT_ID}-${RELEASE_VERSION}

The build artifacts are available on the Apache Nexus Repository:

${REPOSITORIES_URL}${REPOSITORY_NUMBER}/

Git Tag: ${GIT_REPO}-${RELEASE_VERSION}-RC${CANDIDATE_NUMBER}
Git Commit ID: ${GIT_COMMIT_ID}
GitHub Commit Link: https://github.com/apache/${GIT_REPO}/commit/${GIT_COMMIT_ID}

Hashes of ${ARTIFACT_ID}-${RELEASE_VERSION}-source-release.zip

SHA512: ${SHA512_HASH}

Release artifacts are signed with the following key:

https://people.apache.org/keys/committer/${GIT_COMMITTER_NAME}.asc

KEYS file is available on the Apache Distribution Repository:

https://dist.apache.org/repos/dist/release/nifi/KEYS

Issues resolved for this version: ${TOTAL_ISSUES}

${JIRA_RELEASE_NOTES}

Release note highlights can be found on the project wiki:

https://cwiki.apache.org/confluence/display/NIFI/Release+Notes#ReleaseNotes-Version${RELEASE_VERSION}

The vote will be open for 72 hours.

Please download the release candidate and evaluate the necessary items including checking hashes, signatures, build from source, and test. Then please vote:

[] +1 Release this package as ${ARTIFACT_ID}-${RELEASE_VERSION}
[] +0 no opinion
[] -1 Do not release this package because...
"""

Release Candidate

...

Voting

Project Management Committee members can cast binding votes that decide whether the release is approved.

Committers and community members can cast non-binding votes that inform the Release Manager and PMC members about the release candidate status.

Release Candidate Cancellation

The Release Manager can cancel a vote in response to negative findings. Cancelling a vote requires sending an email with the word CANCEL in the subject line.

Code Block
[CANCEL][VOTE] Release Apache NiFi 2.0.0-RC1

Release Candidate Approval

Approving a Release Candidate build requires at least 3 binding positive votes from project PMC members and more positive votes than negative votes.

The Release Manager sends an email to the project Developers Mailing List with the vote results. The Vote Thread ID can be accessed from the Developer Mailing List archives.

Code Block
[RESULT][VOTE] Release Apache NiFi 2.0.0-RC1

Apache NiFi Community,

I am pleased to announce that the 2.0.0 release of Apache NiFi passes:

  X +1 (binding) votes
  Y +1 (non-binding) votes
  0 0 votes
  0 -1 votes

Thanks to all who helped make this release possible!

Here is the vote thread: https://lists.apache.org/thread/${VOTE_THREAD_ID}

Release Candidate Repository Updates

After a positive release candidate vote, the source branch should be updated.

Create Signed Tag

Create a signed Git tag and push to the source repository.

Code Block
languagebash
titlecreate-tag.sh
#!/bin/bash

# Load configuration
source ./configuration.sh

# Change to source directory
cd ${WORK_DIR}/${GIT_REPO}

# Create signed Git tag
git tag -u ${GIT_SIGNING_KEY} -s ${GIT_RELEASE_TAG

After a positive release candidate vote, the the source branch should be updated.

Create Signed Tag

Create a signed Git tag and push to source repository.

Code Block
languagebash
titlecreate-tag.sh
#!/bin/bash

# Load configuration
source ./configuration.sh

# Change to source directory
cd ${WORK_DIR}/${GIT_REPO}

# Create signed Git tag
git tag -u ${GIT_SIGNING_KEY} -s ${GIT_RELEASE_TAG} -m "${JIRA_ISSUE} Released version ${RELEASE_VERSION}" ${GIT_CANDIDATE_TAG}

# Push tag to source repository
git push upstream ${GIT_RELEASE_TAG}

Merge Changes

Merge version changes from release branch to main branch.

Code Block
languagebash
titlemerge-changes.sh
#!/bin/bash

# Load configuration
source ./configuration.sh

# Change to source directory
cd ${WORK_DIR}/${GIT_REPO}

# Fetch current upstream branch
git fetch upstream

# Rebase upstream changes
git checkout ${GIT_SOURCE_BRANCH}
git rebase upstream/${GIT_SOURCE_BRANCH}

# Merge changes
git merge --no-ff ${GIT_CANDIDATE_BRANCH} --gpg-sign=${GIT_SIGNING_KEY} -m "${JIRA_ISSUE} Merged Released version ${RELEASE_VERSION}" ${GIT_CANDIDATE_BRANCHTAG}"

# Push changestag to source repository
git push upstream ${GIT_SOURCERELEASE_BRANCHTAG}

Set Next Version

Merge Changes

Merge version changes from release branch to main branchSet next snapshot version and push to source repository.

Code Block
languagebash
titlesetmerge-next-versionchanges.sh
#!/bin/bash

# Load configuration
source ./configuration.sh

# Change to source directory
cd ${WORK_DIR}/${GIT_REPO}

# SetFetch Nextcurrent Snapshotupstream Versionbranch
./mvnw versions:set -DgenerateBackupPoms=false -DnewVersion=${NEXT_SNAPSHOT_VERSION}git fetch upstream

# CommitRebase upstream Versionchanges
git commit --gpg-sign=checkout ${GIT_SIGNING_KEY} -a --author "SOURCE_BRANCH}
git rebase upstream/${GIT_SOURCE_BRANCH}

# Merge changes
git merge --no-ff ${GIT_CANDIDATE_BRANCH} --gpg-sign=${GIT_AUTHORSIGNING_KEY}" -m "${JIRA_ISSUE} Updated version toMerged ${NEXTGIT_SNAPSHOTCANDIDATE_VERSIONBRANCH}"

# Push changes to Updatedsource Versionrepository
git push upstream

Release Binary Artifacts

The binary release process consists of publishing artifacts through standard distribution channels.

Distribute Binary Release Artifacts

 ${GIT_SOURCE_BRANCH}

Set Next Version

Set next snapshot version and push to source repositoryMove the binary release artifacts from the development directory to the release directory.

Code Block
languagebash
titledistributeset-binarynext-artifactsversion.sh
#!/bin/bash

# Load configuration
source ./configuration.sh

# Change to distributionsource directory
cd ${DISTWORK_DIR}/${GIT_REPO}

# Set Next Snapshot locations
DIST_DEV_URL=${DIST_DEV_REPO}/${ARTIFACT_ID}-${RELEASE_VERSION}
DIST_RELEASE_URL=${DIST_RELEASE_REPO}/${RELEASEVersion
./mvnw versions:set -DgenerateBackupPoms=false -DnewVersion=${NEXT_SNAPSHOT_VERSION}

# Move binary artifacts with Subversion
svn move -m "${JIRA_ISSUE}" ${DIST_DEV_URL} ${DIST_RELEASE_URL}

Publish Binary Artifacts through Nexus

The Apache Nexus Repository containing the binary artifacts should be marked as Released for subsequent distribution through Maven Central.

Update Website Versions

The Apache NiFi website includes download links for the released version and documentation generated based on versioned binaries.

Clone Website Repository

The Apache NiFi website repository contains the source for the project website, which can be updated using a commit to the main branch.

Update Website Version References

The Apache NiFi website repository has a current version configuration property that should be updated to reflect the released version.

The project configuration in config.toml has several version properties that should be updated.

Code Block
languagebash
titleconfig.toml
currentProjectVersion = "2.1.0"
currentProjectVersionReleased = "2024-12-23"

Commit and push the changes to the main branch with a commit message that references the release candidate Jira number.

The GitHub Actions workflow publishes changes for download links and documentation.

Update Release Tracking

Jira releases and release notes should be updated to indicate the date of the release.

Update Release Notes

The Apache NiFi Release Notes page should be updated to indicate the date of the release for the associated version.

Update Jira Releases

The Apache NiFi Releases section in Jira should be updated with the date of the release. The Actions menu associated with the release version has item labeled Release that should be selected to set the released status.

Update Migration Guide

...

Commit Version
git commit --gpg-sign=${GIT_SIGNING_KEY} -a --author "${GIT_AUTHOR}" -m "${JIRA_ISSUE} Updated version to ${NEXT_SNAPSHOT_VERSION}"

# Push Updated Version
git push upstream

Release Binary Artifacts

The binary release process consists of publishing artifacts through standard distribution channels.

Distribute Binary Release Artifacts

Move the binary release artifacts from the development directory to the release directory.

Code Block
languagebash
titledistribute-binary-artifacts.sh
#!/bin/bash

# Load configuration
source ./configuration.sh

# Change to distribution directory
cd ${DIST_DIR}

# Set locations
DIST_DEV_URL=${DIST_DEV_REPO}/${ARTIFACT_ID}-${RELEASE_VERSION}
DIST_RELEASE_URL=${DIST_RELEASE_REPO}/${RELEASE_VERSION}

# Move binary artifacts with Subversion
svn move -m "${JIRA_ISSUE}" ${DIST_DEV_URL} ${DIST_RELEASE_URL}

Publish Binary Artifacts through Nexus

The Apache Nexus Repository containing the binary artifacts should be marked as Released for subsequent distribution through Maven Central.

Update Website Versions

The Apache NiFi website includes download links for the released version and documentation generated based on versioned binaries.

Clone Website Repository

The Apache NiFi website repository contains the source for the project website, which can be updated using a commit to the main branch.

Update Website Version References

The Apache NiFi website repository has a current version configuration property that should be updated to reflect the released version.

The project configuration in config.toml has several version properties that should be updated.

Code Block
languagebash
titleconfig.toml
currentProjectVersion = "2.1.0"
currentProjectVersionReleased = "2024-12-23"

Verify Website Changes

Project website changes should be verified prior to pushing to the repository.

The project README.md provides the steps for preparing and building the website for local verification.

Push Website Changes

Commit and push the changes to the main branch with a commit message that references the release candidate Jira number.

The GitHub Actions workflow publishes changes for download links and documentation.

Update Release Tracking

Jira releases and release notes should be updated to indicate the date of the release.

Update Release Notes

The Apache NiFi Release Notes page should be updated to indicate the date of the release for the associated version.

Update Jira Releases

The Apache NiFi Releases section in Jira should be updated with the date of the release. The Actions menu associated with the release version has item labeled Release that should be selected to set the released status.

Update Migration Guide

The Apache NiFi Migration Guidance page should be updated with a new section for the associated version when there are notable changes required for moving from a previous version.

Delete Previous Version

Previous release versions should be deleted from the Apache Release Distribution Repository.

Code Block
languagebash
titledelete-previous-version.sh
#!/bin/bash

# Load configuration
source ./configuration.sh

# Set Previous Version number
PREVIOUS_VERSION="2.0.0"

# Set location
PREVIOUS_RELEASE_URL=${DIST_RELEASE_REPO}/${PREVIOUS_VERSION}

# Delete previous artifacts with Subversion
svn delete -m "${JIRA_ISSUE}" ${PREVIOUS_RELEASE_URL}

Announce Release

Send an email to the Apache Announcements List as well as project mailing lists announcing the new version.

  • announce@apache.org
  • users@nifi.apache.org
  • dev@nifi.apache.org


Code Block
languagebash
titleannounce-email.sh
#!/bin/bash

# Load configuration
source ./configuration.sh

# Get Jira Version and Issues
PROJECT_LABEL="Apache NiFi"
VERSIONS_JSON=$(curl -s https://issues.apache.org/jira/rest/api/2/project/NIFI/versions)
JIRA_VERSION=$(echo ${VERSIONS_JSON}|jq -r ".[] | select(.name==\"${RELEASE_VERSION}\") | .id" )
PROJECT_ID=$(echo ${VERSIONS_JSON}|jq -r ".[] | select(.name==\"${RELEASE_VERSION}\") | .projectId" )
JIRA_RELEASE_NOTES="https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=${PROJECT_ID}&version=${JIRA_VERSION}"

echo """
[ANNOUNCE] ${PROJECT_LABEL} ${RELEASE_VERSION} Released

The Apache NiFi Team is pleased to announce the release of ${PROJECT_LABEL} ${RELEASE_VERSION}.

Apache NiFi is an easy to use, powerful, and reliable system to process and distribute data.

https://nifi.apache.org

The release artifacts can be loaded from the project website.

https://nifi.apache.org/download/

Maven artifacts have been released and mirrored according to Apache distribution processes.

Issues resolved in ${PROJECT_LABEL} ${RELEASE_VERSION} are listed in Jira Release Notes.
 
${JIRA_RELEASE_NOTES}

Highlights of the release are available on the project wiki.

https://cwiki.apache.org/confluence/display/NIFI/Release+Notes

Thank you,
The Apache NiFi Team
"""