Commit Graph

371 Commits

Author SHA1 Message Date
Brendan Burns
cea52d7e4f Merge pull request #2409 from mattmoor/master
Implements a credentialprovider library for use by DockerPuller.
2014-11-17 21:53:25 -08:00
Matt Moore
0c5d9ed0d2 Implements a credentialprovider library for use by DockerPuller.
This change refactors the way Kubelet's DockerPuller handles the docker config credentials to utilize a new credentialprovider library.

The credentialprovider library is based on several of the files from the Kubelet's dockertools directory, but supports a new pluggable model for retrieving a .dockercfg-compatible JSON blob with credentials.

With this change, the Kubelet will lazily ask for the docker config from a set of DockerConfigProvider extensions each time it needs a credential.

This change provides common implementations of DockerConfigProvider for:
 - "Default": load .dockercfg from disk
 - "Caching": wraps another provider in a cache that expires after a pre-specified lifetime.

GCP-only:
 - "google-dockercfg": reads a .dockercfg from a GCE instance's metadata
 - "google-dockercfg-url": reads a .dockercfg from a URL specified in a GCE instance's metadata.
 - "google-container-registry": reads an access token from GCE metadata into a password field.
2014-11-17 21:46:54 -08:00
Joe Beda
66d287f7e4 Merge branch 'rename-to-kube' of https://github.com/eparis/kubernetes into eparis-rename-to-kube
* 'rename-to-kube' of https://github.com/eparis/kubernetes:
  rename kube server binaries to kube-

Conflicts:
	docs/salt.md
2014-11-17 09:52:10 -08:00
Brendan Burns
403e57be09 Merge pull request #2404 from jbeda/fix-nogo-build
Make dockerized build work when golang isn't installed.
2014-11-17 09:43:08 -08:00
Joe Beda
f18cd53687 Make dockerized build work when golang isn't installed. 2014-11-16 16:29:58 -08:00
Brendan Burns
c38880047d Update guestbook to fix given recent changes. 2014-11-15 19:36:02 -08:00
Tim Hockin
eafdc684e9 Merge pull request #1922 from brendandburns/guestbook
Update the services now that Services v2 has IP per service.
2014-11-14 21:13:19 -08:00
Daniel Smith
e4eb6149f8 Merge pull request #2383 from brendandburns/fix
Fix service e2e test, by eliminating the assumption that ips are re-used
2014-11-14 17:22:50 -08:00
Brendan Burns
97001e317b Fix service e2e test, by eliminating the assumption that ips are re-used. 2014-11-14 17:22:01 -08:00
Joe Beda
06d838ffb1 Merge pull request #2369 from jbeda/vagrant-fix
Vagrant fixes
2014-11-14 16:43:06 -08:00
Dawn Chen
aa711af39e Merge pull request #2355 from brendandburns/kubelet
Add support for the a clusters cloud interface to cloud provider.
2014-11-14 11:14:17 -08:00
Brendan Burns
d3e48c9525 Add the container API to our dependencies.
Update google-api-go-client
2014-11-14 10:38:22 -08:00
Joe Beda
5a0159ea00 Get Vagrant to start using TLS client certs.
Also fix up cert generation. It was failing during the first salt highstate when trying to chown the certs as the apiserver user didn't exist yet.  Fix this by creating a 'kube-cert' group and chgrping the files to that.  Then make the apiserver a member of that group.

Fixes #2365
Fixes #2368
2014-11-13 22:16:45 -08:00
Eric Paris
a99c3c7963 rename kube server binaries to kube-
apiserver becomes kube-apiserver
controller-manager -> kube-controller-manager
scheduler and proxy similarly.

Only thing I promise is that right now hack/build-go.sh and
build/release.sh exit with 0.  That's it.  Who knows if any of this
actually works....
2014-11-13 20:08:26 -05:00
Daniel Smith
c219d138ef make e2e test get events in background, for easier debugging after the fact. 2014-11-13 17:03:06 -08:00
Dawn Chen
143d986b28 Merge pull request #2336 from davidopp/master
Change update example to use a trivial webserver instead of nginx (issue...
2014-11-13 09:57:00 -08:00
Daniel Smith
4e1ab8045b fix e2e.go args for kubectl 2014-11-12 15:22:09 -08:00
David Oppenheimer
3d69351924 Change update example to use a trivial webserver instead of nginx (issue #1803). 2014-11-12 15:13:11 -08:00
Brendan Burns
110b5a3345 Update the services now that Services v2 has IP per service. 2014-11-12 11:31:28 -08:00
davidopp
6a736901ca Revert "Change update example to use a trivial webserver instead of nginx (issue..." 2014-11-11 23:03:23 -08:00
davidopp
004bc49349 Merge pull request #2320 from davidopp/master
Change update example to use a trivial webserver instead of nginx (issue...
2014-11-11 22:56:27 -08:00
David Oppenheimer
03ae4b54a3 Change update example to use a trivial webserver instead of nginx (issue #1803). 2014-11-11 22:16:18 -08:00
Eric Tune
cf21f97cd2 Merge pull request #2309 from lavalamp/fix3
Refactors of kubectl object printers.
2014-11-11 16:39:04 -08:00
Daniel Smith
d6d6229fea Actually let hack/e2e.go run kubectl 2014-11-11 15:32:12 -08:00
Daniel Smith
10c2a98eb0 Merge pull request #2043 from hmrm/e2e-vagrant
Clean up e2e bash-in-go script
2014-11-11 13:39:39 -08:00
Joe Beda
ba611c2e31 Merge pull request #2299 from jbeda/version-fix
Use all tags for version detection
2014-11-11 12:19:10 -08:00
Joe Beda
e02322ba4e Use all tags for version detection 2014-11-11 11:20:19 -08:00
Haney Maxwell
fae27e2f17 Clean up e2e test 2014-11-11 11:03:07 -08:00
Brendan Burns
2c1221864d Make a standalone binary. 2014-11-10 13:34:11 -08:00
Daniel Smith
d5c6499d93 Update scripts to expect versioned output in templates. 2014-11-07 16:47:22 -08:00
Daniel Smith
b8aa87ed50 Add handy -cfg and -ctl options to make it easy to run a kubecfg or kubectl command against your e2e cluster. 2014-11-07 16:47:22 -08:00
Daniel Smith
5d0036070c Remove test verbosity; makes it hard to find failures when travis reports one. 2014-11-05 17:36:47 -08:00
Eric Paris
8a0e3e51e0 fix unbounded host_platform when building with --use_go_build
It's actually used unset a couple of lines after this patch, but this
just resolves it in one place instead of calling
$(kube::golang::host_platform) twice.
2014-11-04 13:58:06 -05:00
Eric Paris
7403de8bd4 add --use_go_build option when building binaries
Because of Fedora's crazy packaging guidelines, go install basically
isn't allowed.  So allow us to use go build instead of go install.
test-integration also needs to accept the flag to be able to pass it
along to the build function.
2014-11-04 13:04:22 -05:00
Clayton Coleman
6026c8b56a Add more extensive test-cmd scenarios for output 2014-11-04 10:44:56 -05:00
Clayton Coleman
179213f61c local-up-cluster: terminate all processes on SIGINT 2014-11-04 10:44:56 -05:00
Brendan Burns
a4abafea02 Merge pull request #2129 from ddysher/fix-local-up
Fix local cluster scripts
2014-11-03 13:24:42 -08:00
Dawn Chen
2d92305338 Merge pull request #2132 from erikstmartin/kubelet-rootdir-fix
Fixes #1612 kubelet should fail to start if it cannot create rootDir
2014-11-03 12:51:47 -08:00
Erik St. Martin
f75f2bbc0f Fixes #1612 kubelet should fail to start if it cannot create rootDir 2014-11-03 14:44:46 -05:00
Clayton Coleman
3836d24838 Merge pull request #2109 from smarterclayton/test_cmd_can_fail_on_public_addr
test-cmd.sh can fail if public IP not available
2014-11-03 11:21:27 -05:00
Deyuan Deng
a7bdb362da Fix local cluster scripts 2014-11-02 23:30:14 -05:00
Joe Beda
bbb66af3db Merge pull request #2092 from jbeda/1729-hack-build
Rationalize `build` and `hack` directories
2014-11-01 18:02:12 -07:00
Joe Beda
5d33ce46cc Rework hack/ and build/ directories.
* Rewrite a bunch of the hack/ directory with modular reusable bash libraries.
* Have 'build/*' build on 'hack/*'.  The stuff in build now just runs hack/* in a docker container.
* Use a docker data container to enable faster incremental builds.
* Standardize output to _output/{local,dockerized}/bin/OS/ARCH/*.  This regularized placement makes cross compilation work.
* Move travis specific scripts under hack/travis

With new dockerized incremental builds, I can do a no-op `make quick-release` in ~30s.  This is a significant improvement.
2014-11-01 17:56:41 -07:00
Clayton Coleman
c1c11557a4 hack/local-up-cluster fails to even launch apiserver
--machines was removed but still referenced in hack/local-up-cluster.
This is not a total fix, but at least allows the apiserver to start.
2014-11-01 12:20:16 -04:00
Clayton Coleman
6e1527ed06 test-cmd.sh can fail if public IP not available
test-cmd runs a 127.0.0.1 version of the apiservers, but does not
set --public_address_override, which means it can fail on some systems
(like Macs) which don't expose a bindable external port by default.

Since reachability is not necessary for test-cmd.sh today, set
public_address_override to 127.0.0.1
2014-11-01 12:19:13 -04:00
Eric Tune
55c2d6bbbb Add basic Authorization.
Added basic interface for authorizer implementations.
Added default "authorize everything" and "authorize nothing
implementations.
Added authorization check immediately after authentication check.
Added an integration test of authorization at the HTTP level of
abstraction.
2014-10-31 12:04:33 -07:00
Deyuan Deng
019b7fc74c Separate minion controller from master. 2014-10-30 20:24:15 -04:00
Daniel Smith
6befc75da5 Build local go components as well as a release 2014-10-28 12:37:03 -07:00
bgrant0607
653d9d70d1 Merge pull request #1993 from hmrm/e2e-vagrant
Allow e2e tests to run with vagrant
2014-10-27 19:19:29 -07:00
bgrant0607
e45910fb08 Merge pull request #2017 from jbeda/fix-e2e
Fix e2e tests
2014-10-27 16:51:19 -07:00
Joe Beda
053d65c086 Fix e2e tests 2014-10-27 16:31:31 -07:00
bgrant0607
ddea4ff709 Merge pull request #1977 from lavalamp/fix4
Start running e2e go tests. Disable broken test.
2014-10-27 16:27:11 -07:00
Brendan Burns
df3dd288f2 Fix the e2e tests and kubecfg given recent additional validation. 2014-10-27 13:39:21 -07:00
Joe Beda
019170e6fb Merge pull request #1716 from proppy/boot2docker-bootstrap
docker: add cluster bootstrap and doc
2014-10-27 11:46:55 -07:00
Haney Maxwell
d709d8561a Allow e2e tests to run with vagrant 2014-10-24 17:16:10 -07:00
Johan Euphrosine
966c3dae70 boot2docker: add cluster bootstrap and doc 2014-10-23 18:06:17 -07:00
Daniel Smith
1e249be99d Start running e2e go tests. Disable broken test. 2014-10-23 16:13:46 -07:00
Daniel Smith
47f1cb966b Fixes to e2e script 2014-10-23 14:54:50 -07:00
Brendan Burns
e1ae7bd16c Merge pull request #1973 from lavalamp/fix4
fix backwards compatible script
2014-10-23 12:52:37 -07:00
Daniel Smith
d055e279fe fix backwards compatible script 2014-10-23 12:51:21 -07:00
Brendan Burns
dbb23abac2 Fix the guestbook e2e test. 2014-10-23 11:32:01 -07:00
Daniel Smith
bfabb41604 New e2e script (in go this time) that doesn't completely suck 2014-10-23 11:03:30 -07:00
Brendan Burns
77d2815b86 Merge pull request #1967 from jbeda/e2e-fix
Fix e2e test for .ID->.Name change
2014-10-22 17:20:44 -07:00
Joe Beda
33763d07b2 Fix e2e test for .ID->.Name change 2014-10-22 17:19:53 -07:00
Haney Maxwell
3160500940 Refactor kubelet access and add SSL 2014-10-22 14:53:59 -07:00
Joe Beda
cb027ce2a9 Look at all tags when looking for version.
'git describe' uses only annotated tags by default.  We want to use all tags as we can only create 'lightweight' tags in the GitHub UI.
2014-10-17 14:34:30 -07:00
Tim Hockin
95f57dc886 Clean up e2e more
Don't early-terminate on test fail.
Log which tests failed at the end.
2014-10-16 11:08:39 -07:00
Tim Hockin
99bca68c7d Add local-up support 2014-10-16 08:36:47 -07:00
Tim Hockin
1c2f04b8b7 Add e2e test 2014-10-16 08:36:47 -07:00
Tim Hockin
e907011111 Core support for ip-per-service 2014-10-16 08:36:47 -07:00
Eric Tune
6f577aa321 Merge pull request #1789 from lavalamp/eventing4
Add event creation library and implement in scheduler.
2014-10-15 15:55:26 -07:00
Joe Beda
1874926a70 Merge pull request #1815 from thockin/e2e
Better final print in e2e
2014-10-15 15:51:18 -07:00
Sam Ghods
4b220f8b0a kubectl: kubecfg rewrite for better modularity and improved UX 2014-10-15 15:29:54 -07:00
Tim Hockin
ee1f2ddf7c Better final print in e2e 2014-10-15 14:31:15 -07:00
bgrant0607
e7573f63b3 Merge pull request #1812 from thockin/e2e
Allow e2e to only run some tests
2014-10-15 13:45:17 -07:00
Tim Hockin
d6d92d13f0 Allow e2e to only run some tests 2014-10-15 13:08:25 -07:00
Daniel Smith
180e90f7eb Merge pull request #1790 from jbeda/1678-fix-e2e
Deal with the case where a pod goes away after we list it.
2014-10-15 12:01:28 -07:00
Daniel Smith
2987747a0f Merge pull request #1794 from brendandburns/e2e
Add a pod update e2e test in go. Also adjust validation logic a little.
2014-10-15 11:59:30 -07:00
Daniel Smith
d4c750a878 Fix vet-go.sh and some things it complained about 2014-10-15 11:56:19 -07:00
Joe Beda
391335cbff Deal with the case where a pod goes away after we list it.
Fixes #1678
2014-10-15 11:20:17 -07:00
Tim Hockin
360f2e53b0 Revamp e2e basic test to use a smaller container. 2014-10-15 10:54:56 -07:00
Brendan Burns
8d38f8890e Add an e2e test in go. Also adjust validation logic a little to make it more reasonable.
Not integrated into existing e2e yet.
2014-10-14 16:43:00 -07:00
Joe Beda
e1b9f1aae2 Handle empty array in update.sh
Fixes #1776
2014-10-14 13:07:22 -07:00
Joe Beda
96c1bc17ca Set shell options for reliability.
Tweak a few other small things in our shell scripts.
2014-10-10 12:33:36 -07:00
Joe Beda
d43a6ec5a3 Standardize how we refer to the kubernetes root.
Now use $KUBE_ROOT as the variable pretty much everywhere.
2014-10-10 12:33:36 -07:00
Joe Beda
38d5906044 Clean up READMEs and broken stuff.
Move all support for clouds that are broken with this change into an `icebox` directory.  We'll move that stuff back out as we fix it up.
2014-10-10 12:33:36 -07:00
Filipe Brandenburger
60af857077 Merge pull request #1633 from thockin/vet
Add a script to run 'go vet'
2014-10-09 17:23:51 -07:00
Johan Euphrosine
784553c483 hack: add cluster in a pod manifest 2014-10-08 17:52:08 -07:00
Tim Hockin
61dcb91885 Add a script to run 'go vet' 2014-10-07 17:54:38 -07:00
Sam Ghods
868c6fe4b8 Increase logging levels in hack/local-up-cluster.sh 2014-10-07 00:07:05 -07:00
Sam Ghods
97dd16b913 Fix hack/local-up-cluster.sh to ensure apiserver comes up 2014-10-06 19:38:27 -07:00
Dawn Chen
a86d496f9a Fix e2e tests. 2014-10-06 13:37:24 -07:00
David Reynolds
9fece09f26 Use -addr in start_etcd instead of -bind-addr 2014-09-30 19:33:28 -07:00
Joe Beda
81e91db697 Grab images as part of update e2e test 2014-09-26 14:31:12 -07:00
Joe Beda
7d6f5b45ea Merge pull request #1414 from brendandburns/fix
Clean up scripts to require a minimal gsutil version.
2014-09-25 09:54:36 -07:00
Tim Hockin
d5f3d152d2 Merge pull request #1435 from brendandburns/e2e2
Add a new network for e2e tests, to isolate it from any other cluster.
2014-09-25 08:47:19 -07:00
Brendan Burns
511ec280b9 Add a new network for e2e tests, to isolate it from any other cluster. 2014-09-24 22:37:19 -07:00
Brendan Burns
431caa93df Merge pull request #1335 from dchen1107/exit1
Convert existing kubernetes system to use ContainerStatus, instead of
2014-09-24 21:37:24 -07:00
Dawn Chen
96686b3692 Update e2e test to reflect the change. 2014-09-24 16:42:10 -07:00
Brendan Burns
4a034b4e77 Clean up scripts to require a minimal gsutil version. 2014-09-24 14:27:16 -07:00
Daniel Smith
50eb2cf59c fix verify-gofmt's version detection 2014-09-24 14:25:21 -07:00
Dawn Chen
0e6ec3cbfc Convert existing kubernetes system to use ContainerStatus, instead of
docker.Container directly.

Conflicts:
	pkg/kubelet/dockertools/docker.go
	pkg/registry/pod/rest.go
2014-09-24 11:16:46 -07:00
Filipe Brandenburger
30db3e281d Cleanup hack/test-integration.sh
Proper quoting, error checks, use $KUBE_* variables when applicable, trap to do
cleanup on all errors, call cleanup explicitly on successful exit.

Tested:
- Ran it manually to completion, test run successful.
- Interrupted it during the run, checked that $? was non-zero, etcd was killed.

Signed-off-by: Filipe Brandenburger <filbranden@google.com>
2014-09-23 09:37:29 -07:00
Eric Paris
a96d16f8c0 Allow option to not build cmd/integration
In case it was built seperately (as in, on Fedora, we cannot use go
install as we do not have write permission to portions of the GOPATH)
2014-09-23 11:56:26 -04:00
Eric Paris
3a40db8f56 hack: Switch some $(dirname $0)../blah to use ${KUBE_*} vars
This doesn't fix anything broken. But we have config-go which exports
KUBE_REPO_ROOT and KUBE_TARGET.  Using those means the test scripts can
be more easily moved around the repo and still work.  Especially in
hack/test-integration.sh where we use hack/build-go.sh which is going
to use KUBE_TARGET to place the binary, then we use a different method
to find/execute the binary...
2014-09-23 10:10:55 -04:00
Tim Hockin
cf86d66076 rename labels in kubcfg logic 2014-09-22 15:34:13 -07:00
Clayton Coleman
463a16af36 Add benchmarks for API tests 2014-09-19 17:17:54 -04:00
Clayton Coleman
54e0af8b96 Allow -race to be disabled in test-go.sh 2014-09-19 14:09:42 -04:00
Clayton Coleman
27bbd7df56 Increase the hack/test-go.sh timeout to account for more fuzzing
We fuzz v1beta1 and v1beta2 now, so fuzzer takes twice as long.
2014-09-18 14:17:32 -04:00
Jessica Forrester
2dc30aa932 Remove unused enable_cors flag and allow localhost without a port as an origin in local-up-cluster 2014-09-12 13:01:32 -04:00
Filipe Brandenburger
fabf7c7f55 Fix the e2e scripts after PR 1284 which added a new file. 2014-09-11 15:32:11 -07:00
Daniel Smith
6757b402d5 Merge pull request #1133 from jwforres/enable_cors
Add option to enable a simple CORS implementation for the api server
2014-09-11 13:59:14 -07:00
Eric Paris
d687156154 Try to document all environment variable used by config-go.sh 2014-09-10 17:16:27 -04:00
Eric Paris
df5fe66636 KUBE_NO_GODEPS to not use in tree godeps
If this is set, and it normally shouldn't be, the config file will not
add the in tree Godeps to the GOPATH.  So all of them must be solved by
the KUBE_EXTRA_GOPATH
2014-09-10 16:51:23 -04:00
Eric Paris
35f03d4241 KUBE_EXTRA_GOPATH to append to the GOPATH
So you can add your own package to the GOPATH outside of the kube tree
2014-09-10 16:47:57 -04:00
Eric Paris
e426dd78a1 function to turn list of targets to list of go packages 2014-09-10 13:16:45 -04:00
Eric Paris
4ba97e3968 Move default target list from build_go to config_go 2014-09-10 12:20:50 -04:00
Jessica Forrester
8b4ca9c2a7 Move CORS handler wrapping into cmd/apiserver and switch config flag to a list of allowed origins 2014-09-09 17:50:18 -04:00
Jessica Forrester
8723eece49 Add option to enable a simple CORS implementation for the api server 2014-09-09 17:50:18 -04:00
Daniel Smith
d397d64b9e go test -cover -race is fixed now 2014-09-09 14:06:23 -07:00
Dan Mace
2e1d62ac65 Typo correction 2014-09-08 20:23:30 -04:00
Joe Beda
073327277b Fix label query in e2e basic.sh 2014-09-05 14:10:02 -07:00
Joe Beda
1410724031 Fix up some flaky behavior of the new improved update e2e test. 2014-09-05 13:04:31 -07:00
Daniel Smith
ee1c0838d8 Merge pull request #1142 from jbeda/tweak-demo
Improve update demo, support rolling template update
2014-09-05 10:07:58 -07:00
Filipe Brandenburger
be322fc5da Merge pull request #1174 from eparis/version-shell-overrides
Allow setting of git_commit, version, and dirty via shell varables
2014-09-05 09:26:01 -07:00
Eric Paris
428e0aaff0 Allow setting of git_commit, version, and dirty via shell varables
This is particularly useful if building from a tarball instead of from a
checked out git repo (as all Linux distributions do)
2014-09-05 11:48:04 -04:00
Eric Paris
c7e8e05706 Capitalize bash variable and prefix with KUBE_
We intend to make these setable by the environment.  This just does the
renaming.
2014-09-05 11:42:51 -04:00
Eric Paris
78b82382cf default to build all binaries even if build options given 2014-09-05 10:07:10 -04:00
Joe Beda
ce34eacd2c Fix up e2e test for update demo.
Use the scripts that are in the example directory.  Also actually run the update as part of the test.
2014-09-04 13:25:39 -07:00
Joe Beda
c47b405841 Use KUBECFG instead of CLOUDCFG in scripts 2014-09-04 13:25:39 -07:00
Andriy Yurchuk
22ce0022d1 Merge branch 'master' into build-go-verbose 2014-09-04 22:16:24 +03:00
Brendan Burns
4a934427db Exclude vendored etcd. 2014-09-04 12:05:34 -07:00
Andriy Yurchuk
24d0eb43ec Merge branch 'master' into build-go-verbose 2014-09-04 21:27:15 +03:00
Dawn Chen
87278a6f56 Merge pull request #1179 from brendandburns/fix
Fix travis and cluster installs.
2014-09-04 10:32:45 -07:00
Brendan Burns
3864cf453a Fix travis and cluster installs. 2014-09-04 10:31:09 -07:00
Brendan Burns
78df593c57 Fix a shell typo. 2014-09-04 10:03:49 -07:00
Tim Hockin
512b0ab90a Merge pull request #1176 from brendandburns/travis
Re-enable travis for Go tip
2014-09-04 09:57:14 -07:00
Brendan Burns
53e3bff464 Re-enable travis for Go tip 2014-09-04 09:56:28 -07:00
Andriy Yurchuk
5878794fd7 Be a little more verbose while building local go 2014-09-04 13:25:16 +03:00
Filipe Brandenburger
3d03b4b80f Also assume arguments starting with dashes are go flags in hack/build-go.sh
Tested:
  $ hack/build-go.sh cmd/kubelet -v
  github.com/GoogleCloudPlatform/kubernetes/pkg/...

Signed-off-by: Filipe Brandenburger <filbranden@google.com>
2014-09-03 14:59:29 -07:00
Filipe Brandenburger
8effbdc63f In hack/test-go.sh treat arguments that start with a dash as go flags.
This fixes `hack/test-go.sh pkg/apiserver -test.run=<a_specific_test_name>`
which was broken by PR #1116.

Signed-off-by: Filipe Brandenburger <filbranden@google.com>
2014-09-03 14:57:19 -07:00
Tim Hockin
640a1d323d Improve test script
add usage
verify flag value for -i is numeric
allow multiple targets on the command line
actually capture coverage output
fix lingering GOFLAGS undef issue
fix issue with -i not working at all: ((x++)) returns 1 when x is 0, which is
  incompatible with "set -e"
2014-09-03 09:40:20 -07:00
Filipe Brandenburger
b94749ec70 Set gitMajor and gitMinor from hack/build-go.sh
Set the values of major and minor version based on the output of the
`git describe` command, which uses annotated tags as source of
versioning information.

Minor will get a "+" appended whenever the annotated tag does not match
the tree exactly (including when the tree is dirty.) So that only
official releases will have a "bare" minor version, all others will have
a "+" to indicate the binaries contain changes from the released version
in minor.

(This is similar to how versions of development builds of the Linux
kernel work.)

Tested:
- With no annotated tags:
  $ hack/build-go.sh
  $ _output/go/bin/kubecfg -version=raw
  version.Info{Major:"0", Minor:"1+", GitVersion:"v0.1+", GitCommit:"7d29873bdee87efacaace30ab3602297cacf1b4f", GitTreeState:"clean"}

- Tagging current version on a clean git tree:
  $ git tag -a -m 'Test tag v2.3' v2.3
  $ hack/build-go.sh
  $ _output/go/bin/kubecfg -version=raw
  version.Info{Major:"2", Minor:"3", GitVersion:"v2.3", GitCommit:"7d29873bdee87efacaace30ab3602297cacf1b4f", GitTreeState:"clean"}

- Tagging current version on a dirty git tree:
  $ git tag -a -m 'Test tag v2.3' v2.3
  $ touch test.txt  # this is enough to mark the tree as dirty
  $ hack/build-go.sh
  $ _output/go/bin/kubecfg -version=raw
  version.Info{Major:"2", Minor:"3+", GitVersion:"v2.3-dirty", GitCommit:"7d29873bdee87efacaace30ab3602297cacf1b4f", GitTreeState:"dirty"}

- Tagging a previous version on a clean tree:
  $ git tag -a -m 'Test tag v2.3' v2.3 HEAD~5
  $ hack/build-go.sh
  $ _output/go/bin/kubecfg -version=raw
  version.Info{Major:"2", Minor:"3+", GitVersion:"v2.3-6-g7d29873bdee87e", GitCommit:"7d29873bdee87efacaace30ab3602297cacf1b4f", GitTreeState:"clean"}

Signed-off-by: Filipe Brandenburger <filbranden@google.com>
2014-09-02 16:23:31 -07:00
Filipe Brandenburger
8cd7387cc0 Include -dirty suffix in version info when building on a dirty tree
Ensure the output of `git describe` will include the `-dirty` suffix
when building on a tree with modified files in it.

Tested:
- ...

Signed-off-by: Filipe Brandenburger <filbranden@google.com>
2014-09-02 16:23:31 -07:00
Joe Beda
843ae1fbe2 Rename output/ directory to _output/
go build ./... will ignore any directory starting with an underscore.
2014-08-29 14:44:55 -07:00
Tim Hockin
f0c3896281 Build tweaks
Wrap long lines.
Add GOFLAGS support to build and test.
Comments.
2014-08-28 22:56:00 -07:00
Deyuan Deng
c63205b0a7 Add quotes for variable; change shell redirection. 2014-08-28 22:31:53 -04:00
Deyuan Deng
9fed990da6 Start scheduler locally. 2014-08-28 20:48:36 -04:00
Daniel Smith
e2895c3bd8 Merge pull request #1055 from brendandburns/flake
Add the ability to multiple test iterations without rebuilding.
2014-08-28 10:31:44 -07:00
Daniel Smith
8072f69a4c Merge pull request #1054 from filbranden/build_without_godep
Build without godep
2014-08-28 10:07:05 -07:00