Skip to content
This repository was archived by the owner on Feb 7, 2023. It is now read-only.

Commit

Permalink
Update release script
Browse files Browse the repository at this point in the history
Now that the bump of the SHA is automatic, we only need to
care about the update of the releases repo and bumping the
version in OSA.

In the future, the bump of version in OSA should be
improved so that it relies on pbr.
  • Loading branch information
evrardjp committed Jan 28, 2019
1 parent dd37026 commit 8e3f9e3
Showing 1 changed file with 7 additions and 19 deletions.
26 changes: 7 additions & 19 deletions releasing.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,19 +63,12 @@ function parse_release_log {

function parse_gitreview_log {
export RELEASE_CHANGEID=$(perl -n -e '/remote.*(https.*review.openstack.org\/\d+)/ && print "$1\n"' ${RELEASINGLOG} | tail -n 1)
export release_changeid=${RELEASE_CHANGEID} # To be removed when osa-toolkit is cleaned up
echo "Found git review url: $RELEASE_CHANGEID"
}

function write_commit_msg {
cat > ${OACOMMITMSG} << EOCOMMIT
Update all SHAs for ${next_release:-'next release'}
This patch:
- updates all the roles to the latest available stable SHAs
- copies the release notes from the updated roles into the integrated repo
- updates all the OpenStack Service SHAs
#- updates the appropriate python requirements pins
Bump version to ${next_release:-'next release'}
Depends-On: ${RELEASE_CHANGEID}
EOCOMMIT
Expand All @@ -98,15 +91,14 @@ function release_branch {

rollback_time ${WORKDIR}/releases # In case something was wrongly done on master, come back in time.
git checkout -b release_osa # Create a new branch for doing the release
new_release $BRANCH # Uses's releases' tox tool to produce a release. It will auto
new_release $BRANCH # Uses's releases' tox tool to produce a release.
parse_release_log # Get current's code version by parsing "next release" element from releases repo
ask_ready_to_review ${WORKDIR}/releases ${RELEASECOMMITMSG} # Wait for user editions and confirmations before git review -f
parse_gitreview_log # Get review change id for the depends on.
# If you already did the releases folder part, just comment out the
# above section, and export the release change details for the
# depends on, like this:
# export RELEASE_CHANGEID="https://review.openstack.org/#/c/584787/"
# export release_changeid="https://review.openstack.org/#/c/584787/"
rollback_time ${WORKDIR}/releases # In case something was wrongly done on master, come back in time.

##########################
Expand All @@ -122,14 +114,9 @@ function release_branch {
git checkout -b stable/$BRANCH -t origin/stable/$BRANCH || true # Ensure the work of OSA toolkit is done on the right branch.
git pull # Ensure said branch is up to date.

bump-ansible-role-requirements | tee -a ${RELEASINGLOG} # self-explanatory. CLI command from toolkit. # Keep in mind hardcoded location there.
bump-oa-release-number --version=auto | tee -a ${RELEASINGLOG} # self-explanatory. CLI command from toolkit.
# The current toolkit shows an "Update all SHAs for " example commit message, that can be used for discovering next version.
export NEXT_RELEASE=$(perl -n -e '/Update all SHAs for (.*)/ && print "$1\n"' ${RELEASINGLOG} | tail -n 1 )
export next_release=${NEXT_RELEASE} # To be removed when osa-tookit is cleaned up
#check-global-requirements | tee -a ${RELEASINGLOG} # CLI from toolkit
bump-upstream-sources | tee -a ${RELEASINGLOG} # CLI from toolkit
#update-role-files | tee -a ${RELEASINGLOG} # From OSA repo
osa releases bump_release_number | tee -a ${RELEASINGLOG}
export next_release=$(tail -n 1 ${RELEASINGLOG} | cut -d ' ' -f 4)
git checkout -b release_osa
write_commit_msg # Prepare an example commit message.
ask_ready_to_review ${WORKDIR}/openstack-ansible ${OACOMMITMSG} # Wait for user editions and confirmations before git review -f
rollback_time ${WORKDIR}/openstack-ansible # In case something was wrongly done on master, come back in time
Expand All @@ -139,6 +126,7 @@ function release_branch {
cleanup
clone

release_branch rocky
release_branch queens
release_branch pike
release_branch ocata
#release_branch ocata

0 comments on commit 8e3f9e3

Please sign in to comment.