You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by mp...@apache.org on 2017/01/18 19:47:23 UTC
[1/4] mesos git commit: Added `libssl-dev` to
`support/mesos-tidy/Dockerfile`.
Repository: mesos
Updated Branches:
refs/heads/master dd553b237 -> 745b3c758
Added `libssl-dev` to `support/mesos-tidy/Dockerfile`.
See summary. Refer to MESOS-6942.
Review: https://reviews.apache.org/r/55667/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/d5d52b46
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/d5d52b46
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/d5d52b46
Branch: refs/heads/master
Commit: d5d52b4617905372889c0fd4ad56d6aee2b6ddfb
Parents: dd553b2
Author: Michael Park <mp...@apache.org>
Authored: Wed Jan 18 11:46:24 2017 -0800
Committer: Michael Park <mp...@apache.org>
Committed: Wed Jan 18 11:46:24 2017 -0800
----------------------------------------------------------------------
support/mesos-tidy/Dockerfile | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/d5d52b46/support/mesos-tidy/Dockerfile
----------------------------------------------------------------------
diff --git a/support/mesos-tidy/Dockerfile b/support/mesos-tidy/Dockerfile
index 8d8c476..1cf582e 100644
--- a/support/mesos-tidy/Dockerfile
+++ b/support/mesos-tidy/Dockerfile
@@ -45,12 +45,14 @@ RUN \
ENV PATH /opt/bin:$PATH
# Install Mesos dependencies
+# TODO(mpark): Remove `libssl-dev` from this list once `MESOS-6942` is resolved.
RUN apt-get install -qy \
autoconf \
libapr1-dev \
libcurl4-nss-dev \
libsasl2-dev \
libsasl2-modules \
+ libssl-dev \
libsvn-dev \
libtool \
zlib1g-dev && \
[2/4] mesos git commit: Used the `mesos/mesos-tidy` image from
DockerHub.
Posted by mp...@apache.org.
Used the `mesos/mesos-tidy` image from DockerHub.
Review: https://reviews.apache.org/r/55490/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/1a1b91ad
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/1a1b91ad
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/1a1b91ad
Branch: refs/heads/master
Commit: 1a1b91adf8667638ac3e7ed720595ea1994a033e
Parents: d5d52b4
Author: Michael Park <mp...@apache.org>
Authored: Wed Jan 18 11:46:40 2017 -0800
Committer: Michael Park <mp...@apache.org>
Committed: Wed Jan 18 11:46:40 2017 -0800
----------------------------------------------------------------------
support/mesos-tidy.sh | 19 ++++++-------------
1 file changed, 6 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/1a1b91ad/support/mesos-tidy.sh
----------------------------------------------------------------------
diff --git a/support/mesos-tidy.sh b/support/mesos-tidy.sh
index 96d3ecb..7cdce98 100755
--- a/support/mesos-tidy.sh
+++ b/support/mesos-tidy.sh
@@ -19,33 +19,26 @@
set -e
set -o pipefail
+MESOS_DIR=$(git rev-parse --show-toplevel)
+
# Configure how checks are run. These variables can be overridden by setting the
# respective environment variables before invoking this script.
# TODO(bbannier): Enable more upstream checks by default, e.g., from the Google set.
CHECKS=${CHECKS:-'-*,mesos-*'}
-MESOS_DIRECTORY=$(cd "$(dirname "$0")/.." && pwd)
-
# Check for unstaged or uncommitted changes.
if ! $(git diff-index --quiet HEAD --); then
echo 'Please commit or stash any changes before running `mesos-tidy`.'
exit 1
fi
-# Prepare clang-tidy docker image.
-TAG=mesos-tidy-`date +%s`-$RANDOM
-
-# TODO(vinod): Instead of building Docker images on the fly host the
-# images on DockerHub and use them.
-docker build --no-cache=true -t $TAG mesos-tidy/
-
-# Set a trap to delete the image on exit.
-trap "docker rmi $TAG" EXIT
+# Pull the `mesos-tidy` image from Docker Hub.
+docker pull mesos/mesos-tidy
# Execute the container.
docker run \
--rm \
- -v "${MESOS_DIRECTORY}":/SRC \
+ -v "${MESOS_DIR}":/SRC:Z \
-e CHECKS="${CHECKS}" \
-e CONFIGURE_FLAGS="${CONFIGURE_FLAGS}" \
- $TAG
+ mesos/mesos-tidy
[4/4] mesos git commit: Added a `support/README.md` and the
`support/jenkins` directory.
Posted by mp...@apache.org.
Added a `support/README.md` and the `support/jenkins` directory.
Review: https://reviews.apache.org/r/55491/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/745b3c75
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/745b3c75
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/745b3c75
Branch: refs/heads/master
Commit: 745b3c7589e5252cf93f62e081b78fa420771d0c
Parents: 34b2682
Author: Michael Park <mp...@apache.org>
Authored: Wed Jan 18 11:47:03 2017 -0800
Committer: Michael Park <mp...@apache.org>
Committed: Wed Jan 18 11:47:03 2017 -0800
----------------------------------------------------------------------
support/README.md | 6 ++++++
support/jenkins/README.md | 8 ++++++++
support/jenkins/buildbot.sh | 29 +++++++++++++++++++++++++++++
support/jenkins/reviewbot.sh | 37 +++++++++++++++++++++++++++++++++++++
support/jenkins/tidybot.sh | 30 ++++++++++++++++++++++++++++++
5 files changed, 110 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/745b3c75/support/README.md
----------------------------------------------------------------------
diff --git a/support/README.md b/support/README.md
new file mode 100644
index 0000000..e812e96
--- /dev/null
+++ b/support/README.md
@@ -0,0 +1,6 @@
+# Supporting tools
+
+This directory contains various helper scripts.
+
+The scripts directly in this directory are intended to be used by Mesos
+developers on the command-line.
http://git-wip-us.apache.org/repos/asf/mesos/blob/745b3c75/support/jenkins/README.md
----------------------------------------------------------------------
diff --git a/support/jenkins/README.md b/support/jenkins/README.md
new file mode 100644
index 0000000..21fc51e
--- /dev/null
+++ b/support/jenkins/README.md
@@ -0,0 +1,8 @@
+# Build scripts for ASF Jenkins CI.
+
+This directory contains build scripts for the ASF Jenkins CI.
+
+The scripts named `<name>.sh` correspond to Jenkins jobs named `Mesos-<Name>`.
+e.g., [buildbot.sh](buildbot.sh) corresponds to [Mesos-Buildbot][buildbot].
+
+[buildbot]: https://builds.apache.org/view/M-R/view/Mesos/job/Mesos-Buildbot
http://git-wip-us.apache.org/repos/asf/mesos/blob/745b3c75/support/jenkins/buildbot.sh
----------------------------------------------------------------------
diff --git a/support/jenkins/buildbot.sh b/support/jenkins/buildbot.sh
new file mode 100755
index 0000000..7f78509
--- /dev/null
+++ b/support/jenkins/buildbot.sh
@@ -0,0 +1,29 @@
+#!/usr/bin/env 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.
+
+set -e
+set -o pipefail
+
+MESOS_DIR=$(git rev-parse --show-toplevel)
+
+# Install `virtualenv`, needed by `support/mesos-style.py`.
+pip install --user virtualenv
+
+"${MESOS_DIR}"/support/mesos-style.py
+
+"${MESOS_DIR}"/support/docker-build.sh
http://git-wip-us.apache.org/repos/asf/mesos/blob/745b3c75/support/jenkins/reviewbot.sh
----------------------------------------------------------------------
diff --git a/support/jenkins/reviewbot.sh b/support/jenkins/reviewbot.sh
new file mode 100755
index 0000000..a9d0b41
--- /dev/null
+++ b/support/jenkins/reviewbot.sh
@@ -0,0 +1,37 @@
+#!/usr/bin/env 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.
+
+set -e
+set -o pipefail
+
+MESOS_DIR=$(git rev-parse --show-toplevel)
+
+: ${USERNAME:?"Environment variable 'USERNAME' must be set to the username of the 'Mesos Reviewbot' Reviewboard account."}
+: ${PASSWORD:?"Environment variable 'PASSWORD' must be set to the password of the 'Mesos Reviewbot' Reviewboard account."}
+
+export OS='ubuntu:14.04'
+export BUILDTOOL='autotools'
+export COMPILER='gcc'
+export CONFIGURATION='--verbose'
+export ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'
+
+# Build the HEAD first to ensure that there are no errors prior to applying
+# the review chain.
+"${MESOS_DIR}"/support/jenkins/buildbot.sh
+
+"${MESOS_DIR}"/support/verify-reviews.py ${USERNAME} ${PASSWORD} 1
http://git-wip-us.apache.org/repos/asf/mesos/blob/745b3c75/support/jenkins/tidybot.sh
----------------------------------------------------------------------
diff --git a/support/jenkins/tidybot.sh b/support/jenkins/tidybot.sh
new file mode 100755
index 0000000..4be852b
--- /dev/null
+++ b/support/jenkins/tidybot.sh
@@ -0,0 +1,30 @@
+#!/usr/bin/env 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.
+
+set -e
+set -o pipefail
+
+MESOS_DIR=$(git rev-parse --show-toplevel)
+
+function remove_image {
+ docker rmi $(docker images -q mesos/mesos-tidy) || true
+}
+
+trap remove_image EXIT
+
+"${MESOS_DIR}"/support/mesos-tidy.sh
[3/4] mesos git commit: Renamed `CONFIGURE_FLAGS` to `CMAKE_ARGS`.
Posted by mp...@apache.org.
Renamed `CONFIGURE_FLAGS` to `CMAKE_ARGS`.
Updated `support/mesos-tidy/README.md` accordingly + minor updates.
Review: https://reviews.apache.org/r/55654/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/34b26825
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/34b26825
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/34b26825
Branch: refs/heads/master
Commit: 34b26825b200478238436f08f2fed05d3d0dc4a5
Parents: 1a1b91a
Author: Michael Park <mp...@apache.org>
Authored: Wed Jan 18 11:46:52 2017 -0800
Committer: Michael Park <mp...@apache.org>
Committed: Wed Jan 18 11:46:52 2017 -0800
----------------------------------------------------------------------
support/mesos-tidy.sh | 2 +-
support/mesos-tidy/README.md | 57 ++++++++++++++++++-----------------
support/mesos-tidy/entrypoint.sh | 2 +-
3 files changed, 31 insertions(+), 30 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/34b26825/support/mesos-tidy.sh
----------------------------------------------------------------------
diff --git a/support/mesos-tidy.sh b/support/mesos-tidy.sh
index 7cdce98..a56ae78 100755
--- a/support/mesos-tidy.sh
+++ b/support/mesos-tidy.sh
@@ -40,5 +40,5 @@ docker run \
--rm \
-v "${MESOS_DIR}":/SRC:Z \
-e CHECKS="${CHECKS}" \
- -e CONFIGURE_FLAGS="${CONFIGURE_FLAGS}" \
+ -e CMAKE_ARGS="${CMAKE_ARGS}" \
mesos/mesos-tidy
http://git-wip-us.apache.org/repos/asf/mesos/blob/34b26825/support/mesos-tidy/README.md
----------------------------------------------------------------------
diff --git a/support/mesos-tidy/README.md b/support/mesos-tidy/README.md
index e285632..81c0a5c 100644
--- a/support/mesos-tidy/README.md
+++ b/support/mesos-tidy/README.md
@@ -1,17 +1,14 @@
-clang-tidy docker image for Mesos
-=================================
+# `clang-tidy` docker image for Mesos
-This directory contains tooling to build a docker image to run
-clang-tidy checks over a Mesos repository. It uses a [version of
-clang-tidy](https://github.com/mesos/clang-tools-extra/tree/mesos_38)
-augmented with Mesos-specific checks.
+This directory contains tooling to build a docker image to run `clang-tidy`
+checks over a Mesos repository. It uses a
+[customized version of `clang-tidy`][custom-clang-tidy] which is augmented with
+Mesos-specific checks.
-*IMPORTANT*: This directory is for maintainers of `mesos-tidy` checks.
-Users should reach for `support/mesos-tidy.sh`.
+__IMPORTANT__: This directory is intended for maintainers of `mesos-tidy`
+checks. Users should reach for `support/mesos-tidy.sh`.
-
-Building the docker image
--------------------------
+## Building the docker image
Building the image involves compiling a Mesos-flavored version of
`clang-tidy`, installing Mesos dependencies, and installation of tools
@@ -19,31 +16,35 @@ to drive check invocations.
The image can be built with
- $ docker build -t mesos-tidy .
-
-A pre-built image is available via Docker Hub as `mesosphere/mesos-tidy`.
+```bash
+$ docker build -t mesos-tidy .
+```
+A pre-built image is available via Docker Hub as `mesos/mesos-tidy`.
-Running checks
---------------
+## Running checks
To run checks over a Mesos checkout invoke
- $ docker run \
- -v <MESOS_CHECKOUT>:/SRC \
- [-e CHECKS=<CHECKS>] \
- [-e CONFIGURE_FLAGS=<CONFIGURE_FLAGS>] \
- --rm \
- mesos-tidy
+```bash
+$ docker run \
+ --rm \
+ -v <MESOS_CHECKOUT>:/SRC \
+ [-e CHECKS=<CHECKS>] \
+ [-e CMAKE_ARGS=<CMAKE_ARGS>] \
+ mesos-tidy
+```
-Here `MESOS_CHECKOUT` points to a git checkout of the Mesos source
-tree.
+Here `MESOS_CHECKOUT` points to a git checkout of the Mesos source tree.
-Additional configure parameters can be passed to the `./configure`
-invocation of Mesos via `CONFIGURE_FLAGS`. By default, `./configure`
-will be invoked without arguments.
+Additional configure parameters can be passed to the `cmake` invocation of Mesos
+via `CMAKE_ARGS`. By default, `cmake` will be invoked with
+`-DCMAKE_BUILD_TYPE=Release` and `-DCMAKE_EXPORT_COMPILE_COMMANDS=ON`.
Optionally, the set of checks to perform can be specified in a
-clang-tidy check regex via `CHECKS`.
+`clang-tidy` check regex via `CHECKS`.
Results from 3rdparty external dependencies are filtered from the result set.
+
+
+[custom-clang-tidy]: https://github.com/mesos/clang-tools-extra/tree/mesos_39
http://git-wip-us.apache.org/repos/asf/mesos/blob/34b26825/support/mesos-tidy/entrypoint.sh
----------------------------------------------------------------------
diff --git a/support/mesos-tidy/entrypoint.sh b/support/mesos-tidy/entrypoint.sh
index c1de199..4f03a60 100755
--- a/support/mesos-tidy/entrypoint.sh
+++ b/support/mesos-tidy/entrypoint.sh
@@ -28,7 +28,7 @@ git clone --depth 1 file:///SRC "${SRCDIR}"
# Configure sources
cmake -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
- ${CONFIGURE_FLAGS} \
+ ${CMAKE_ARGS} \
"${SRCDIR}"
# Build the external dependencies.