Commit graph

194 commits

Author SHA1 Message Date
Arnaud Porterie
78578125ce Add suffix to experimental builds version
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2015-05-21 16:27:42 -07:00
Arnaud Porterie
ca6722f1c5 Add DOCKER_EXPERIMENTAL environment variable
The DOCKER_EXPERIMENTAL environment variable drives the activation of
the 'experimental' build tag.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2015-05-20 12:21:17 -07:00
Jessie Frazelle
74bfa36753 Merge pull request #12165 from icecrime/optional_userland_proxy
Optional userland proxy
2015-05-07 14:01:16 -07:00
Arnaud Porterie
44de5fecce Add DOCKER_USERLANDPROXY test variable
Add an convenient way to switch --userland-proxy on and off in
integration tests.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2015-05-04 16:07:51 -07:00
Vincent Batts
56c9917815 Merge pull request #12190 from rhvgoyal/deferred-removal
Devicemapper: Provide deferred device removal capability
2015-05-04 14:22:52 -07:00
moxiegirl
7e7b6a20bd Merge pull request #12901 from hqhq/hq_fix_test_comment
fix comments for test certain tests
2015-04-30 17:08:23 -07:00
Qiang Huang
987e221607 fix comments for test certain tests
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-04-30 15:40:48 +08:00
Antonio Murdaca
f7e417ea5e Remove integration tests and port them to integration-cli
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-04-30 01:35:16 +02:00
Doug Davis
ecccfa82aa Validate we're not using the old testing stuff
Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-04-23 10:29:47 -07:00
Vivek Goyal
b3e29926ce make.sh: Define a new build tag libdm_no_deferred_remove
libdm started offering deferred remove functionality from version
1.02.89. As docker still builds against older libdm, define a tag
libdm_no_deferred_remove to determine whether we are compiling
against new libdm or older one and enable/disable deferred remove
functionality accordingly.

Signed-off-by: Vincent Batts <vbatts@redhat.com>
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
2015-04-21 18:14:59 -04:00
Jörg Thalheim
6533cb973f hack/make/test-integration-cli: introduce MAKEDIR variable
- every execution of dirname costs time
- less repeating

Signed-off-by: Jörg Thalheim <joerg@higgsboson.tk>
2015-04-15 10:44:14 +02:00
Jörg Thalheim
4d53a19528 hack: useless use of cat
Signed-off-by: Jörg Thalheim <joerg@higgsboson.tk>
2015-04-15 10:14:14 +02:00
Jörg Thalheim
ac20568b0a hack: quote all parameters with variable interpolation
better safe then sorry. especially for rm

Signed-off-by: Jörg Thalheim <joerg@higgsboson.tk>
2015-04-15 10:14:14 +02:00
Jörg Thalheim
23afce5f7f hack/make.sh: use SCRIPTDIR wherever possible
Signed-off-by: Jörg Thalheim <joerg@higgsboson.tk>
2015-04-15 10:14:14 +02:00
Jörg Thalheim
6f812a4ec1 hack/make.sh: use bash internal $PWD
Signed-off-by: Jörg Thalheim <joerg@higgsboson.tk>
2015-04-15 10:14:14 +02:00
bobby abbott
3280ce651b Adds validate-vet script
resolves #11970

Signed-off-by: bobby abbott <ttobbaybbob@gmail.com>
2015-04-13 12:48:05 -07:00
Evan Hazlett
3509132a6e Merge pull request #12301 from ewindisch/https_links
Use HTTPS links for URLs in READMEs / comments / docs
2015-04-13 14:30:53 -04:00
Jessie Frazelle
85f1410a5a Merge pull request #12049 from tianon/bundles-latest
Add "bundles/latest" symlink
2015-04-13 11:11:38 -07:00
Tianon Gravi
d42753485b Add "bundles/latest" symlink
This is a symlink to the latest "bundle" that was assembled.  For example, if `VERSION` is currently `1.5.0-dev`, then `bundles/latest` will be a symlink to `bundles/1.5.0-dev` after an attempted build.

One interesting property of this is that after a successful `binary` build, we can `./bundles/latest/binary/docker -v` and get back something like `Docker version 1.5.0-dev, build 3ff6723-dirty`.

Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
2015-04-13 10:54:17 -06:00
Eric Windisch
723d43387a HTTPS urls for ./hacking
Signed-off-by: Eric Windisch <eric@windisch.us>
2015-04-11 13:22:16 -04:00
Tianon Gravi
3761955e8c Change the btrfs_noversion check to be automatic
Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
2015-04-03 01:30:12 -06:00
Tibor Vass
0252ad0adc Revert "Dealing with trailing whitespaces"
The validation script from #10681 is too pedantic, and does not handle
well situations like:

```
cat <<EOF   # or <<-EOF
	Whether the leading whitespace is stripped out or not by bash
	it should still be considered as valid.
EOF
```

This reverts commit 4e65c1c319.

Signed-off-by: Tibor Vass <tibor@docker.com>
2015-03-25 10:04:56 -06:00
Arnaud Porterie
322095ed63 Merge pull request #10681 from noironetworks/whitespaces-cleaner
Removed all trailing whitespaces from every text file
2015-03-24 16:02:14 -07:00
Vincent Batts
3a939d9987 make.sh: leave around the generated version
For positerity (largely of packagers) lets leave around the generated
version files that happen during build.
They're already ignored in git, and recreated on every build.

Signed-off-by: Vincent Batts <vbatts@redhat.com>
2015-03-23 14:46:44 -04:00
André Martins
4e65c1c319 Dealing with trailing whitespaces
Created a validation that detects all trailing whitespaces from every
text file that isn't *.go, *.md, vendor/*,
docs/theme/mkdocs/tipuesearch*

Removed trailing whitespaces from every text file except from vendor/*
builder/parser/testfiles*, docs/theme/mkdocs/tipuesearch* and *.md

Signed-off-by: André Martins <martins@noironetworks.com>
2015-03-17 03:34:01 +00:00
Tianon Gravi
949a21b55f Move scripts back to hack/, leave docs in project/
This also removes the now-defunct `*maintainer*.sh` scripts that don't work with the new TOML format, and moves a couple not-build-or-release-related scripts to `contrib/` instead.

Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
2015-03-13 14:04:08 -06:00
Solomon Hykes
32e61b8f5c Move 'hack' to the less confusing 'project'
We might want to break it up into smaller pieces (eg. tools in one
place, documents in another) but let's worry about that later.

Signed-off-by: Solomon Hykes <solomon@docker.com>
2014-11-09 21:50:28 +00:00
Jessica Frazelle
ec1420cc2b Revert "use code generation for GITCOMMIT/VERSION too"
This reverts commit 85744a35de.

Conflicts:
	.gitignore
	hack/make.sh

Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2014-10-28 16:27:23 -07:00
Jessica Frazelle
17e0a15386 Revert "Use code generation to set IAMSTATIC instead of -X"
This reverts commit 3e10b93106.

Conflicts:
	.gitignore
	hack/make.sh
	hack/make/dynbinary

Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2014-10-28 16:25:50 -07:00
Michael Hudson-Doyle
c7c620dd9f finally, use code generation for INITSHA1 & INITPATH too
Signed-off-by: Michael Hudson-Doyle <michael.hudson@linaro.org>
2014-10-24 11:01:19 +13:00
Michael Hudson-Doyle
85744a35de use code generation for GITCOMMIT/VERSION too
Signed-off-by: Michael Hudson-Doyle <michael.hudson@linaro.org>
2014-10-24 10:58:39 +13:00
Michael Hudson-Doyle
3e10b93106 Use code generation to set IAMSTATIC instead of -X
Signed-off-by: Michael Hudson-Doyle <michael.hudson@linaro.org>
2014-10-24 10:56:51 +13:00
Tianon Gravi
8ffdf6022e Move the body of go_compile_test_dir into a file since GNU Parallel breaks on sourcing exported Bash functions thanks to the shellshock fixes
Signed-off-by: Andrew Page <admwiggin@gmail.com>
2014-09-28 21:51:44 -06:00
Erik Hollensbe
aa129b356f hack: TIMEOUT (for controlling test timeout) and forwarding of
BUILDFLAGS to binary/dynbinary.

Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
2014-09-25 14:25:43 -07:00
Tibor Vass
054b921a2c Add Daemon test utils
Docker-DCO-1.1-Signed-off-by: Tibor Vass <teabee89@gmail.com> (github: tiborvass)
2014-09-02 10:58:36 -07:00
Tianon Gravi
1b95590d06 Add a "daemon" build tag and toggle it with the already-existing "DOCKER_CLIENTONLY" build variable
This works mostly by refactoring our "main" package to be careful about what it imports based on the daemon build tag. :)

Also, I've updated Travis to test "client-only" compilation after it tests the daemon version.

Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-08-04 15:05:12 -06:00
Tianon Gravi
3a14eb066c Fix more instances of "dotcloud/docker" in hack/ (and add a DOCKER_PKG environment variable to simplify references to our "package path" in our bundlescripts)
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-07-30 17:02:04 -06:00
Tibor Vass
4cfe806db2 Kill all concurrent jobs on error
Docker-DCO-1.1-Signed-off-by: Tibor Vass <teabee89@gmail.com> (github: tiborvass)
2014-07-26 13:45:35 -04:00
Tianon Gravi
a6085fd430 Add a bunch more tweaks to the parallel test compilation
- put all the precompiled test binaries in $DEST so they show up in bundles and can be re-run individually afterwards
- support cases where parallel is not installed (when using dyntest-unit, for example, this is much more common, since it's designed to be run outside the Dockerfile)
- use "mktemp -d" instead of "/tmp" directly for our temporary parallel HOME
- update the default PARALLEL_JOBS to be the value of "nproc" instead of 0, since "0 means as many as possible" (see https://www.gnu.org/software/parallel/man.html#jobs_n)

Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-07-26 11:46:36 -04:00
Tibor Vass
3a1385702c benign whitespace change
Docker-DCO-1.1-Signed-off-by: Tibor Vass <teabee89@gmail.com> (github: tiborvass)
2014-07-26 11:46:36 -04:00
Tibor Vass
158e3068bd compile unit tests in parallel with GNU parallel
Docker-DCO-1.1-Signed-off-by: Tibor Vass <teabee89@gmail.com> (github: tiborvass)
2014-07-26 11:46:36 -04:00
Victor Vieux
b3ee9ac74e update go import path and libcontainer
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
2014-07-24 22:19:50 +00:00
Tianon Gravi
986a151b8a Fix dyntest and rename it to dyntest-unit to match the test-unit rename
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-06-19 15:06:34 -06:00
Michael Crosby
3986bc659b Don't compile nsinit
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-06-05 17:03:32 -07:00
Robin Speekenbrink
a0505edc9a updated documentation for mentioning images vs containers
Docker-DCO-1.1-Signed-off-by: Robin Speekenbrink <robin@kingsquare.nl> (github: fruitl00p)

rebased by

Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
2014-05-29 11:20:41 +10:00
Victor Marmol
a39f3c9200 Add new test-unit make rule which only runs the unit tests. Renames test
bundle to test-unit.

Docker-DCO-1.1-Signed-off-by: Victor Marmol <vmarmol@google.com> (github: vmarmol)
2014-04-29 23:26:27 +00:00
Kato Kazuyoshi
92ea101bc4 SQLite is also available in FreeBSD
Docker-DCO-1.1-Signed-off-by: Kato Kazuyoshi <kato.kazuyoshi@gmail.com> (github: kzys)
2014-04-17 07:19:30 +09:00
Kato Kazuyoshi
66baf56601 Unlike GNU find, FreeBSD's find needs a path before an expression
Docker-DCO-1.1-Signed-off-by: Kato Kazuyoshi <kato.kazuyoshi@gmail.com> (github: kzys)
2014-04-10 07:13:41 +09:00
Kato Kazuyoshi
18bea2495d Use LLVM Clang explicitly on FreeBSD
Docker-DCO-1.1-Signed-off-by: Kato Kazuyoshi <kato.kazuyoshi@gmail.com> (github: kzys)
2014-04-10 07:13:41 +09:00
Tianon Gravi
81370b5b0f Add new validate-dco and validate-gofmt bundlescripts for DCO and gofmt validation
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-04-04 00:41:33 -06:00
Tianon Gravi
2543912e7b Add "test-integration-cli" to our DEFAULT_BUNDLES list (make all)
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-03-31 11:55:55 -06:00
unclejack
6db32fdefd initial version of cli integration tests
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-03-29 23:09:40 +02:00
Alexander Larsson
d4725801b3 Vendor github.com/godbus/dbus and github.com/coreos/go-systemd
We need this to do systemd API calls.

We also add the static_build tag to make godbus not use
os/user which is problematic for static builds.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
2014-03-27 22:44:26 +01:00
Tianon Gravi
6b46a09186 Fix a lot of the sha256 and md5 stuff to be more DRY and extendible, and on more things (specifically, the tgz files too)
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-03-19 22:25:09 -06:00
Tianon Gravi
99b6364790 Exclude more "definitely not unit tested Go source code" directories from hack/make/test
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-03-12 01:18:12 -06:00
Tianon Gravi
e1c48fa560 Clean up the "go test" output from "make test" to be much more readable/scannable
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-03-12 01:17:38 -06:00
Tianon Gravi
be344cf0d8 Fix dynbinary so that dockerinit can still be properly static even if it has to link against libapparmor for Ubuntu
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-03-06 19:55:22 -07:00
Tianon Gravi
0b23393ba1 Update build tags such that we can properly compile on all platforms (especially for packagers), and updated hack/PACKAGERS.md to mention the DOCKER_BUILDTAGS variable that will need to be set for binaries that might be used on AppArmor (such as Debian and especially Ubuntu)
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-03-06 13:39:17 -07:00
Guillaume J. Charmes
c89fa6645e
Add buildflags to allow crosscompilation for apparmor
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume.charmes@docker.com> (github: creack)
2014-03-06 12:05:03 -08:00
Fabio Falci
b3d5e9527a Package coverage when running integration tests
If coverpkg is missing on `go test` command, only the current package
will be covered. That's the case of unit tests. For integration tests
we need to explicitly declare each package.

Docker-DCO-1.1-Signed-off-by: Fabio Falci <fabiofalci@gmail.com> (github: fabiofalci)
2014-02-19 16:59:51 +00:00
Tianon Gravi
f794fbc230 Merge pull request #4043 from tianon/hack-git-detection-and-use
Add better ".git" detection and use
2014-02-13 09:56:14 -07:00
Tianon Gravi
7ea725fdc5 Fix the one spot I missed dockerversion
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-02-11 18:23:17 -07:00
Solomon Hykes
ae3c7dec3b Move docker version introspection to a sub-package.
This facilitates the refactoring of commands.go.

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-02-11 16:10:51 -08:00
Tianon Gravi
0a0406450f Add better ".git" detection and use
This way, packagers can set GIT_DIR appropriately if they'd prefer to not have ".git" inside their working directory.

Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-02-10 13:48:43 -07:00
Tianon Gravi
d3d85d38fb Add slightly better GOPATH detection/handling
This also adds a new "AUTO_GOPATH" environment variable that will create an appropriate GOPATH as part of the build process.

Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-02-09 18:21:01 -07:00
Tianon Gravi
b994c13159 Update hack/make.sh with slightly clearer output and a more precise "are we in the Docker container?" check
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-01-26 13:24:03 -07:00
Kim BKC Carlbacker
b1953baba2 This should make all bash-scripts run on pretty much any posix-system (with bash installed ofc...)
Docker-DCO-1.1-Signed-off-by: Kim BKC Carlbacker <kim.carlbacker@gmail.com> (github: bkcsoft)
2014-01-22 02:21:56 +01:00
sudosurootdev
2a1181f404 Spelling error. 2014-01-04 23:15:15 -05:00
Ryan O'Donnell
ad80da3389 Fixes Issue #3400
See Issue #3400
2013-12-30 20:58:25 -05:00
Sven Dowideit
83d81758b0 use the Makefile - it makes life so much simpler 2013-12-23 23:46:52 +10:00
Tianon Gravi
62a81370ff Add new "cross" bundle to cross-compile the Docker client for other platforms (currently just 32-bit and 64-bit OS X) 2013-12-19 11:33:49 -07:00
Tianon Gravi
fbac812540 Add -a to our BUILDFLAGS directly, which fixes some fun test compilation issues
Also, now that we use "-a", we no longer get any benefit from "go test -i", and it actually causes problems sometimes, so let's nuke it.
2013-12-18 11:32:25 -07:00
Tianon Gravi
eddda577a4 Fix "go tool cover" detection to only add -cover and -coverprofile if we both have cover support in Go, and if we have the cover tool downloaded 2013-12-16 22:54:06 -07:00
Tianon Gravi
59dc2876a7 Add new cover bundlescript for giving a nice report across all the coverprofiles generated by the test scripts 2013-12-13 11:59:54 -07:00
Tianon Gravi
f0879a1e14 Add separate "test-integration" bundlescript (and corresponding dyntest-integration bundlescript) 2013-12-08 18:43:24 -07:00
Tianon Gravi
dcfc4ada4d Clean output and simplify hack/make/*test by adding go_test_dir function in make.sh 2013-12-08 13:49:57 -07:00
Solomon Hykes
8bd6127ab3 Merge pull request #2815 from tianon/hack-make-tgz
Add tgz bundlescript
2013-11-25 21:29:14 -08:00
Tianon Gravi
b3f5973f41 Add new tgz bundlescript to default make and release 2013-11-21 22:34:54 -07:00
Tianon Gravi
efd0e13ca7 Add support for compiling using make.sh without '.git' (ie, from a Github tarball, for example) 2013-11-21 15:11:17 -07:00
Tianon Gravi
21161dbd51 Add dynbinary and dyntest scripts for building/testing a separate static dockerinit binary
After a nice long brainstorming session with @shykes on IRC, we decided on using a SHA1 hash of dockerinit compiled into the dynamic docker binary to ensure that we always use the two in a perfect pair, and never mix and match.
2013-10-25 15:13:25 -07:00
Tianon Gravi
d789750851 Refactor the handling of static-related build flags
This is as discussed with @shykes on IRC
2013-10-25 15:13:25 -07:00
Tianon Gravi
fb8d488896 Add a few small consistency tweaks in hack 2013-10-25 15:13:25 -07:00
Michael Crosby
1cbdaebaa1 Add links for container relationships and introspection 2013-10-25 15:13:24 -07:00
Jérôme Petazzoni
85956c70b5 Change bundle order, and fix shell array expansion.
I believe that it is helpful to build the binary first. That way,
if you interrupt the tests, you still get a binary to play with.
If you run the tests first and interrupt them, no binary for you!

Also, the second part of this commit is an undeniable proof that
Bash array syntax is nothing else than an elaborate troll by Bash
authors.
2013-10-17 23:20:18 -07:00
Tianon Gravi
83a2e92d47 Update hack/release.sh process to automatically invoke hack/make.sh and bail on building/testing issues 2013-10-17 16:49:35 -06:00
Tianon Gravi
ccefe47897 Add cleanup/refactor portion of #2010 for hack and Dockerfile updates 2013-09-30 13:57:30 -06:00
Tianon Gravi
aa3de0b849 Add several of the small make.sh fixes from #1920, and make the output more consistent and contributor-friendly, since release instructions already exist in release.sh 2013-09-24 14:36:20 -06:00
Solomon Hykes
ebee8f28ac hack/make.sh print a warning but don't exit if called outside a correct build environment. 2013-09-10 18:08:02 -07:00
Solomon Hykes
228b7af516 Remove fixed FIXMEs 2013-09-10 11:33:37 -07:00
Solomon Hykes
d14058bc29 Update usage comments in hack/make.sh 2013-09-10 11:33:26 -07:00
Solomon Hykes
3d39336a46 Break down hack/make.sh into small scripts, one per 'bundle': test, binary, ubuntu etc. 2013-09-09 18:45:40 -07:00
Solomon Hykes
b187cc40cd Integrate unit tests into hack/make.sh 2013-09-09 16:20:30 -07:00
Solomon Hykes
4cd59b96ed Hack: we no longer need to generate test binaries. 2013-09-08 18:45:23 -07:00
Solomon Hykes
47838051be Hack: improve the Dockerfile for an easier development workflow. Build dev container once, run a shell with source mount-binded, run tests as you edit. LIKE A BOSS. 2013-09-06 20:14:03 -07:00
Renamed from hack/release/make.sh (Browse further)