From 09121799b0bfa57d4076ec2661d99f5c3b185ef2 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Sat, 30 Jan 2016 09:01:53 +0100 Subject: Removing gpr as a separated library. --- templates/tools/doxygen/Doxyfile.core.internal.template | 2 +- templates/tools/doxygen/Doxyfile.core.template | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'templates/tools') diff --git a/templates/tools/doxygen/Doxyfile.core.internal.template b/templates/tools/doxygen/Doxyfile.core.internal.template index 05be9d81aa..ac30e0afc2 100644 --- a/templates/tools/doxygen/Doxyfile.core.internal.template +++ b/templates/tools/doxygen/Doxyfile.core.internal.template @@ -1,4 +1,4 @@ %YAML 1.2 --- | <%namespace file="Doxyfile.include" import="gen_doxyfile"/>\ - ${gen_doxyfile(['grpc', 'gpr'], 'Core', libs, True)} + ${gen_doxyfile(['grpc'], 'Core', libs, True)} diff --git a/templates/tools/doxygen/Doxyfile.core.template b/templates/tools/doxygen/Doxyfile.core.template index 8004294ec1..679069bddc 100644 --- a/templates/tools/doxygen/Doxyfile.core.template +++ b/templates/tools/doxygen/Doxyfile.core.template @@ -1,4 +1,4 @@ %YAML 1.2 --- | <%namespace file="Doxyfile.include" import="gen_doxyfile"/>\ - ${gen_doxyfile(['grpc', 'gpr'], 'Core', libs, False)} + ${gen_doxyfile(['grpc'], 'Core', libs, False)} -- cgit v1.2.3 From f008f067f82d88cbcd70a104e20479d4ed3a3386 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 8 Feb 2016 12:48:03 -0800 Subject: build.yaml centric versioning --- Makefile | 2 +- build.yaml | 12 +-- setup.py | 3 +- src/core/surface/version.c | 2 +- src/csharp/Grpc.Core/VersionInfo.cs | 2 +- src/csharp/build_packages.bat | 2 +- src/python/grpcio/grpc_version.py | 32 ++++++++ src/ruby/lib/grpc/version.rb | 2 +- templates/Makefile.template | 12 +-- templates/src/core/surface/version.c.template | 3 +- .../src/csharp/Grpc.Core/VersionInfo.cs.template | 2 +- templates/src/csharp/build_packages.bat.template | 2 +- .../src/python/grpcio/grpc_version.py.template | 34 ++++++++ templates/src/ruby/lib/grpc/version.rb.template | 2 +- templates/tools/doxygen/Doxyfile.include | 2 +- tools/buildgen/build-cleaner.py | 3 - tools/buildgen/plugins/expand_version.py | 94 ++++++++++++++++++++++ tools/doxygen/Doxyfile.c++ | 2 +- tools/doxygen/Doxyfile.c++.internal | 2 +- tools/doxygen/Doxyfile.core | 2 +- tools/doxygen/Doxyfile.core.internal | 2 +- 21 files changed, 188 insertions(+), 31 deletions(-) create mode 100644 src/python/grpcio/grpc_version.py create mode 100644 templates/src/python/grpcio/grpc_version.py.template create mode 100755 tools/buildgen/plugins/expand_version.py (limited to 'templates/tools') diff --git a/Makefile b/Makefile index 16e6b32eba..c023ee9603 100644 --- a/Makefile +++ b/Makefile @@ -361,7 +361,7 @@ E = @echo Q = @ endif -VERSION = 0.13.0.0 +VERSION = 0.13.0-dev CPPFLAGS_NO_ARCH += $(addprefix -I, $(INCLUDES)) $(addprefix -D, $(DEFINES)) CPPFLAGS += $(CPPFLAGS_NO_ARCH) $(ARCH_FLAGS) diff --git a/build.yaml b/build.yaml index b615945198..6c42ec8269 100644 --- a/build.yaml +++ b/build.yaml @@ -2,12 +2,12 @@ '#2': It is used among other things to generate all of our project files. '#3': Please refer to the templates directory for more information. settings: - '#': The public version number of the library. - version: - major: 0 - minor: 13 - micro: 0 - build: 0 + '#1': The public version number of the library. + '#2': Master always has a "-dev" suffix + '#3': Use "-preN" suffixes to identify pre-release versions + '#4': Per-language overrides are possible with (eg) ruby_version security_connector_test + '#5': See the expand_version.py for all the quirks here + version: 0.13.0-dev filegroups: - name: census public_headers: diff --git a/setup.py b/setup.py index 80828a3b4a..f8450a7677 100644 --- a/setup.py +++ b/setup.py @@ -54,6 +54,7 @@ sys.path.insert(0, os.path.abspath(PYTHON_STEM)) # Break import-style to ensure we can actually find our in-repo dependencies. import commands import grpc_core_dependencies +import grpc_version LICENSE = '3-clause BSD' @@ -218,7 +219,7 @@ else: setuptools.setup( name='grpcio', - version='0.12.0b8', + version=grpc_version.VERSION, license=LICENSE, ext_modules=CYTHON_EXTENSION_MODULES, packages=list(PACKAGES), diff --git a/src/core/surface/version.c b/src/core/surface/version.c index 262a13f184..b33c99ab19 100644 --- a/src/core/surface/version.c +++ b/src/core/surface/version.c @@ -36,4 +36,4 @@ #include -const char *grpc_version_string(void) { return "0.13.0.0"; } +const char *grpc_version_string(void) { return "0.13.0-dev"; } diff --git a/src/csharp/Grpc.Core/VersionInfo.cs b/src/csharp/Grpc.Core/VersionInfo.cs index 65813909de..7124ec85d3 100644 --- a/src/csharp/Grpc.Core/VersionInfo.cs +++ b/src/csharp/Grpc.Core/VersionInfo.cs @@ -41,6 +41,6 @@ namespace Grpc.Core /// /// Current version of gRPC C# /// - public const string CurrentVersion = "0.13.0"; + public const string CurrentVersion = "0.13.0-dev"; } } diff --git a/src/csharp/build_packages.bat b/src/csharp/build_packages.bat index e423545ef8..2c4e4e514d 100644 --- a/src/csharp/build_packages.bat +++ b/src/csharp/build_packages.bat @@ -1,7 +1,7 @@ @rem Builds gRPC NuGet packages @rem Current package versions -set VERSION=0.13.0 +set VERSION=0.13.0-dev set PROTOBUF_VERSION=3.0.0-beta2 @rem Packages that depend on prerelease packages (like Google.Protobuf) need to have prerelease suffix as well. diff --git a/src/python/grpcio/grpc_version.py b/src/python/grpcio/grpc_version.py new file mode 100644 index 0000000000..8a40544981 --- /dev/null +++ b/src/python/grpcio/grpc_version.py @@ -0,0 +1,32 @@ +# Copyright 2015-2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio/grpc_version.py.template`!!! + +VERSION='0.13.0.dev0' diff --git a/src/ruby/lib/grpc/version.rb b/src/ruby/lib/grpc/version.rb index 89ff882916..e701d58478 100644 --- a/src/ruby/lib/grpc/version.rb +++ b/src/ruby/lib/grpc/version.rb @@ -29,5 +29,5 @@ # GRPC contains the General RPC module. module GRPC - VERSION = '0.13.0.0' + VERSION = '0.13.0-dev' end diff --git a/templates/Makefile.template b/templates/Makefile.template index 1a38e267a7..9942514211 100644 --- a/templates/Makefile.template +++ b/templates/Makefile.template @@ -276,7 +276,7 @@ Q = @ endif - VERSION = ${settings.version.major}.${settings.version.minor}.${settings.version.micro}.${settings.version.build} + VERSION = ${settings.core_version} CPPFLAGS_NO_ARCH += $(addprefix -I, $(INCLUDES)) $(addprefix -D, $(DEFINES)) CPPFLAGS += $(CPPFLAGS_NO_ARCH) $(ARCH_FLAGS) @@ -320,7 +320,7 @@ ifeq ($(SYSTEM),MINGW32) SHARED_EXT = dll SHARED_PREFIX = - SHARED_VERSION = -${settings.version.major} + SHARED_VERSION = -${settings.core_version.major} else ifeq ($(SYSTEM),Darwin) SHARED_EXT = dylib SHARED_PREFIX = lib @@ -1286,7 +1286,7 @@ ifeq ($(SYSTEM),MINGW32) $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/lib${lib.name}-imp.a $(prefix)/lib/lib${lib.name}-imp.a else ifneq ($(SYSTEM),Darwin) - $(Q) ln -sf $(SHARED_PREFIX)${lib.name}$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/lib${lib.name}.so.${settings.version.major} + $(Q) ln -sf $(SHARED_PREFIX)${lib.name}$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/lib${lib.name}.so.${settings.core_version.major} $(Q) ln -sf $(SHARED_PREFIX)${lib.name}$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/lib${lib.name}.so endif % endif @@ -1304,7 +1304,7 @@ ifeq ($(SYSTEM),MINGW32) $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/lib${lib.name}-imp.a $(prefix)/lib/lib${lib.name}-imp.a else ifneq ($(SYSTEM),Darwin) - $(Q) ln -sf $(SHARED_PREFIX)${lib.name}$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/lib${lib.name}.so.${settings.version.major} + $(Q) ln -sf $(SHARED_PREFIX)${lib.name}$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/lib${lib.name}.so.${settings.core_version.major} $(Q) ln -sf $(SHARED_PREFIX)${lib.name}$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/lib${lib.name}.so endif % endif @@ -1578,8 +1578,8 @@ ifeq ($(SYSTEM),Darwin) $(Q) ${ld} ${ldflags} -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)${lib.name}$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o ${out_libbase}.$(SHARED_EXT) ${common}${libs} else - $(Q) ${ld} ${ldflags} -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,lib${lib.name}.so.${settings.version.major} -o ${out_libbase}.$(SHARED_EXT) ${common}${libs} - $(Q) ln -sf $(SHARED_PREFIX)${lib.name}$(SHARED_VERSION).$(SHARED_EXT) ${out_libbase}.so.${settings.version.major} + $(Q) ${ld} ${ldflags} -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,lib${lib.name}.so.${settings.core_version.major} -o ${out_libbase}.$(SHARED_EXT) ${common}${libs} + $(Q) ln -sf $(SHARED_PREFIX)${lib.name}$(SHARED_VERSION).$(SHARED_EXT) ${out_libbase}.so.${settings.core_version.major} $(Q) ln -sf $(SHARED_PREFIX)${lib.name}$(SHARED_VERSION).$(SHARED_EXT) ${out_libbase}.so endif endif diff --git a/templates/src/core/surface/version.c.template b/templates/src/core/surface/version.c.template index 4788dc47d9..f2b3cfdc58 100644 --- a/templates/src/core/surface/version.c.template +++ b/templates/src/core/surface/version.c.template @@ -38,5 +38,4 @@ #include - const char *grpc_version_string(void) { \ - return "${settings.version.major}.${settings.version.minor}.${settings.version.micro}.${settings.version.build}"; } + const char *grpc_version_string(void) { return "${settings.core_version}"; } diff --git a/templates/src/csharp/Grpc.Core/VersionInfo.cs.template b/templates/src/csharp/Grpc.Core/VersionInfo.cs.template index 48197baf7d..578f01f079 100644 --- a/templates/src/csharp/Grpc.Core/VersionInfo.cs.template +++ b/templates/src/csharp/Grpc.Core/VersionInfo.cs.template @@ -43,6 +43,6 @@ /// /// Current version of gRPC C# /// - public const string CurrentVersion = "${settings.version.major}.${settings.version.minor}.${settings.version.micro}"; + public const string CurrentVersion = "${settings.csharp_version}"; } } diff --git a/templates/src/csharp/build_packages.bat.template b/templates/src/csharp/build_packages.bat.template index 847653bdcf..b855126ae6 100644 --- a/templates/src/csharp/build_packages.bat.template +++ b/templates/src/csharp/build_packages.bat.template @@ -3,7 +3,7 @@ @rem Builds gRPC NuGet packages @rem Current package versions - set VERSION=${settings.version.major}.${settings.version.minor}.${settings.version.micro} + set VERSION=${settings.csharp_version} set PROTOBUF_VERSION=3.0.0-beta2 @rem Packages that depend on prerelease packages (like Google.Protobuf) need to have prerelease suffix as well. diff --git a/templates/src/python/grpcio/grpc_version.py.template b/templates/src/python/grpcio/grpc_version.py.template new file mode 100644 index 0000000000..aaacab1a50 --- /dev/null +++ b/templates/src/python/grpcio/grpc_version.py.template @@ -0,0 +1,34 @@ +%YAML 1.2 +--- | + # Copyright 2015-2016, Google Inc. + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions are + # met: + # + # * Redistributions of source code must retain the above copyright + # notice, this list of conditions and the following disclaimer. + # * Redistributions in binary form must reproduce the above + # copyright notice, this list of conditions and the following disclaimer + # in the documentation and/or other materials provided with the + # distribution. + # * Neither the name of Google Inc. nor the names of its + # contributors may be used to endorse or promote products derived from + # this software without specific prior written permission. + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio/grpc_version.py.template`!!! + + VERSION='${settings.python_version.pep440()}' diff --git a/templates/src/ruby/lib/grpc/version.rb.template b/templates/src/ruby/lib/grpc/version.rb.template index 4859d2f883..a47d2d8548 100644 --- a/templates/src/ruby/lib/grpc/version.rb.template +++ b/templates/src/ruby/lib/grpc/version.rb.template @@ -31,5 +31,5 @@ # GRPC contains the General RPC module. module GRPC - VERSION = '${settings.version.major}.${settings.version.minor}.${settings.version.micro}.${settings.version.build}' + VERSION = '${settings.ruby_version}' end diff --git a/templates/tools/doxygen/Doxyfile.include b/templates/tools/doxygen/Doxyfile.include index 21ef8a8ecd..8b0c528c1f 100644 --- a/templates/tools/doxygen/Doxyfile.include +++ b/templates/tools/doxygen/Doxyfile.include @@ -57,7 +57,7 @@ PROJECT_NAME = "GRPC ${packagename}" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = ${settings.version.major}.${settings.version.minor}.${settings.version.micro}.${settings.version.build} +PROJECT_NUMBER = ${settings.core_version if packagename=='Core' else settings.cpp_version} # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/buildgen/build-cleaner.py b/tools/buildgen/build-cleaner.py index 37fedec6ad..49a3644123 100755 --- a/tools/buildgen/build-cleaner.py +++ b/tools/buildgen/build-cleaner.py @@ -38,7 +38,6 @@ import yaml TEST = (os.environ.get('TEST', 'false') == 'true') _TOP_LEVEL_KEYS = ['settings', 'proto_deps', 'filegroups', 'libs', 'targets', 'vspackages'] -_VERSION_KEYS = ['major', 'minor', 'micro', 'build'] _ELEM_KEYS = [ 'name', 'cpu_cost', @@ -83,8 +82,6 @@ for filename in sys.argv[1:]: with open(filename) as f: js = yaml.load(f) js = rebuild_as_ordered_dict(js, _TOP_LEVEL_KEYS) - js['settings']['version'] = rebuild_as_ordered_dict( - js['settings']['version'], _VERSION_KEYS) for grp in ['filegroups', 'libs', 'targets']: if grp not in js: continue js[grp] = sorted([clean_elem(x) for x in js[grp]], diff --git a/tools/buildgen/plugins/expand_version.py b/tools/buildgen/plugins/expand_version.py new file mode 100755 index 0000000000..9f9c7c71fa --- /dev/null +++ b/tools/buildgen/plugins/expand_version.py @@ -0,0 +1,94 @@ +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +"""Buildgen .proto files list plugin. + +This parses the list of targets from the yaml build file, and creates +a list called "protos" that contains all of the proto file names. + +""" + + +import re + +LANGUAGES = [ + 'core', + 'cpp', + 'csharp', + 'node', + 'objc', + 'php', + 'python', + 'ruby', + ] + +class Version: + + def __init__(self, s): + if '-' in s: + s, self.tag = s.split('-') + self.major, self.minor, self.patch = [int(x) for x in s.split('.')] + + def __str__(self): + """Version string in a somewhat idiomatic style for most languages""" + s = '%d.%d.%d' % (self.major, self.minor, self.patch) + if self.tag: + s += '-%s' % self.tag + return s + + def pep440(self): + """Version string in Python PEP440 style""" + s = '%d.%d.%d' % (self.major, self.minor, self.patch) + if self.tag: + # we need to translate from grpc version tags to pep440 version + # tags; this code is likely to be a little ad-hoc + if self.tag == 'dev': + s += '.dev0' + elif len(self.tag) >= 3 and self.tag[0:3] == 'pre': + s += 'rc%d' % int(self.tag[3:]) + else: + raise Exception('Don\'t know how to translate version tag "%s" to pep440' % self.tag) + return s + +def mako_plugin(dictionary): + """Expand version numbers: + - for each language, ensure there's a language_version tag in + settings (defaulting to the master version tag) + - expand version strings to major, minor, patch, and tag + """ + + settings = dictionary['settings'] + master_version = Version(settings['version']) + settings['version'] = master_version + for language in LANGUAGES: + version_tag = '%s_version' % language + if version_tag in settings: + settings[version_tag] = Version(settings[version_tag]) + else: + settings[version_tag] = master_version diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++ index cdb998d59c..5bc38a9aec 100644 --- a/tools/doxygen/Doxyfile.c++ +++ b/tools/doxygen/Doxyfile.c++ @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC C++" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.13.0.0 +PROJECT_NUMBER = 0.13.0-dev # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 558ec9d394..ec71d2e9cd 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC C++" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.13.0.0 +PROJECT_NUMBER = 0.13.0-dev # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/doxygen/Doxyfile.core b/tools/doxygen/Doxyfile.core index a3b458163c..0f22620686 100644 --- a/tools/doxygen/Doxyfile.core +++ b/tools/doxygen/Doxyfile.core @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC Core" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.13.0.0 +PROJECT_NUMBER = 0.13.0-dev # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index e91b47c6f4..a3540778c1 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC Core" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.13.0.0 +PROJECT_NUMBER = 0.13.0-dev # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a -- cgit v1.2.3 From a810876732fb797cc572314a3c0ec2a820ace7b9 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Sun, 7 Feb 2016 14:30:43 -0800 Subject: dockerfile refactoring --- templates/tools/dockerfile/apt_get_basic.include | 33 +++++++++++++++ templates/tools/dockerfile/ccache_setup.include | 7 ++++ templates/tools/dockerfile/csharp_deps.include | 20 +++++++++ templates/tools/dockerfile/cxx_deps.include | 3 ++ templates/tools/dockerfile/node_deps.include | 7 ++++ templates/tools/dockerfile/php_deps.include | 13 ++++++ templates/tools/dockerfile/python_deps.include | 14 +++++++ templates/tools/dockerfile/ruby_deps.include | 14 +++++++ .../tools/dockerfile/run_tests_addons.include | 10 +++++ .../test/csharp_jessie_x64/Dockerfile.template | 36 ++++++++++++++++ .../test/cxx_jessie_x64/Dockerfile.template | 36 ++++++++++++++++ .../test/cxx_jessie_x86/Dockerfile.template | 36 ++++++++++++++++ .../test/node_jessie_x64/Dockerfile.template | 36 ++++++++++++++++ .../test/php_jessie_x64/Dockerfile.template | 36 ++++++++++++++++ .../test/python_jessie_x64/Dockerfile.template | 36 ++++++++++++++++ .../test/ruby_jessie_x64/Dockerfile.template | 36 ++++++++++++++++ .../dockerfile/test/sanity/Dockerfile.template | 48 ++++++++++++++++++++++ tools/jenkins/build_docker_and_run_tests.sh | 4 +- 18 files changed, 423 insertions(+), 2 deletions(-) create mode 100644 templates/tools/dockerfile/apt_get_basic.include create mode 100644 templates/tools/dockerfile/ccache_setup.include create mode 100644 templates/tools/dockerfile/csharp_deps.include create mode 100644 templates/tools/dockerfile/cxx_deps.include create mode 100644 templates/tools/dockerfile/node_deps.include create mode 100644 templates/tools/dockerfile/php_deps.include create mode 100644 templates/tools/dockerfile/python_deps.include create mode 100644 templates/tools/dockerfile/ruby_deps.include create mode 100644 templates/tools/dockerfile/run_tests_addons.include create mode 100644 templates/tools/dockerfile/test/csharp_jessie_x64/Dockerfile.template create mode 100644 templates/tools/dockerfile/test/cxx_jessie_x64/Dockerfile.template create mode 100644 templates/tools/dockerfile/test/cxx_jessie_x86/Dockerfile.template create mode 100644 templates/tools/dockerfile/test/node_jessie_x64/Dockerfile.template create mode 100644 templates/tools/dockerfile/test/php_jessie_x64/Dockerfile.template create mode 100644 templates/tools/dockerfile/test/python_jessie_x64/Dockerfile.template create mode 100644 templates/tools/dockerfile/test/ruby_jessie_x64/Dockerfile.template create mode 100644 templates/tools/dockerfile/test/sanity/Dockerfile.template (limited to 'templates/tools') diff --git a/templates/tools/dockerfile/apt_get_basic.include b/templates/tools/dockerfile/apt_get_basic.include new file mode 100644 index 0000000000..a938242430 --- /dev/null +++ b/templates/tools/dockerfile/apt_get_basic.include @@ -0,0 +1,33 @@ +# Install Git and basic packages. +RUN apt-get update && apt-get install -y ${'\\'} + autoconf ${'\\'} + autotools-dev ${'\\'} + build-essential ${'\\'} + bzip2 ${'\\'} + ccache ${'\\'} + curl ${'\\'} + gcc ${'\\'} + gcc-multilib ${'\\'} + git ${'\\'} + golang ${'\\'} + gyp ${'\\'} + lcov ${'\\'} + libc6 ${'\\'} + libc6-dbg ${'\\'} + libc6-dev ${'\\'} + libgtest-dev ${'\\'} + libtool ${'\\'} + make ${'\\'} + perl ${'\\'} + strace ${'\\'} + python-dev ${'\\'} + python-setuptools ${'\\'} + python-yaml ${'\\'} + telnet ${'\\'} + unzip ${'\\'} + wget ${'\\'} + zip && apt-get clean + +#================ +# Build profiling +RUN apt-get update && apt-get install -y time && apt-get clean diff --git a/templates/tools/dockerfile/ccache_setup.include b/templates/tools/dockerfile/ccache_setup.include new file mode 100644 index 0000000000..2a2de7fdab --- /dev/null +++ b/templates/tools/dockerfile/ccache_setup.include @@ -0,0 +1,7 @@ +# Prepare ccache +RUN ln -s /usr/bin/ccache /usr/local/bin/gcc +RUN ln -s /usr/bin/ccache /usr/local/bin/g++ +RUN ln -s /usr/bin/ccache /usr/local/bin/cc +RUN ln -s /usr/bin/ccache /usr/local/bin/c++ +RUN ln -s /usr/bin/ccache /usr/local/bin/clang +RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ diff --git a/templates/tools/dockerfile/csharp_deps.include b/templates/tools/dockerfile/csharp_deps.include new file mode 100644 index 0000000000..553eacb523 --- /dev/null +++ b/templates/tools/dockerfile/csharp_deps.include @@ -0,0 +1,20 @@ +#================ +# C# dependencies + +# Update to a newer version of mono +RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF +RUN echo "deb http://download.mono-project.com/repo/debian wheezy main" | tee /etc/apt/sources.list.d/mono-xamarin.list +RUN echo "deb http://download.mono-project.com/repo/debian wheezy-apache24-compat main" | tee -a /etc/apt/sources.list.d/mono-xamarin.list +RUN echo "deb http://download.mono-project.com/repo/debian wheezy-libjpeg62-compat main" | tee -a /etc/apt/sources.list.d/mono-xamarin.list +RUN echo "deb http://download.mono-project.com/repo/debian wheezy-libtiff-compat main" | tee -a /etc/apt/sources.list.d/mono-xamarin.list + +# Install dependencies +RUN apt-get update && apt-get -y dist-upgrade && apt-get install -y ${'\\'} + mono-devel ${'\\'} + nunit ${'\\'} + nunit-console ${'\\'} + monodevelop + +# Download NuGet +RUN cd /var/local && wget www.nuget.org/NuGet.exe +ENV NUGET mono /var/local/NuGet.exe diff --git a/templates/tools/dockerfile/cxx_deps.include b/templates/tools/dockerfile/cxx_deps.include new file mode 100644 index 0000000000..14831c19e8 --- /dev/null +++ b/templates/tools/dockerfile/cxx_deps.include @@ -0,0 +1,3 @@ +#================= +# C++ dependencies +RUN apt-get update && apt-get -y install libgflags-dev libgtest-dev libc++-dev clang && apt-get clean diff --git a/templates/tools/dockerfile/node_deps.include b/templates/tools/dockerfile/node_deps.include new file mode 100644 index 0000000000..7d37d67146 --- /dev/null +++ b/templates/tools/dockerfile/node_deps.include @@ -0,0 +1,7 @@ +#================== +# Node dependencies + +# Install nvm +RUN touch .profile +RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.25.4/install.sh | bash +RUN /bin/bash -l -c "nvm install 0.12 && npm config set cache /tmp/npm-cache" diff --git a/templates/tools/dockerfile/php_deps.include b/templates/tools/dockerfile/php_deps.include new file mode 100644 index 0000000000..739049b5ea --- /dev/null +++ b/templates/tools/dockerfile/php_deps.include @@ -0,0 +1,13 @@ +#================= +# PHP dependencies + +# Install dependencies + +RUN /bin/bash -l -c "echo 'deb http://packages.dotdeb.org wheezy-php55 all' ${'\\'} + >> /etc/apt/sources.list.d/dotdeb.list" +RUN /bin/bash -l -c "echo 'deb-src http://packages.dotdeb.org wheezy-php55 all' ${'\\'} + >> /etc/apt/sources.list.d/dotdeb.list" +RUN wget http://www.dotdeb.org/dotdeb.gpg -O- | apt-key add - + +RUN apt-get update && apt-get install -y ${'\\'} + git php5 php5-dev phpunit unzip diff --git a/templates/tools/dockerfile/python_deps.include b/templates/tools/dockerfile/python_deps.include new file mode 100644 index 0000000000..a559f96394 --- /dev/null +++ b/templates/tools/dockerfile/python_deps.include @@ -0,0 +1,14 @@ +#==================== +# Python dependencies + +# Install dependencies + +RUN apt-get update && apt-get install -y ${'\\'} + python-all-dev ${'\\'} + python3-all-dev ${'\\'} + python-pip + +# Install Python packages from PyPI +RUN pip install pip --upgrade +RUN pip install virtualenv +RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.0.0a2 tox diff --git a/templates/tools/dockerfile/ruby_deps.include b/templates/tools/dockerfile/ruby_deps.include new file mode 100644 index 0000000000..a8ee3ec7dc --- /dev/null +++ b/templates/tools/dockerfile/ruby_deps.include @@ -0,0 +1,14 @@ +#================== +# Ruby dependencies + +# Install rvm +RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 +RUN \curl -sSL https://get.rvm.io | bash -s stable + +# Install Ruby 2.1 +RUN /bin/bash -l -c "rvm install ruby-2.1" +RUN /bin/bash -l -c "rvm use --default ruby-2.1" +RUN /bin/bash -l -c "echo 'gem: --no-ri --no-rdoc' > ~/.gemrc" +RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc" +RUN /bin/bash -l -c "echo 'rvm --default use ruby-2.1' >> ~/.bashrc" +RUN /bin/bash -l -c "gem install bundler --no-ri --no-rdoc" diff --git a/templates/tools/dockerfile/run_tests_addons.include b/templates/tools/dockerfile/run_tests_addons.include new file mode 100644 index 0000000000..78af3f6136 --- /dev/null +++ b/templates/tools/dockerfile/run_tests_addons.include @@ -0,0 +1,10 @@ +<%include file="ccache_setup.include"/> +#====================== +# Zookeeper dependencies +# TODO(jtattermusch): is zookeeper still needed? +RUN apt-get install -y libzookeeper-mt-dev + +RUN mkdir /var/local/jenkins + +# Define the default command. +CMD ["bash"] diff --git a/templates/tools/dockerfile/test/csharp_jessie_x64/Dockerfile.template b/templates/tools/dockerfile/test/csharp_jessie_x64/Dockerfile.template new file mode 100644 index 0000000000..66e23505dd --- /dev/null +++ b/templates/tools/dockerfile/test/csharp_jessie_x64/Dockerfile.template @@ -0,0 +1,36 @@ +%YAML 1.2 +--- | + # Copyright 2015-2016, Google Inc. + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions are + # met: + # + # * Redistributions of source code must retain the above copyright + # notice, this list of conditions and the following disclaimer. + # * Redistributions in binary form must reproduce the above + # copyright notice, this list of conditions and the following disclaimer + # in the documentation and/or other materials provided with the + # distribution. + # * Neither the name of Google Inc. nor the names of its + # contributors may be used to endorse or promote products derived from + # this software without specific prior written permission. + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + FROM debian:jessie + + <%include file="../../apt_get_basic.include"/> + <%include file="../../csharp_deps.include"/> + <%include file="../../run_tests_addons.include"/> diff --git a/templates/tools/dockerfile/test/cxx_jessie_x64/Dockerfile.template b/templates/tools/dockerfile/test/cxx_jessie_x64/Dockerfile.template new file mode 100644 index 0000000000..913dfaaa6f --- /dev/null +++ b/templates/tools/dockerfile/test/cxx_jessie_x64/Dockerfile.template @@ -0,0 +1,36 @@ +%YAML 1.2 +--- | + # Copyright 2015-2016, Google Inc. + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions are + # met: + # + # * Redistributions of source code must retain the above copyright + # notice, this list of conditions and the following disclaimer. + # * Redistributions in binary form must reproduce the above + # copyright notice, this list of conditions and the following disclaimer + # in the documentation and/or other materials provided with the + # distribution. + # * Neither the name of Google Inc. nor the names of its + # contributors may be used to endorse or promote products derived from + # this software without specific prior written permission. + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + FROM debian:jessie + + <%include file="../../apt_get_basic.include"/> + <%include file="../../cxx_deps.include"/> + <%include file="../../run_tests_addons.include"/> diff --git a/templates/tools/dockerfile/test/cxx_jessie_x86/Dockerfile.template b/templates/tools/dockerfile/test/cxx_jessie_x86/Dockerfile.template new file mode 100644 index 0000000000..576e1aaf40 --- /dev/null +++ b/templates/tools/dockerfile/test/cxx_jessie_x86/Dockerfile.template @@ -0,0 +1,36 @@ +%YAML 1.2 +--- | + # Copyright 2015-2016, Google Inc. + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions are + # met: + # + # * Redistributions of source code must retain the above copyright + # notice, this list of conditions and the following disclaimer. + # * Redistributions in binary form must reproduce the above + # copyright notice, this list of conditions and the following disclaimer + # in the documentation and/or other materials provided with the + # distribution. + # * Neither the name of Google Inc. nor the names of its + # contributors may be used to endorse or promote products derived from + # this software without specific prior written permission. + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + FROM 32bit/debian:jessie + + <%include file="../../apt_get_basic.include"/> + <%include file="../../cxx_deps.include"/> + <%include file="../../run_tests_addons.include"/> diff --git a/templates/tools/dockerfile/test/node_jessie_x64/Dockerfile.template b/templates/tools/dockerfile/test/node_jessie_x64/Dockerfile.template new file mode 100644 index 0000000000..b5c2ca95d3 --- /dev/null +++ b/templates/tools/dockerfile/test/node_jessie_x64/Dockerfile.template @@ -0,0 +1,36 @@ +%YAML 1.2 +--- | + # Copyright 2015-2016, Google Inc. + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions are + # met: + # + # * Redistributions of source code must retain the above copyright + # notice, this list of conditions and the following disclaimer. + # * Redistributions in binary form must reproduce the above + # copyright notice, this list of conditions and the following disclaimer + # in the documentation and/or other materials provided with the + # distribution. + # * Neither the name of Google Inc. nor the names of its + # contributors may be used to endorse or promote products derived from + # this software without specific prior written permission. + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + FROM debian:jessie + + <%include file="../../apt_get_basic.include"/> + <%include file="../../node_deps.include"/> + <%include file="../../run_tests_addons.include"/> diff --git a/templates/tools/dockerfile/test/php_jessie_x64/Dockerfile.template b/templates/tools/dockerfile/test/php_jessie_x64/Dockerfile.template new file mode 100644 index 0000000000..9e08b37c38 --- /dev/null +++ b/templates/tools/dockerfile/test/php_jessie_x64/Dockerfile.template @@ -0,0 +1,36 @@ +%YAML 1.2 +--- | + # Copyright 2015-2016, Google Inc. + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions are + # met: + # + # * Redistributions of source code must retain the above copyright + # notice, this list of conditions and the following disclaimer. + # * Redistributions in binary form must reproduce the above + # copyright notice, this list of conditions and the following disclaimer + # in the documentation and/or other materials provided with the + # distribution. + # * Neither the name of Google Inc. nor the names of its + # contributors may be used to endorse or promote products derived from + # this software without specific prior written permission. + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + FROM debian:jessie + + <%include file="../../apt_get_basic.include"/> + <%include file="../../php_deps.include"/> + <%include file="../../run_tests_addons.include"/> diff --git a/templates/tools/dockerfile/test/python_jessie_x64/Dockerfile.template b/templates/tools/dockerfile/test/python_jessie_x64/Dockerfile.template new file mode 100644 index 0000000000..a353a19ba9 --- /dev/null +++ b/templates/tools/dockerfile/test/python_jessie_x64/Dockerfile.template @@ -0,0 +1,36 @@ +%YAML 1.2 +--- | + # Copyright 2015-2016, Google Inc. + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions are + # met: + # + # * Redistributions of source code must retain the above copyright + # notice, this list of conditions and the following disclaimer. + # * Redistributions in binary form must reproduce the above + # copyright notice, this list of conditions and the following disclaimer + # in the documentation and/or other materials provided with the + # distribution. + # * Neither the name of Google Inc. nor the names of its + # contributors may be used to endorse or promote products derived from + # this software without specific prior written permission. + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + FROM debian:jessie + + <%include file="../../apt_get_basic.include"/> + <%include file="../../python_deps.include"/> + <%include file="../../run_tests_addons.include"/> diff --git a/templates/tools/dockerfile/test/ruby_jessie_x64/Dockerfile.template b/templates/tools/dockerfile/test/ruby_jessie_x64/Dockerfile.template new file mode 100644 index 0000000000..1cc4a1078a --- /dev/null +++ b/templates/tools/dockerfile/test/ruby_jessie_x64/Dockerfile.template @@ -0,0 +1,36 @@ +%YAML 1.2 +--- | + # Copyright 2015-2016, Google Inc. + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions are + # met: + # + # * Redistributions of source code must retain the above copyright + # notice, this list of conditions and the following disclaimer. + # * Redistributions in binary form must reproduce the above + # copyright notice, this list of conditions and the following disclaimer + # in the documentation and/or other materials provided with the + # distribution. + # * Neither the name of Google Inc. nor the names of its + # contributors may be used to endorse or promote products derived from + # this software without specific prior written permission. + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + FROM debian:jessie + + <%include file="../../apt_get_basic.include"/> + <%include file="../../ruby_deps.include"/> + <%include file="../../run_tests_addons.include"/> diff --git a/templates/tools/dockerfile/test/sanity/Dockerfile.template b/templates/tools/dockerfile/test/sanity/Dockerfile.template new file mode 100644 index 0000000000..05b2f7be64 --- /dev/null +++ b/templates/tools/dockerfile/test/sanity/Dockerfile.template @@ -0,0 +1,48 @@ +%YAML 1.2 +--- | + # Copyright 2015-2016, Google Inc. + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions are + # met: + # + # * Redistributions of source code must retain the above copyright + # notice, this list of conditions and the following disclaimer. + # * Redistributions in binary form must reproduce the above + # copyright notice, this list of conditions and the following disclaimer + # in the documentation and/or other materials provided with the + # distribution. + # * Neither the name of Google Inc. nor the names of its + # contributors may be used to endorse or promote products derived from + # this software without specific prior written permission. + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + FROM debian:jessie + + <%include file="../../apt_get_basic.include"/> + <%include file="../../cxx_deps.include"/> + #======================== + # Sanity test dependencies + RUN apt-get update && apt-get install -y python-pip + RUN pip install simplejson mako + + #=================== + # Docker "inception" + # Note this is quite the ugly hack. + # This makes sure that the docker binary we inject has its dependencies. + RUN curl https://get.docker.com/ | sh + RUN apt-get remove --purge -y docker-engine + + <%include file="../../run_tests_addons.include"/> diff --git a/tools/jenkins/build_docker_and_run_tests.sh b/tools/jenkins/build_docker_and_run_tests.sh index 58163bb583..e2ac7518f0 100755 --- a/tools/jenkins/build_docker_and_run_tests.sh +++ b/tools/jenkins/build_docker_and_run_tests.sh @@ -33,8 +33,8 @@ set -ex -cd `dirname $0`/../.. -git_root=`pwd` +cd $(dirname $0)/../.. +git_root=$(pwd) cd - # Ensure existence of ccache directory -- cgit v1.2.3 From ebeb86c0e90335bf019f3416306fe92c80c92524 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 8 Feb 2016 11:38:24 -0800 Subject: remove trailing whitespaces --- templates/tools/dockerfile/apt_get_basic.include | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'templates/tools') diff --git a/templates/tools/dockerfile/apt_get_basic.include b/templates/tools/dockerfile/apt_get_basic.include index a938242430..9237e7dace 100644 --- a/templates/tools/dockerfile/apt_get_basic.include +++ b/templates/tools/dockerfile/apt_get_basic.include @@ -1,13 +1,13 @@ # Install Git and basic packages. RUN apt-get update && apt-get install -y ${'\\'} autoconf ${'\\'} - autotools-dev ${'\\'} + autotools-dev ${'\\'} build-essential ${'\\'} bzip2 ${'\\'} ccache ${'\\'} curl ${'\\'} gcc ${'\\'} - gcc-multilib ${'\\'} + gcc-multilib ${'\\'} git ${'\\'} golang ${'\\'} gyp ${'\\'} @@ -21,7 +21,7 @@ RUN apt-get update && apt-get install -y ${'\\'} perl ${'\\'} strace ${'\\'} python-dev ${'\\'} - python-setuptools ${'\\'} + python-setuptools ${'\\'} python-yaml ${'\\'} telnet ${'\\'} unzip ${'\\'} -- cgit v1.2.3 From 80043e988ff53e683a4f08bc038edd999e776a9b Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 8 Feb 2016 11:44:07 -0800 Subject: polish C# dependencies --- templates/tools/dockerfile/csharp_deps.include | 10 +++------- tools/run_tests/pre_build_csharp.sh | 5 ----- 2 files changed, 3 insertions(+), 12 deletions(-) (limited to 'templates/tools') diff --git a/templates/tools/dockerfile/csharp_deps.include b/templates/tools/dockerfile/csharp_deps.include index 553eacb523..489dc44a43 100644 --- a/templates/tools/dockerfile/csharp_deps.include +++ b/templates/tools/dockerfile/csharp_deps.include @@ -11,10 +11,6 @@ RUN echo "deb http://download.mono-project.com/repo/debian wheezy-libtiff-compat # Install dependencies RUN apt-get update && apt-get -y dist-upgrade && apt-get install -y ${'\\'} mono-devel ${'\\'} - nunit ${'\\'} - nunit-console ${'\\'} - monodevelop - -# Download NuGet -RUN cd /var/local && wget www.nuget.org/NuGet.exe -ENV NUGET mono /var/local/NuGet.exe + ca-certificates-mono ${'\\'} + nuget ${'\\'} + && apt-get clean diff --git a/tools/run_tests/pre_build_csharp.sh b/tools/run_tests/pre_build_csharp.sh index 4341c0256f..32466c2177 100755 --- a/tools/run_tests/pre_build_csharp.sh +++ b/tools/run_tests/pre_build_csharp.sh @@ -39,8 +39,3 @@ if [ -x "$(command -v nuget)" ] then nuget restore Grpc.sln fi - -if [ -n "$NUGET" ] -then - $NUGET restore Grpc.sln -fi -- cgit v1.2.3 From 8763501cf0d280002b9d30caf43c4ccf3db32fd9 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 8 Feb 2016 12:26:28 -0800 Subject: cleanup sanity docker image --- .../tools/dockerfile/test/sanity/Dockerfile.template | 8 +++++--- tools/dockerfile/test/sanity/Dockerfile | 18 ------------------ 2 files changed, 5 insertions(+), 21 deletions(-) (limited to 'templates/tools') diff --git a/templates/tools/dockerfile/test/sanity/Dockerfile.template b/templates/tools/dockerfile/test/sanity/Dockerfile.template index 05b2f7be64..b9982b0b0f 100644 --- a/templates/tools/dockerfile/test/sanity/Dockerfile.template +++ b/templates/tools/dockerfile/test/sanity/Dockerfile.template @@ -32,7 +32,6 @@ FROM debian:jessie <%include file="../../apt_get_basic.include"/> - <%include file="../../cxx_deps.include"/> #======================== # Sanity test dependencies RUN apt-get update && apt-get install -y python-pip @@ -44,5 +43,8 @@ # This makes sure that the docker binary we inject has its dependencies. RUN curl https://get.docker.com/ | sh RUN apt-get remove --purge -y docker-engine - - <%include file="../../run_tests_addons.include"/> + + RUN mkdir /var/local/jenkins + + # Define the default command. + CMD ["bash"] diff --git a/tools/dockerfile/test/sanity/Dockerfile b/tools/dockerfile/test/sanity/Dockerfile index 317ad3217e..51ee49b448 100644 --- a/tools/dockerfile/test/sanity/Dockerfile +++ b/tools/dockerfile/test/sanity/Dockerfile @@ -63,10 +63,6 @@ RUN apt-get update && apt-get install -y \ # Build profiling RUN apt-get update && apt-get install -y time && apt-get clean -#================= -# C++ dependencies -RUN apt-get update && apt-get -y install libgflags-dev libgtest-dev libc++-dev clang && apt-get clean - #======================== # Sanity test dependencies RUN apt-get update && apt-get install -y python-pip @@ -79,21 +75,7 @@ RUN pip install simplejson mako RUN curl https://get.docker.com/ | sh RUN apt-get remove --purge -y docker-engine -# Prepare ccache -RUN ln -s /usr/bin/ccache /usr/local/bin/gcc -RUN ln -s /usr/bin/ccache /usr/local/bin/g++ -RUN ln -s /usr/bin/ccache /usr/local/bin/cc -RUN ln -s /usr/bin/ccache /usr/local/bin/c++ -RUN ln -s /usr/bin/ccache /usr/local/bin/clang -RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ - -#====================== -# Zookeeper dependencies -# TODO(jtattermusch): is zookeeper still needed? -RUN apt-get install -y libzookeeper-mt-dev - RUN mkdir /var/local/jenkins # Define the default command. CMD ["bash"] - -- cgit v1.2.3 From 9b721f8711df29b1654899973709fe70a5b025ff Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 8 Feb 2016 16:55:07 -0800 Subject: addressing comments --- templates/tools/dockerfile/run_tests_addons.include | 3 --- templates/tools/dockerfile/test/csharp_jessie_x64/Dockerfile.template | 3 +++ templates/tools/dockerfile/test/cxx_jessie_x64/Dockerfile.template | 3 +++ templates/tools/dockerfile/test/cxx_jessie_x86/Dockerfile.template | 3 +++ templates/tools/dockerfile/test/node_jessie_x64/Dockerfile.template | 3 +++ templates/tools/dockerfile/test/php_jessie_x64/Dockerfile.template | 3 +++ templates/tools/dockerfile/test/python_jessie_x64/Dockerfile.template | 3 +++ templates/tools/dockerfile/test/ruby_jessie_x64/Dockerfile.template | 3 +++ templates/tools/dockerfile/test/sanity/Dockerfile.template | 1 + tools/dockerfile/test/csharp_jessie_x64/Dockerfile | 1 - tools/dockerfile/test/cxx_jessie_x64/Dockerfile | 1 - tools/dockerfile/test/cxx_jessie_x86/Dockerfile | 1 - tools/dockerfile/test/node_jessie_x64/Dockerfile | 1 - tools/dockerfile/test/php_jessie_x64/Dockerfile | 1 - tools/dockerfile/test/python_jessie_x64/Dockerfile | 1 - tools/dockerfile/test/ruby_jessie_x64/Dockerfile | 1 - 16 files changed, 22 insertions(+), 10 deletions(-) (limited to 'templates/tools') diff --git a/templates/tools/dockerfile/run_tests_addons.include b/templates/tools/dockerfile/run_tests_addons.include index 78af3f6136..27ac67f5d8 100644 --- a/templates/tools/dockerfile/run_tests_addons.include +++ b/templates/tools/dockerfile/run_tests_addons.include @@ -5,6 +5,3 @@ RUN apt-get install -y libzookeeper-mt-dev RUN mkdir /var/local/jenkins - -# Define the default command. -CMD ["bash"] diff --git a/templates/tools/dockerfile/test/csharp_jessie_x64/Dockerfile.template b/templates/tools/dockerfile/test/csharp_jessie_x64/Dockerfile.template index 66e23505dd..1c01deac3d 100644 --- a/templates/tools/dockerfile/test/csharp_jessie_x64/Dockerfile.template +++ b/templates/tools/dockerfile/test/csharp_jessie_x64/Dockerfile.template @@ -34,3 +34,6 @@ <%include file="../../apt_get_basic.include"/> <%include file="../../csharp_deps.include"/> <%include file="../../run_tests_addons.include"/> + # Define the default command. + CMD ["bash"] + diff --git a/templates/tools/dockerfile/test/cxx_jessie_x64/Dockerfile.template b/templates/tools/dockerfile/test/cxx_jessie_x64/Dockerfile.template index 913dfaaa6f..842c534805 100644 --- a/templates/tools/dockerfile/test/cxx_jessie_x64/Dockerfile.template +++ b/templates/tools/dockerfile/test/cxx_jessie_x64/Dockerfile.template @@ -34,3 +34,6 @@ <%include file="../../apt_get_basic.include"/> <%include file="../../cxx_deps.include"/> <%include file="../../run_tests_addons.include"/> + # Define the default command. + CMD ["bash"] + \ No newline at end of file diff --git a/templates/tools/dockerfile/test/cxx_jessie_x86/Dockerfile.template b/templates/tools/dockerfile/test/cxx_jessie_x86/Dockerfile.template index 576e1aaf40..4e95cdd65e 100644 --- a/templates/tools/dockerfile/test/cxx_jessie_x86/Dockerfile.template +++ b/templates/tools/dockerfile/test/cxx_jessie_x86/Dockerfile.template @@ -34,3 +34,6 @@ <%include file="../../apt_get_basic.include"/> <%include file="../../cxx_deps.include"/> <%include file="../../run_tests_addons.include"/> + # Define the default command. + CMD ["bash"] + \ No newline at end of file diff --git a/templates/tools/dockerfile/test/node_jessie_x64/Dockerfile.template b/templates/tools/dockerfile/test/node_jessie_x64/Dockerfile.template index b5c2ca95d3..10551a574e 100644 --- a/templates/tools/dockerfile/test/node_jessie_x64/Dockerfile.template +++ b/templates/tools/dockerfile/test/node_jessie_x64/Dockerfile.template @@ -34,3 +34,6 @@ <%include file="../../apt_get_basic.include"/> <%include file="../../node_deps.include"/> <%include file="../../run_tests_addons.include"/> + # Define the default command. + CMD ["bash"] + \ No newline at end of file diff --git a/templates/tools/dockerfile/test/php_jessie_x64/Dockerfile.template b/templates/tools/dockerfile/test/php_jessie_x64/Dockerfile.template index 9e08b37c38..d7172398a9 100644 --- a/templates/tools/dockerfile/test/php_jessie_x64/Dockerfile.template +++ b/templates/tools/dockerfile/test/php_jessie_x64/Dockerfile.template @@ -34,3 +34,6 @@ <%include file="../../apt_get_basic.include"/> <%include file="../../php_deps.include"/> <%include file="../../run_tests_addons.include"/> + # Define the default command. + CMD ["bash"] + \ No newline at end of file diff --git a/templates/tools/dockerfile/test/python_jessie_x64/Dockerfile.template b/templates/tools/dockerfile/test/python_jessie_x64/Dockerfile.template index a353a19ba9..9e68b3ef91 100644 --- a/templates/tools/dockerfile/test/python_jessie_x64/Dockerfile.template +++ b/templates/tools/dockerfile/test/python_jessie_x64/Dockerfile.template @@ -34,3 +34,6 @@ <%include file="../../apt_get_basic.include"/> <%include file="../../python_deps.include"/> <%include file="../../run_tests_addons.include"/> + # Define the default command. + CMD ["bash"] + \ No newline at end of file diff --git a/templates/tools/dockerfile/test/ruby_jessie_x64/Dockerfile.template b/templates/tools/dockerfile/test/ruby_jessie_x64/Dockerfile.template index 1cc4a1078a..db777bebb4 100644 --- a/templates/tools/dockerfile/test/ruby_jessie_x64/Dockerfile.template +++ b/templates/tools/dockerfile/test/ruby_jessie_x64/Dockerfile.template @@ -34,3 +34,6 @@ <%include file="../../apt_get_basic.include"/> <%include file="../../ruby_deps.include"/> <%include file="../../run_tests_addons.include"/> + # Define the default command. + CMD ["bash"] + \ No newline at end of file diff --git a/templates/tools/dockerfile/test/sanity/Dockerfile.template b/templates/tools/dockerfile/test/sanity/Dockerfile.template index b9982b0b0f..bbdb848599 100644 --- a/templates/tools/dockerfile/test/sanity/Dockerfile.template +++ b/templates/tools/dockerfile/test/sanity/Dockerfile.template @@ -48,3 +48,4 @@ # Define the default command. CMD ["bash"] + diff --git a/tools/dockerfile/test/csharp_jessie_x64/Dockerfile b/tools/dockerfile/test/csharp_jessie_x64/Dockerfile index 84cdc84658..0052de6130 100644 --- a/tools/dockerfile/test/csharp_jessie_x64/Dockerfile +++ b/tools/dockerfile/test/csharp_jessie_x64/Dockerfile @@ -97,4 +97,3 @@ RUN mkdir /var/local/jenkins # Define the default command. CMD ["bash"] - diff --git a/tools/dockerfile/test/cxx_jessie_x64/Dockerfile b/tools/dockerfile/test/cxx_jessie_x64/Dockerfile index 2e2b341c68..e3ed39dfe6 100644 --- a/tools/dockerfile/test/cxx_jessie_x64/Dockerfile +++ b/tools/dockerfile/test/cxx_jessie_x64/Dockerfile @@ -84,4 +84,3 @@ RUN mkdir /var/local/jenkins # Define the default command. CMD ["bash"] - diff --git a/tools/dockerfile/test/cxx_jessie_x86/Dockerfile b/tools/dockerfile/test/cxx_jessie_x86/Dockerfile index 39e125db7a..9a8f2b1cca 100644 --- a/tools/dockerfile/test/cxx_jessie_x86/Dockerfile +++ b/tools/dockerfile/test/cxx_jessie_x86/Dockerfile @@ -84,4 +84,3 @@ RUN mkdir /var/local/jenkins # Define the default command. CMD ["bash"] - diff --git a/tools/dockerfile/test/node_jessie_x64/Dockerfile b/tools/dockerfile/test/node_jessie_x64/Dockerfile index 9e25486f98..0655bf7179 100644 --- a/tools/dockerfile/test/node_jessie_x64/Dockerfile +++ b/tools/dockerfile/test/node_jessie_x64/Dockerfile @@ -88,4 +88,3 @@ RUN mkdir /var/local/jenkins # Define the default command. CMD ["bash"] - diff --git a/tools/dockerfile/test/php_jessie_x64/Dockerfile b/tools/dockerfile/test/php_jessie_x64/Dockerfile index f840837ff9..43081e7d38 100644 --- a/tools/dockerfile/test/php_jessie_x64/Dockerfile +++ b/tools/dockerfile/test/php_jessie_x64/Dockerfile @@ -94,4 +94,3 @@ RUN mkdir /var/local/jenkins # Define the default command. CMD ["bash"] - diff --git a/tools/dockerfile/test/python_jessie_x64/Dockerfile b/tools/dockerfile/test/python_jessie_x64/Dockerfile index 2628d388f8..7ed8b4c085 100644 --- a/tools/dockerfile/test/python_jessie_x64/Dockerfile +++ b/tools/dockerfile/test/python_jessie_x64/Dockerfile @@ -95,4 +95,3 @@ RUN mkdir /var/local/jenkins # Define the default command. CMD ["bash"] - diff --git a/tools/dockerfile/test/ruby_jessie_x64/Dockerfile b/tools/dockerfile/test/ruby_jessie_x64/Dockerfile index 8cf03f58ce..91af772d72 100644 --- a/tools/dockerfile/test/ruby_jessie_x64/Dockerfile +++ b/tools/dockerfile/test/ruby_jessie_x64/Dockerfile @@ -95,4 +95,3 @@ RUN mkdir /var/local/jenkins # Define the default command. CMD ["bash"] - -- cgit v1.2.3