Commit Graph

94 Commits (9d2691d48bc7e8f514ee6fa89819ccdd91946304)

Author SHA1 Message Date
Tim Hockin a95814b593 make swagger presubmit not spew noise 2015-07-02 14:03:02 -07:00
Abhi Shah 52db576617 Merge pull request #8882 from mesosphere/upstream_k8sm
Upstream Kubernetes-Mesos framework
2015-06-12 06:36:20 -07:00
James DeFelice 91238f8b44 Make building contrib code optional 2015-06-10 20:30:10 +00:00
Daniel Smith 97ebc1aad9 improve output of kube_get_url 2015-06-09 15:26:09 -07:00
Daniel Smith 6e95388672 allow kubectl to be built statically
* Package kubectl in a container
* Add example with a pod using kubectl as a sidecar
2015-06-03 15:41:09 -07:00
Filip Grzadkowski 98115facfd Revert "Gracefully delete pods from the Kubelet" 2015-06-02 23:40:05 +02:00
Clayton Coleman 984692d205 Verify in hack/test-cmd 2015-06-01 19:24:01 -04:00
Tim Hockin a3d5367156 Merge pull request #8765 from eparis/hack-test-failure
Fix build with --use_go_build (e2e.test failure)
2015-05-27 12:43:04 -07:00
Wojciech Tyczynski b2280db724 Deep-copy functions autogeneration. 2015-05-26 21:16:26 +02:00
Eric Paris d8187e26d3 Fix build with --use_go_build (e2e.test failure)
hack/build-go.sh --use_go_build would fail because e2e.test was not being
excluded from the set of things that we were "go build"ing

Instead of walking all binaries, only walk static and nonstatic
```
$ hack/build-go.sh
+++ [0524 18:09:51] Building go targets for linux/amd64:
    cmd/kube-proxy
    cmd/kube-apiserver
    cmd/kube-controller-manager
    cmd/kubelet
    cmd/hyperkube
    cmd/kubernetes
    plugin/cmd/kube-scheduler
    cmd/kubectl
    cmd/integration
    cmd/gendocs
    cmd/genman
    cmd/genbashcomp
    examples/k8petstore/web-server
    github.com/onsi/ginkgo/ginkgo
    test/e2e/e2e.test
+++ [0524 18:09:51] +++ Warning: stdlib pkg with cgo flag not found.
+++ [0524 18:09:51] +++ Warning: stdlib pkg cannot be rebuilt since /usr/lib/golang/pkg is not writable by eparis
+++ [0524 18:09:51] +++ Warning: Make /usr/lib/golang/pkg writable for eparis for a one-time stdlib install, Or
+++ [0524 18:09:51] +++ Warning: Rebuild stdlib using the command 'CGO_ENABLED=0 go install -a -installsuffix cgo std'
+++ [0524 18:09:51] +++ Falling back to go build, which is slower
    **************can't load package: package github.com/GoogleCloudPlatform/kubernetes/test/e2e/e2e.test: cannot find package "github.com/GoogleCloudPlatform/kubernetes/test/e2e/e2e.test" in any of:
    /usr/lib/golang/src/github.com/GoogleCloudPlatform/kubernetes/test/e2e/e2e.test (from $GOROOT)
    /storage/kubernetes/_output/local/go/src/github.com/GoogleCloudPlatform/kubernetes/test/e2e/e2e.test (from $GOPATH)
    /storage/kubernetes/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/test/e2e/e2e.test
!!! Error in /storage/kubernetes/hack/lib/golang.sh:339
  'go build -o "${outfile}" "${goflags[@]:+${goflags[@]}}" -ldflags "${version_ldflags}" "${binary}"' exited with status 1
Call stack:
  1: /storage/kubernetes/hack/lib/golang.sh:339 kube::golang::build_binaries_for_platform(...)
  2: /storage/kubernetes/hack/lib/golang.sh:488 kube::golang::build_binaries(...)
  3: hack/build-go.sh:26 main(...)
Exiting with status 1
!!! Error in /storage/kubernetes/hack/lib/golang.sh:406
  '( kube::golang::setup_env; local version_ldflags; version_ldflags=$(kube::version::ldflags); local host_platform; host_platform=$(kube::golang::host_platform); local goflags; eval "goflags=(${KUBE_GOFLAGS:-})"; local use_go_build; local -a targets=(); local arg; for arg in "$@";
do
    if [[ "${arg}" == "--use_go_build" ]]; then
        use_go_build=true;
    else
        if [[ "${arg}" == -* ]]; then
            goflags+=("${arg}");
        else
            targets+=("${arg}");
        fi;
    fi;
done; if [[ ${#targets[@]} -eq 0 ]]; then
    targets=("${KUBE_ALL_TARGETS[@]}");
fi; local -a platforms=("${KUBE_BUILD_PLATFORMS[@]:+${KUBE_BUILD_PLATFORMS[@]}}"); if [[ ${#platforms[@]} -eq 0 ]]; then
    platforms=("${host_platform}");
fi; local binaries; binaries=($(kube::golang::binaries_from_targets "${targets[@]}")); local parallel=false; if [[ ${#platforms[@]} -gt 1 ]]; then
    local gigs; gigs=$(kube::golang::get_physmem); if [[ ${gigs} -gt ${KUBE_PARALLEL_BUILD_MEMORY} ]]; then
        kube::log::status "Multiple platforms requested and available ${gigs}G > threshold ${KUBE_PARALLEL_BUILD_MEMORY}G, building platforms in parallel"; parallel=true;
    else
        kube::log::status "Multiple platforms requested, but available ${gigs}G < threshold ${KUBE_PARALLEL_BUILD_MEMORY}G, building platforms in serial"; parallel=false;
    fi;
fi; if [[ "${parallel}" == "true" ]]; then
    kube::log::status "Building go targets for ${platforms[@]} in parallel (output will appear in a burst when complete):" "${targets[@]}"; local platform; for platform in "${platforms[@]}";
    do
        ( kube::golang::set_platform_envs "${platform}"; kube::log::status "${platform}: go build started"; kube::golang::build_binaries_for_platform ${platform} ${use_go_build:-}; kube::log::status "${platform}: go build finished" ) &> "/tmp//${platform//\//_}.build" &
    done; local fails=0; for job in $(jobs -p);
    do
        wait ${job} || let "fails+=1";
    done; for platform in "${platforms[@]}";
    do
        cat "/tmp//${platform//\//_}.build";
    done; exit ${fails};
else
    for platform in "${platforms[@]}";
    do
        kube::log::status "Building go targets for ${platform}:" "${targets[@]}"; kube::golang::set_platform_envs "${platform}"; kube::golang::build_binaries_for_platform ${platform} ${use_go_build:-};
    done;
fi )' exited with status 1
Call stack:
  1: /storage/kubernetes/hack/lib/golang.sh:406 kube::golang::build_binaries(...)
  2: hack/build-go.sh:26 main(...)
Exiting with status 1
```
2015-05-24 19:16:26 -04:00
Tim Hockin 76a0a7dff2 Shush minor stdout noise on builds 2015-05-19 11:24:44 -07:00
Jeff Grafton 90f61f3005 Change into the output directory before running go test -c. 2015-05-19 10:04:27 -07:00
Jeff Grafton bf1de72f4a Revert "Revert "Use native Ginkgo test runner instead of cmd/e2e (attempt N)""
This reverts commit f4bb6aa37d.
2015-05-19 09:13:08 -07:00
Quinton Hoole f4bb6aa37d Revert "Use native Ginkgo test runner instead of cmd/e2e (attempt N)" 2015-05-18 21:04:26 -07:00
Jeff Grafton 35c4b92e92 Make e2e compatible with Go 1.3 and OS X.
Go 1.4 added the -o flag to the "go test" command as well as support for
the TestMain() function, so we must work around these not existing in
Go 1.3.

The version of readlink on OS X does not have the -f flag - so we'll
just skip canonicalizing the path.
2015-05-18 12:11:33 -07:00
Jeff Grafton b79fae5d71 Revert "Revert "Once again, use native Ginkgo test runner instead of cmd/e2e.""
This reverts commit 67da1ac0c8.
2015-05-18 11:39:21 -07:00
Jeff Lowdermilk 553f9f822b Add ga-beacon analytics to gendocs scripts
hack/run-gendocs.sh puts ga-beacon analytics link into all md files,
hack/verify-gendocs.sh verifies presence of link.
2015-05-15 18:56:38 -07:00
Jeff Grafton 67da1ac0c8 Revert "Once again, use native Ginkgo test runner instead of cmd/e2e."
This change broke compilation on go 1.3 and running e2e tests on OS X.

This reverts commit 86b023fdd6.
2015-05-15 16:41:55 -07:00
Jeff Grafton 86b023fdd6 Once again, use native Ginkgo test runner instead of cmd/e2e.
This commit deletes cmd/e2e and updates hack/ginkgo-e2e.sh to use the
'ginkgo' command instead. All logic from cmd/e2e/e2e.go and
test/e2e/driver.go have been combined into the new file
test/e2e/e2e_test.go.

The test tarball now includes a built version of the test/e2e test
binary, which includes all tests under test/e2e. This was accomplished
by updating the build scripts to use 'go test -c' when a target name
ended with '.test', and adding a dependency on test/e2e/e2e.test.

This prebuilt test binary is passed to the Ginkgo runner in
hack/ginkgo-e2e.sh. In a future change, we can add support to run
Ginkgo against the source tree if it is available.

This change is generally intended to have no externally visible changes,
aside from the following caveats:
 - The -t/--tests flag has been removed
 - Calling cmd/e2e/e2e directly obviously won't work, but that was never
   intended to be supported anyway
 - If the GINKGO_PARALLEL environment variable is set to y, then ginkgo
   will run test specs in parallel. (Currently defaults to n, since some
   tests are broken in this mode.)

Additionally, several tests which made poor assumptions about cwd or
used testContext before it had been set have been fixed.
2015-05-15 11:54:53 -07:00
Tim Hockin 8e7970f2a1 mkdir -p in doc generation 2015-05-13 12:50:25 -07:00
Kenjiro Nakayama 4c9f2d89ba Add genbashcomp to KUBE_TEST_TARGETS 2015-05-05 16:42:23 +09:00
Wojciech Tyczynski a7205b1fe9 Merge pull request #7685 from jayunit100/etcd-minor
(minor) Add pgrep debugging to etcd error
2015-05-04 11:21:02 +02:00
jayunit100 cdf068495a (minor) Add pgrep debugging to etcd error 2015-05-03 16:59:45 +00:00
Eric Paris 6b3a6e6b98 Make copyright ownership statement generic
Instead of saying "Google Inc." (which is not always correct) say "The
Kubernetes Authors", which is generic.
2015-05-01 17:49:56 -04:00
Jeff Grafton 1359125a4e Build github.com/onsi/ginkgo/ginkgo as a part of the release.
Additionally, add hack/lib to the testing tarball.
2015-05-01 11:29:11 -07:00
Quinton Hoole bfaf976df7 Revert "Use native Ginkgo test runner instead of cmd/e2e" 2015-04-30 13:45:46 -07:00
Jeff Grafton 57750ccb51 Use native Ginkgo test runner instead of cmd/e2e.
This commit deletes cmd/e2e and updates hack/ginkgo-e2e.sh to use the
'ginkgo' command instead. All logic from cmd/e2e/e2e.go and
test/e2e/driver.go have been combined into the new file
test/e2e/e2e_test.go.

Additionally, several tests which made poor assumptions about cwd or
used testContext before it was set have been fixed.

This change is generally intended to have no externally visible changes,
aside from the following caveats:
- The -t/--tests flag has been removed
- Calling cmd/e2e/e2e directly obviously won't work, but that was never
  supported anyway
- If the GINKGO_PARALLEL environment variable is set to y, then ginkgo
  will run test specs in parallel. (Currently defaults to n, since some
  tests are broken in this mode.)
2015-04-28 18:42:37 -07:00
Alex Robinson 79b9b1b0ef Build hyperkube into a static binary. 2015-04-28 02:13:09 +00:00
Jeff Lowdermilk a8e2f6e9c8 Add examples for kubectl describe, and make gendocs less spammy
Makes hack/{run/verify}-gendocs.sh ignore generated-timestamp-only
changes so minor changes to kubectl don't have to touch the entire
set of md docs.
2015-04-23 14:53:10 -07:00
Eric Paris 2915c90200 Remove -installsuffix from go build
This is a go install argument which has no use in go build. Clean it up.
2015-04-17 15:33:00 -04:00
Eric Paris d7fefb6f39 Indicate progress when doing a go build
It is slow.
2015-04-17 15:32:26 -04:00
Eric Paris 5fb8602c65 fall back to go build when static cgo not possible
Instead of just failing, use go build if people don't have the magic cgo
stuff we need build-able/write-able.
2015-04-17 09:50:54 -04:00
Xiang Li 5466dd8138 hack: reliable sort in util.sh 2015-04-14 12:52:28 -07:00
Eric Paris 26149bd83d Doc generation should remove old doc files
Right now, our doc generation scripts notice if you make changes and
don't regen docs, don't include new docs, etc.  But they miss it if your
changes should have REMOVED a doc.  Both kubectl-apiversion and
kubectl-clusterinfo should have been removed, but weren't.

This patch starts tracking all generated doc files and will cause
problems if files should be removed and aren't.
2015-04-13 17:48:24 -04:00
Eric Paris d7a89117b7 Use a helper to find built binaries
Instead of doing it all outselves....
2015-04-13 15:27:55 -04:00
Rohit Jnagal 8b4914dd0f Merge pull request #6472 from zmerlynn/fix_build_status
Add kube::util::wait-for-jobs to report status, unlike builtin wait
2015-04-06 13:39:58 -07:00
Zach Loafman 2bc5dd559a Add kube::util::wait-for-jobs to report status, unlike builtin wait
** Sigh **

Fixes an additional complaint in #6463
2015-04-06 11:11:49 -07:00
Young 802610b13a etcd should be started after the trap func set 2015-04-05 03:41:26 -04:00
Zach Loafman c0ed73a10d Only build in parallel if the build machine is >8G 2015-04-02 17:56:45 -07:00
Zach Loafman e159c02a2a Completely neutral commit that just factors each platform build out to
a function (to make it kinder on reviewers for the next piece).
2015-04-02 17:56:44 -07:00
Zach Loafman 04813f0dcd Revert "Revert "Parallelize architectures in both the building and packaging phases of `make release`""
This reverts commit 9f60dde320.
2015-04-02 17:56:44 -07:00
Zach Loafman 9f60dde320 Revert "Parallelize architectures in both the building and packaging phases of `make release`" 2015-04-02 08:49:11 -07:00
Zach Loafman 0bbf4e99f6 Re tab-ify golang.sh 2015-04-01 17:31:15 -07:00
Zach Loafman 44b4c9ff26 Parallelize architectures in "make release"
On my desktop, this took the KUBE_RELEASE_RUN_TESTS=n
"make release" down from 172s to 115s
2015-04-01 17:29:22 -07:00
Tim Hockin 005da75f4a Make the build faster - call 'go install' once 2015-04-01 10:10:27 -07:00
Paul Morie fdae6748d2 Fix typo in std install instructions for build 2015-03-31 17:36:47 -04:00
Brian Grant 3354cffbf0 Merge pull request #6182 from thockin/plural_services_20
Implement multi-port Services
2015-03-31 12:55:21 -07:00
Abhishek Shah 745368d6b2 Nicer error msg if stdlib pkg with cgo flag is not installed 2015-03-31 08:37:33 -07:00
Tim Hockin eeff1b74fb Fixes from feedback and testing 2015-03-30 23:52:37 -07:00
Clayton Coleman 1618c39a46 Convert List query parameters via object conversion
Convert url.Values -> an object, with appropriate versioning. ListOptions
should also expose parameter names to swagger.
2015-03-27 15:03:57 -04:00