mesos-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mp...@apache.org
Subject mesos git commit: Removed dependency on external Docker image for mesos-tidy.
Date Tue, 13 Sep 2016 09:03:05 GMT
Repository: mesos
Updated Branches:
  refs/heads/master 170c01f1a -> bda1194e7


Removed dependency on external Docker image for mesos-tidy.

In order minimize external dependency, this patch modifies the
implementation of `support/mesos-tidy.sh` to build the mesos-tidy
Docker container on the fly just before executing tests.

We follow the same basic idea already employed in
`support/docker_build.sh` where the image is built, executed, and
removed. Note that this approach likely does not take full advantage
of Docker's caching capabilities.

Review: https://reviews.apache.org/r/51650/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/bda1194e
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/bda1194e
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/bda1194e

Branch: refs/heads/master
Commit: bda1194e7b5b2c6f145d1f4b4bc22c5132bfca1d
Parents: 170c01f
Author: Benjamin Bannier <benjamin.bannier@mesosphere.io>
Authored: Tue Sep 13 11:01:28 2016 +0200
Committer: Michael Park <mpark@apache.org>
Committed: Tue Sep 13 11:01:28 2016 +0200

----------------------------------------------------------------------
 support/mesos-tidy.sh | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/bda1194e/support/mesos-tidy.sh
----------------------------------------------------------------------
diff --git a/support/mesos-tidy.sh b/support/mesos-tidy.sh
index 36e7f03..da7d7ee 100755
--- a/support/mesos-tidy.sh
+++ b/support/mesos-tidy.sh
@@ -16,6 +16,13 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+
+# 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/
+
 # Configure how checks are run. These variables can be overriden by setting the
 # respective environment variables before invoking this script.
 # TODO(bbannier): Enable more upstream checks by default, e.g., from the Google set.
@@ -39,4 +46,7 @@ docker run \
   -v "${MESOS_DIRECTORY}":/SRC \
   -e CHECKS="${CHECKS}" \
   -e CONFIGURE_FLAGS="${CONFIGURE_FLAGS}" \
-  mesosphere/mesos-tidy || exit 1
+  $TAG || exit 1
+
+# Set a trap to delete the image on exit.
+trap "docker rmi $TAG" EXIT


Mime
View raw message