Build: Update pom version + add rat check script
Project: http://git-wip-us.apache.org/repos/asf/incubator-madlib/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-madlib/commit/d344f1f1 Tree: http://git-wip-us.apache.org/repos/asf/incubator-madlib/tree/d344f1f1 Diff: http://git-wip-us.apache.org/repos/asf/incubator-madlib/diff/d344f1f1 Branch: refs/heads/latest_release Commit: d344f1f1948aecd06af7ffbb494570bf1726fc4a Parents: 1392c5d Author: Rahul Iyer <ri...@apache.org> Authored: Mon Mar 27 14:12:15 2017 -0700 Committer: Rahul Iyer <ri...@apache.org> Committed: Mon Mar 27 14:12:15 2017 -0700 ---------------------------------------------------------------------- README.md | 21 ++++++++------ pom.xml | 2 +- tool/jenkins/rat_check.sh | 62 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 76 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-madlib/blob/d344f1f1/README.md ---------------------------------------------------------------------- diff --git a/README.md b/README.md index eac06c2..1d507a3 100644 --- a/README.md +++ b/README.md @@ -18,19 +18,24 @@ Development with Docker We provide a Docker image with necessary dependencies required to compile and test MADlib on PostgreSQL 9.6. You can view the dependency Docker file at ./tool/docker/base/Dockerfile_postgres_9_6. The image is hosted on Docker Hub at madlib/postgres_9.6:latest. Later we will provide a similar Docker image for Greenplum Database. Some useful commands to use the docker file: + ``` ## 1) Pull down the `madlib/postgres_9.6:latest` image from docker hub: docker pull madlib/postgres_9.6:latest -## 2) Launch a container corresponding to the MADlib image, mounting the source code folder to the container: -docker run -d -it --name madlib -v (path to incubator-madlib directory):/incubator-madlib/ madlib/postgres_9.6 +## 2) Launch a container corresponding to the MADlib image, mounting the +## source code folder to the container: +docker run -d -it --name madlib \ + -v (path to incubator-madlib directory):/incubator-madlib/ madlib/postgres_9.6 # where incubator-madlib is the directory where the MADlib source code resides. -############################################## * WARNING * ################################################## -# Please be aware that when mounting a volume as shown above, any changes you make in the "incubator-madlib" -# folder inside the Docker container will be reflected on your local disk (and vice versa). This means that -# deleting data in the mounted volume from a Docker container will delete the data from your local disk also. -############################################################################################################# +################################# * WARNING * ################################# +# Please be aware that when mounting a volume as shown above, any changes you +# make in the "incubator-madlib" folder inside the Docker container will be +# reflected on your local disk (and vice versa). This means that deleting data +# in the mounted volume from a Docker container will delete the data from your +# local disk also. +############################################################################### ## 3) When the container is up, connect to it and build MADlib: docker exec -it madlib bash @@ -44,7 +49,7 @@ make install ## 4) Install MADlib: src/bin/madpack -p postgres -c postgres/postgres@localhost:5432/postgres install -## 5) Several other commands, apart from the ones above can now be run, such as: +## 5) Several other commands can now be run, such as: # Run install check, on all modules: src/bin/madpack -p postgres -c postgres/postgres@localhost:5432/postgres install-check # Run install check, on a specific module, say svm: http://git-wip-us.apache.org/repos/asf/incubator-madlib/blob/d344f1f1/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index 5defa28..f033334 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ <groupId>org.apache.madlib</groupId> <artifactId>madlib</artifactId> - <version>1.10</version> + <version>1.11-dev</version> <packaging>pom</packaging> <build> http://git-wip-us.apache.org/repos/asf/incubator-madlib/blob/d344f1f1/tool/jenkins/rat_check.sh ---------------------------------------------------------------------- diff --git a/tool/jenkins/rat_check.sh b/tool/jenkins/rat_check.sh new file mode 100644 index 0000000..7c12673 --- /dev/null +++ b/tool/jenkins/rat_check.sh @@ -0,0 +1,62 @@ +# ---------------------------------------------------------------------- +# 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. +# ---------------------------------------------------------------------- +# This file captures the Apache Jenkins rat check script +# ---------------------------------------------------------------------- + +set -exu + +workdir=`pwd` + +# Check if NOTICE file year is current +grep "Copyright 2016-$(date +"%Y") The Apache Software Foundation" "${workdir}/incubator-madlib/NOTICE" + +# Check if pom.xml file version is current +# With below grep, it's possible to get a "False Positive" (i.e. no error when it should have) +# but won't give a "False Negative" (i.e. if it fails then there's definitely a problem) +grep "<version>$(cat "${workdir}/incubator-madlib/src/config/Version.yml" | cut -d" " -f2)</version>" \ + "${workdir}/incubator-madlib/pom.xml" + +set +x + +badfile_extentions="class jar tar tgz zip" +badfiles_found=false + +for extension in ${badfile_extentions}; do + echo "Searching for ${extension} files:" + badfile_count=$(find . -name "${workdir}/incubator-madlib/*.${extension}" | wc -l) + if [ ${badfile_count} != 0 ]; then + echo "----------------------------------------------------------------------" + echo "FATAL: ${extension} files should not exist" + echo "For ASF compatibility: the source tree should not contain" + echo "binary (jar) files as users have a hard time verifying their" + echo "contents." + + find . -name "${workdir}/incubator-madlib/*.${extension}" + echo "----------------------------------------------------------------------" + badfiles_found=true + else + echo "PASSED: No ${extension} files found." + fi +done + +if [ ${badfiles_found} = "true" ]; then + exit 1 +fi + +set -x \ No newline at end of file