You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@metron.apache.org by nickwallen <gi...@git.apache.org> on 2017/12/18 17:23:00 UTC
[GitHub] metron pull request #874: METRON-1372 Validate JIRA for Releases
GitHub user nickwallen opened a pull request:
https://github.com/apache/metron/pull/874
METRON-1372 Validate JIRA for Releases
Adds a script that helps the Release Manager validate JIRA for a pending release.
Help is printed along with an example.
```
$ ./release-utils/validate-jira-for-release --help
usage: ./release-utils/validate-jira-for-release
-v/--version=<version> The version of the next release. [Required]
-s/--start=<start> Defines the first commit to inspect. [Required]
-e/--end=<end> Defines the last commit to inspect.
-r/--repo=<repo> The Git repo to work from.
-b/--branch=<branch> The branch to work from.
-h/--help Usage information.
example:
validate-jira-for-release --version=0.4.2 --start=tags/apache-metron-0.4.1-release
```
Validating the next release.
```
$ ./release-utils/validate-jira-for-release --version=0.4.2 --start=tags/apache-metron-0.4.1-release
Cloning into 'metron-0.4.2'...
remote: Counting objects: 35046, done.
remote: Compressing objects: 100% (13698/13698), done.
remote: Total 35046 (delta 15702), reused 31650 (delta 12822)
Receiving objects: 100% (35046/35046), 53.06 MiB | 6.77 MiB/s, done.
Resolving deltas: 100% (15702/15702), done.
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
Fetching origin
JIRA STATUS FIX VERSION ASSIGNEE FIX
METRON-1345 Done Michael Miklavcic https://issues.apache.org/jira/browse/METRON-1345
METRON-1349 Done Next + 1 Nick Allen https://issues.apache.org/jira/browse/METRON-1349
METRON-1343 Done Mohan https://issues.apache.org/jira/browse/METRON-1343
METRON-1306 To Do Unassigned https://issues.apache.org/jira/browse/METRON-1306
METRON-1341 Done Simon Elliston Ball https://issues.apache.org/jira/browse/METRON-1341
METRON-1313 Done Jon Zeolla https://issues.apache.org/jira/browse/METRON-1313
METRON-1346 Done Otto Fowler https://issues.apache.org/jira/browse/METRON-1346
METRON-1336 Done 0.4.2 Nick Allen
METRON-1335 Done Anand Subramanian https://issues.apache.org/jira/browse/METRON-1335
METRON-1308 Done Jon Zeolla https://issues.apache.org/jira/browse/METRON-1308
METRON-1338 Done 0.4.2 Nick Allen
METRON-1286 To Do 0.4.2 Unassigned https://issues.apache.org/jira/browse/METRON-1286
METRON-1334 Done 0.4.2 Nick Allen
METRON-1277 Done Otto Fowler https://issues.apache.org/jira/browse/METRON-1277
METRON-1239 To Do Unassigned https://issues.apache.org/jira/browse/METRON-1239
METRON-1328 Done Anand Subramanian https://issues.apache.org/jira/browse/METRON-1328
METRON-1333 Done Otto Fowler https://issues.apache.org/jira/browse/METRON-1333
METRON-1252 Done RaghuMitra https://issues.apache.org/jira/browse/METRON-1252
METRON-1316 To Do Next + 1 Unassigned https://issues.apache.org/jira/browse/METRON-1316
METRON-1088 Done Jon Zeolla https://issues.apache.org/jira/browse/METRON-1088
METRON-1319 To Do Ryan Merriman https://issues.apache.org/jira/browse/METRON-1319
METRON-1321 To Do Unassigned https://issues.apache.org/jira/browse/METRON-1321
METRON-1301 Done 0.4.2 Nick Allen
METRON-1294 To Do Ryan Merriman https://issues.apache.org/jira/browse/METRON-1294
METRON-1291 To Do Ryan Merriman https://issues.apache.org/jira/browse/METRON-1291
METRON-1290 Done Justin Leet https://issues.apache.org/jira/browse/METRON-1290
METRON-1311 Done 0.4.2 Nick Allen
METRON-1289 To Do Ryan Merriman https://issues.apache.org/jira/browse/METRON-1289
METRON-1309 Done Jon Zeolla https://issues.apache.org/jira/browse/METRON-1309
METRON-1310 Done 0.4.2 Nick Allen
METRON-1275 Done Jon Zeolla https://issues.apache.org/jira/browse/METRON-1275
METRON-1295 Done 0.4.2 Nick Allen
METRON-1307 Done Otto Fowler https://issues.apache.org/jira/browse/METRON-1307
METRON-1296 Done 0.4.2 Nick Allen
METRON-1281 To Do Ryan Merriman https://issues.apache.org/jira/browse/METRON-1281
METRON-1287 Done 0.4.2 Nick Allen
METRON-1267 To Do Unassigned https://issues.apache.org/jira/browse/METRON-1267
METRON-1283 Done Anand Subramanian https://issues.apache.org/jira/browse/METRON-1283
METRON-1254 To Do Unassigned https://issues.apache.org/jira/browse/METRON-1254
METRON-1261 Done Jon Zeolla https://issues.apache.org/jira/browse/METRON-1261
METRON-1284 Done 0.4.2 Justin Leet
METRON-1270 Done Artem Ervits https://issues.apache.org/jira/browse/METRON-1270
METRON-1272 Done 0.4.2 Justin Leet
METRON-1224 Done RaghuMitra https://issues.apache.org/jira/browse/METRON-1224
METRON-1280 To Do Unassigned https://issues.apache.org/jira/browse/METRON-1280
METRON-1243 To Do Unassigned https://issues.apache.org/jira/browse/METRON-1243
METRON-1196 Done Matt Foley https://issues.apache.org/jira/browse/METRON-1196
METRON-1278 Done 0.4.2 Matt Foley
METRON-1274 To Do Unassigned https://issues.apache.org/jira/browse/METRON-1274
METRON-1266 Done 0.4.2 Nick Allen
METRON-1260 Done 0.4.2 Nick Allen
METRON-1251 Done Jon Zeolla https://issues.apache.org/jira/browse/METRON-1251
METRON-1241 To Do Unassigned https://issues.apache.org/jira/browse/METRON-1241
METRON-1267 To Do Unassigned https://issues.apache.org/jira/browse/METRON-1267
METRON-1262 To Do Ryan Merriman https://issues.apache.org/jira/browse/METRON-1262
METRON-1263 Done Anand Subramanian https://issues.apache.org/jira/browse/METRON-1263
METRON-1255 To Do Unassigned https://issues.apache.org/jira/browse/METRON-1255
METRON-1249 Done 0.4.1 Nick Allen https://issues.apache.org/jira/browse/METRON-1249
METRON-1237 To Do Artem Ervits https://issues.apache.org/jira/browse/METRON-1237
METRON-1240 Done Artem Ervits https://issues.apache.org/jira/browse/METRON-1240
METRON-1226 Done 0.4.2 Nick Allen
METRON-1081 Done James Sirota https://issues.apache.org/jira/browse/METRON-1081
METRON-1123 Done RaghuMitra https://issues.apache.org/jira/browse/METRON-1123
METRON-1223 Done RaghuMitra https://issues.apache.org/jira/browse/METRON-1223
METRON-1083 Done RaghuMitra https://issues.apache.org/jira/browse/METRON-1083
METRON-1232 Done RaghuMitra https://issues.apache.org/jira/browse/METRON-1232
METRON-1247 Done 0.4.2 Justin Leet
METRON-1235 To Do Unassigned https://issues.apache.org/jira/browse/METRON-1235
METRON-1234 Done Artem Ervits https://issues.apache.org/jira/browse/METRON-1234
METRON-1222 Done Artem Ervits https://issues.apache.org/jira/browse/METRON-1222
METRON-1220 Done 0.4.2 Justin Leet
METRON-1229 To Do Unassigned https://issues.apache.org/jira/browse/METRON-1229
METRON-1228 Done Unassigned https://issues.apache.org/jira/browse/METRON-1228
METRON-1218 To Do Ryan Merriman https://issues.apache.org/jira/browse/METRON-1218
METRON-1161 In Progress Ryan Merriman https://issues.apache.org/jira/browse/METRON-1161
METRON-1209 To Do Unassigned https://issues.apache.org/jira/browse/METRON-1209
METRON-1059 Done Next + 1 Unassigned https://issues.apache.org/jira/browse/METRON-1059
METRON-1204 To Do Ryan Merriman https://issues.apache.org/jira/browse/METRON-1204
METRON-1052 Done Casey Stella https://issues.apache.org/jira/browse/METRON-1052
METRON-632 In Progress Tomas Zezula https://issues.apache.org/jira/browse/METRON-632
METRON-1194 Done 0.4.2 Nick Allen
METRON-1055 To Do Laurens Vets https://issues.apache.org/jira/browse/METRON-1055
METRON-1079 Done Otto Fowler https://issues.apache.org/jira/browse/METRON-1079
METRON-1085 To Do Ryan Merriman https://issues.apache.org/jira/browse/METRON-1085
METRON-1208 To Do Ryan Merriman https://issues.apache.org/jira/browse/METRON-1208
METRON-1207 To Do Ryan Merriman https://issues.apache.org/jira/browse/METRON-1207
METRON-1215 To Do Unassigned https://issues.apache.org/jira/browse/METRON-1215
METRON-1206 To Do Ryan Merriman https://issues.apache.org/jira/browse/METRON-1206
METRON-1195 Done 0.4.2 Justin Leet
METRON-1189 To Do Ryan Merriman https://issues.apache.org/jira/browse/METRON-1189
METRON-1156 Done 0.4.2 Nick Allen
METRON-1198 Done 0.4.2 Nick Allen
METRON-1202 Done 0.4.2 Justin Leet
METRON-938 Done 0.4.2 Justin Leet
METRON-1182 Done RaghuMitra https://issues.apache.org/jira/browse/METRON-1182
METRON-1188 Done Michael Miklavcic https://issues.apache.org/jira/browse/METRON-1188
METRON-1191 Done Matt Foley https://issues.apache.org/jira/browse/METRON-1191
METRON-1063 Done Next + 1 Artem Ervits https://issues.apache.org/jira/browse/METRON-1063
METRON-1190 Done 0.4.2 Justin Leet
METRON-1187 Done 0.4.2 Nick Allen
METRON-1185 To Do Unassigned https://issues.apache.org/jira/browse/METRON-1185
METRON-1186 To Do Casey Stella https://issues.apache.org/jira/browse/METRON-1186
METRON-1173 Done Next + 1 Jon Zeolla https://issues.apache.org/jira/browse/METRON-1173
METRON-1179 To Do Unassigned https://issues.apache.org/jira/browse/METRON-1179
METRON-1180 To Do Unassigned https://issues.apache.org/jira/browse/METRON-1180
METRON-1183 Done 0.4.2 Nick Allen
METRON-1177 Done 0.4.2 Nick Allen
METRON-1158 Done 0.4.2 Justin Leet
METRON-1146 Done Anand Subramanian https://issues.apache.org/jira/browse/METRON-1146
METRON-1176 Done Otto Fowler https://issues.apache.org/jira/browse/METRON-1176
METRON-1114 Done Ryan Merriman https://issues.apache.org/jira/browse/METRON-1114
METRON-1167 Done Next + 1 Nick Allen https://issues.apache.org/jira/browse/METRON-1167
METRON-1171 To Do Casey Stella https://issues.apache.org/jira/browse/METRON-1171
```
## Pull Request Checklist
- [ ] Is there a JIRA ticket associated with this PR? If not one needs to be created at [Metron Jira](https://issues.apache.org/jira/browse/METRON/?selectedTab=com.atlassian.jira.jira-projects-plugin:summary-panel).
- [ ] Does your PR title start with METRON-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
- [ ] Has your PR been rebased against the latest commit within the target branch (typically master)?
- [ ] Have you included steps to reproduce the behavior or problem that is being changed or addressed?
- [ ] Have you included steps or a guide to how the change may be verified and tested manually?
- [ ] Have you ensured that the full suite of tests and checks have been executed in the root metron
- [ ] Have you written or updated unit tests and or integration tests to verify your changes?
- [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)?
- [ ] Have you verified the basic functionality of the build by building and running locally with Vagrant full-dev environment or the equivalent?
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/nickwallen/metron METRON-1372
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/metron/pull/874.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #874
----
commit cde85fe1cc2542f9457eb5f63928389ef23f120e
Author: Nick Allen <ni...@nickallen.org>
Date: 2017-12-18T17:15:00Z
METRON-1372 Validate JIRA for Releases
----
---
[GitHub] metron pull request #874: METRON-1372 Validate JIRA for Releases
Posted by ottobackwards <gi...@git.apache.org>.
Github user ottobackwards commented on a diff in the pull request:
https://github.com/apache/metron/pull/874#discussion_r157605768
--- Diff: build_utils/release-utils/validate-jira-for-release ---
@@ -0,0 +1,197 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+#
+# Finds all commits since the last release tag, then ensures that each
+# is marked 'Done' and that the fix version is set to the next release.
+#
+# For example, to validate JIRA for the 0.4.2 release, you would run the
+# following command.
+#
+# validate-jira-for-release --version=0.4.2 --start=tags/apache-metron-0.4.1-release
+#
+# This will output a table containing each JIRA that was inspected along with
+# the fix version, status, and assignee. If the fix version or status is incorrect
+# a link will be printed so that the JIRA can be manually fixed. The JIRA
+# only needs to be fixed if a URL is shown.
+#
+# JIRA STATUS FIX VERSION ASSIGNEE FIX
+# METRON-1345 Done 0.4.2 Michael Miklavcic
+# METRON-1349 Done Next + 1 Nick Allen https://issues.apache.org/jira/browse/METRON-1349
+# METRON-1343 Done Mohan https://issues.apache.org/jira/browse/METRON-1343
+# ...
+#
+
+function help {
+ echo " "
+ echo "usage: ${0}"
+ echo " -v/--version=<version> The version of the next release. [Required]"
+ echo " -s/--start=<start> Defines the first commit to inspect. [Required]"
+ echo " -e/--end=<end> Defines the last commit to inspect. "
+ echo " -r/--repo=<repo> The Git repo to work from."
+ echo " -b/--branch=<branch> The branch to work from."
+ echo " -h/--help Usage information."
+ echo " "
+ echo "example: "
+ echo " validate-jira-for-release --version=0.4.2 --start=tags/apache-metron-0.4.1-release"
+ echo " "
+}
+
+# define default values
+END="HEAD"
+REPO="https://git-wip-us.apache.org/repos/asf/metron.git"
+BRANCH="master"
+
+# print help, if the user just runs this without any args
+if [ "$#" -eq 0 ]; then
+ help
+ exit 1
+fi
+
+# handle command line options
+for i in "$@"; do
+ case $i in
+ #
+ # VERSION: The release version to validate; the 'next' release.
+ #
+ #
+ -v=*|--version=*)
+ VERSION="${i#*=}"
+ shift # past argument=value
+ ;;
+
+ #
+ # START: Defines the first commit to inspect
+ #
+ # -s=tags/apache-metron-0.4.1-release
+ # --start=tags/apache-metron-0.4.1-release
+ #
+ -s=*|--start=*)
+ START="${i#*=}"
+ shift # past argument=value
+ ;;
+
+ #
+ # END: Defines the last commit to inspect
+ #
+ # -e=HEAD
+ # --end=HEAD
+ #
+ -e=*|--end=*)
+ END="${i#*=}"
+ shift # past argument=value
+ ;;
+
+ #
+ # REPO: Define the Git repo to work from
+ #
+ # -r=https://git-wip-us.apache.org/repos/asf/metron.git
+ # --repo=<repo-url>
+ #
+ -r=*|--repo=*)
+ REPO="${i#*=}"
+ shift # past argument=value
+ ;;
+
+ #
+ # BRANCH: The branch to work from.
+ #
+ # -b=master
+ # --branch=master
+ #
+ -b=*|--branch=*)
+ BRANCH="${i#*=}"
+ shift # past argument with no value
+ ;;
+
+ #
+ # -h/--help
+ #
+ -h|--help)
+ help
+ exit 0
+ shift # past argument with no value
+ ;;
+
+ #
+ # Unknown option
+ #
+ *)
+ UNKNOWN_OPTION="${i#*=}"
+ echo "Error: unknown option: $UNKNOWN_OPTION"
+ help
+ ;;
+ esac
+done
+
--- End diff --
can we make the work dir ~/tmp like the other scripts?
---
[GitHub] metron pull request #874: METRON-1372 Validate JIRA for Releases
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/metron/pull/874
---
[GitHub] metron issue #874: METRON-1372 Validate JIRA for Releases
Posted by ottobackwards <gi...@git.apache.org>.
Github user ottobackwards commented on the issue:
https://github.com/apache/metron/pull/874
+1 worked great
---
[GitHub] metron pull request #874: METRON-1372 Validate JIRA for Releases
Posted by nickwallen <gi...@git.apache.org>.
Github user nickwallen commented on a diff in the pull request:
https://github.com/apache/metron/pull/874#discussion_r157632089
--- Diff: build_utils/release-utils/validate-jira-for-release ---
@@ -0,0 +1,197 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+#
+# Finds all commits since the last release tag, then ensures that each
+# is marked 'Done' and that the fix version is set to the next release.
+#
+# For example, to validate JIRA for the 0.4.2 release, you would run the
+# following command.
+#
+# validate-jira-for-release --version=0.4.2 --start=tags/apache-metron-0.4.1-release
+#
+# This will output a table containing each JIRA that was inspected along with
+# the fix version, status, and assignee. If the fix version or status is incorrect
+# a link will be printed so that the JIRA can be manually fixed. The JIRA
+# only needs to be fixed if a URL is shown.
+#
+# JIRA STATUS FIX VERSION ASSIGNEE FIX
+# METRON-1345 Done 0.4.2 Michael Miklavcic
+# METRON-1349 Done Next + 1 Nick Allen https://issues.apache.org/jira/browse/METRON-1349
+# METRON-1343 Done Mohan https://issues.apache.org/jira/browse/METRON-1343
+# ...
+#
+
+function help {
+ echo " "
+ echo "usage: ${0}"
+ echo " -v/--version=<version> The version of the next release. [Required]"
+ echo " -s/--start=<start> Defines the first commit to inspect. [Required]"
+ echo " -e/--end=<end> Defines the last commit to inspect. "
+ echo " -r/--repo=<repo> The Git repo to work from."
+ echo " -b/--branch=<branch> The branch to work from."
+ echo " -h/--help Usage information."
+ echo " "
+ echo "example: "
+ echo " validate-jira-for-release --version=0.4.2 --start=tags/apache-metron-0.4.1-release"
+ echo " "
+}
+
+# define default values
+END="HEAD"
+REPO="https://git-wip-us.apache.org/repos/asf/metron.git"
+BRANCH="master"
+
+# print help, if the user just runs this without any args
+if [ "$#" -eq 0 ]; then
+ help
+ exit 1
+fi
+
+# handle command line options
+for i in "$@"; do
+ case $i in
+ #
+ # VERSION: The release version to validate; the 'next' release.
+ #
+ #
+ -v=*|--version=*)
+ VERSION="${i#*=}"
+ shift # past argument=value
+ ;;
+
+ #
+ # START: Defines the first commit to inspect
+ #
+ # -s=tags/apache-metron-0.4.1-release
+ # --start=tags/apache-metron-0.4.1-release
+ #
+ -s=*|--start=*)
+ START="${i#*=}"
+ shift # past argument=value
+ ;;
+
+ #
+ # END: Defines the last commit to inspect
+ #
+ # -e=HEAD
+ # --end=HEAD
+ #
+ -e=*|--end=*)
+ END="${i#*=}"
+ shift # past argument=value
+ ;;
+
+ #
+ # REPO: Define the Git repo to work from
+ #
+ # -r=https://git-wip-us.apache.org/repos/asf/metron.git
+ # --repo=<repo-url>
+ #
+ -r=*|--repo=*)
+ REPO="${i#*=}"
+ shift # past argument=value
+ ;;
+
+ #
+ # BRANCH: The branch to work from.
+ #
+ # -b=master
+ # --branch=master
+ #
+ -b=*|--branch=*)
+ BRANCH="${i#*=}"
+ shift # past argument with no value
+ ;;
+
+ #
+ # -h/--help
+ #
+ -h|--help)
+ help
+ exit 0
+ shift # past argument with no value
+ ;;
+
+ #
+ # Unknown option
+ #
+ *)
+ UNKNOWN_OPTION="${i#*=}"
+ echo "Error: unknown option: $UNKNOWN_OPTION"
+ help
+ ;;
+ esac
+done
+
--- End diff --
Sure, done.
---