Issue #7395
closedStory #8093: [EPIC] Release automation
Release script can identify a wrong commit to get redmine info from
Description
It is possible that during release something went wrong after the release commits were merged. The issues are usually related to travis release jobs. E.g. I forgot to add pulp_smash as requirement for functional tests. It wouldn't blow upon a job for PRs but it did fail the release job.
A workaround would be to revert release commits, make all the necessary changes and start release again. It's quite inconvenient, so maybe the release script can use regex to determine the commit it needs from the recent N commits. Maybe N=5 is enough, usually it would be within 1-2 commits from the tagged one if any fixes were needed.
$ bash .travis/update_redmine.sh
export COMMIT_MSG=$(git log --format=%B --no-merges -1)
export RELEASE=$(echo $COMMIT_MSG | awk '{print $2}')
export MILESTONE_URL=$(echo $COMMIT_MSG | awk '{print $6}')
export REDMINE_QUERY_URL=$(echo $COMMIT_MSG | awk '{print $4}')
echo "Releasing $RELEASE"
Releasing pulp-smash
echo "Milestone URL: $MILESTONE_URL"
Milestone URL: for
echo "Query: $REDMINE_QUERY_URL"
Query: a
MILESTONE=$(http $MILESTONE_URL | jq -r .version.name)
http: error: ConnectionError: HTTPConnectionPool(host='for', port=80): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f487bd36eb8>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)) while doing GET request to URL: http://for/
echo "Milestone: $MILESTONE"
Milestone:
if [[ "$MILESTONE" != "$RELEASE" ]]; then
echo "Milestone $MILESTONE is not equal to Release $RELEASE"
exit 1
fi
Milestone is not equal to Release pulp-smash
Updated by dkliban@redhat.com almost 3 years ago
- Status changed from NEW to CLOSED - WONTFIX
This is no longer needed because the release automation no longer assumes that the release commit is teh very last one. The release workflow looks for a release commit.