Project

Profile

Help

Issue #7395

Release script can identify a wrong commit to get redmine info from

Added by ttereshc about 2 months ago. Updated about 2 months ago.

Status:
NEW
Priority:
Normal
Assignee:
-
Category:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
CI/CD
Sprint:
Quarter:

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

History

#1 Updated by fao89 about 2 months ago

  • Triaged changed from No to Yes

Please register to edit this issue

Also available in: Atom PDF