From b82a1b7dc35b0857a016273f7d8ad2e5b160ac8a Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Wed, 14 Aug 2013 10:30:41 -0300 Subject: [PATCH] Add job to propose tag merges With pbr tag-based versioning, not having the latest release tag in the master branch makes the output a little nasty. Add a job that makes a merge commit containing the tag on a release from milestone-proposed branch. The merge strategy it uses is 'ours' because we're not attempting to use this to keep code lines up to date - the expectation is that content added in milestone-proposed should already be in master. The main thing we want to do is re-connect the revision and tag history with master, so that things like 'git tag --contains' work. Closes-Bug: 1192039 Change-Id: I06c06bd7542ae493e74fdcaa3c4419f84843cd03 --- files/slave_scripts/merge_tags.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 files/slave_scripts/merge_tags.sh diff --git a/files/slave_scripts/merge_tags.sh b/files/slave_scripts/merge_tags.sh new file mode 100755 index 0000000..b6a741b --- /dev/null +++ b/files/slave_scripts/merge_tags.sh @@ -0,0 +1,27 @@ +#!/bin/bash -xe + +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +TAG=$1 + +git config user.name "OpenStack Jenkins" +git config user.email "jenkins@openstack.org" +git config gitreview.username "jenkins" + +git review -s +git checkout master +git reset --hard origin/master +git merge -s ours $TAG +# Get a Change-Id +GIT_EDITOR=true git commit --amend +git review -R -t merge/release-tag