Commit Graph

35 Commits (6dd4831de86b2ba38abfdb0ad8df2db57d5f278e)

Author SHA1 Message Date
Tim Hockin a711770e19 Revert "Fixed annoying typo" 2014-09-02 13:18:13 -07:00
7oku 28eb96f2aa Fixed anoying typo
Anoying typo fixed
2014-09-01 11:40:07 +02: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
Ryan Richard 2565164a8d Add Rackspace support for dev-build-and-up 2014-08-28 10:36:58 -05:00
Filipe Brandenburger bf9113ea2e Grab complete version information from git
This replaces the gitcommit() shell function with kube::version_ldflags()
which prepares a string suitable for Go's -ldflags parameter that fills
in the git version fields in pkg/version/base.go.

The gitCommit is now a full 40-character SHA1, the gitVersion will be
filled from `git describe` output (which will only be available once we
have annotated git tags) and gitTreeState will be filled with either
"clean" or "dirty" depending on the tree status at the time of the
build.

Use a kube:: "namespace" (there's really no such a thing in shell, but
the illusion still makes it nice) in order to make this nice to import
into existing shell scripts or on a shell session. (In the future, I'm
planning to introduce more functions and convert some of the top-level
commands into other kube::* shell functions.)

There's a difference now that -version will report a full SHA1, this
will be improved in a follow up change which will improve the Go code
for -version handling to give a more meaningful string that should be
enough to identify the origin of the binary in git.

Tested:
- Built it and checked output of -version:
  $ hack/build-go.sh
  $ output/go/bin/kubelet -version
  Kubernetes version 0.1+, build 3ff7ee4b8c843c7767cd856fbf7d3027cd5410e6

- Ran the release script and checked output of the common.sls file:
  $ release/build-release.sh TESTINSTANCE
  $ cat output/release/master-release/src/saltbase/pillar/common.sls
  instance_prefix: TESTINSTANCE-minion
  go_opt: -ldflags '-X github.com/GoogleCloudPlatform/kubernetes/pkg/version.gitCommit 3ff7ee4b8c843c7767cd856fbf7d3027cd5410e6 -X github.com/GoogleCloudPlatform/kubernetes/pkg/version.gitTreeState clean'

- Successful run of hack/e2e-test.sh end-to-end tests.

Signed-off-by: Filipe Brandenburger <filbranden@google.com>
2014-08-27 17:36:04 -07:00
Filipe Brandenburger 4bc1364224 Fix commitFromGit -> gitCommit in release/build-release.sh
This caused Jenkins break on e2e-test because the version of server and
client did not match exactly, as the server was built without the
version ldflags.

Tested:
- Ran "release/build-release.sh ${instance_name}" and confirmed that
  output/release/master-release/src/saltbase/pillar/common.sls has the
  git version under version.gitCommit no longer version.commitFromGit.

Fixes: b777eb19e2
2014-08-27 14:04:54 -07:00
Filipe Brandenburger 8f55ac9651 Do not set IFS to the wrong value
The correct way to reset it to the default would be IFS=$' \t\n', but
there's no reason to assume a wrong setting here, in fact, nothing this
script does should depend on an IFS setting, so let's just drop this
line altogether.

Tested:
- Ran "release/build-release.sh <instance>" before and after this
  change. Compared the two trees for differences, only difference was
  the SHA1 in output/release/master-release/src/saltbase/pillar/common.sls

    $ diff -Naur output.orig/release/master-release/ output/release/master-release/
    diff -Naur output.orig/release/master-release/src/saltbase/pillar/common.sls output/release/master-release/src/saltbase/pillar/common.sls
    --- output.orig/release/master-release/src/saltbase/pillar/common.sls   2014-08-27 13:28:52.104241577 -0700
    +++ output/release/master-release/src/saltbase/pillar/common.sls        2014-08-27 13:29:28.296087806 -0700
    @@ -1,2 +1,2 @@
     instance_prefix: MY_INSTANCE_NAME-minion
    -go_opt: -ldflags "-X github.com/GoogleCloudPlatform/kubernetes/pkg/version.commitFromGit 'e169da2abfbf'"
    +go_opt: -ldflags "-X github.com/GoogleCloudPlatform/kubernetes/pkg/version.commitFromGit '8aea0d85e447-dirty'"

Signed-off-by: Filipe Brandenburger <filbranden@google.com>
2014-08-27 13:32:09 -07:00
Joe Beda 5722eba780 Propagate version info into salt config and use to build.
Fixes #1043.
2014-08-26 16:17:06 -07:00
Joe Beda bce7a4bd90 Merge pull request #1014 from smarterclayton/set_commit_with_ldflags
Use -ldflags to set git commit version
2014-08-26 10:56:56 -07:00
Clayton Coleman 9336373857 Use -ldflags to set git commit version 2014-08-25 16:40:47 -04:00
Jeff Mendoza d8d09ace41 Refactor Azure deploy scripts.
Refactored to work with cluster/* scripts which require
actions to be defined as methods in cluster/azure/util.sh
2014-08-22 15:48:06 -07:00
Jeff Mendoza cf6d9b0534 Remove dep on gce cluster config for azure relase.sh 2014-08-22 12:06:00 -07:00
Daniel Smith 79f60da6c4 add salt files to make scheduler run 2014-08-20 15:32:49 -07:00
Joe Beda 70c6c75ae3 Fix release and salt scripts for godep 2014-08-13 15:57:41 -07:00
Brad Wells e3fd1672ac (Re)generate the build version when preparing a release.
If hack/build-go.sh has never been run before release/build-release.sh
the subsequent build will fail. Also, when preparing builds the
version should be forced to be up to date with the current checkout.
2014-08-08 22:43:31 -06:00
Rafael Chacón b13f5a8f62 Solve issue with realpath on Mac OS X.
* realpath doesn't work on Mac OS systems. I found the following
  workaround that should work in any distro. For more references see the
  following: http://serverfault.com/questions/40144/how-can-i-retrieve-the-absolute-filename-in-a-shell-script-on-mac-os-x
2014-07-26 18:15:44 -07:00
Daniel Smith 354ccae7b3 Fix release.sh 2014-07-24 18:50:54 -07:00
derekwaynecarr 69ae2fe4bb Initial vagrant setup and e2e testing support 2014-07-24 16:32:36 -04:00
Jeff Mendoza 95ec94514b Rename and move Azure scripts. 2014-07-18 16:13:05 -07:00
Jeff Mendoza b4183409ab Comment and whitespace fixes. 2014-07-18 13:11:50 -07:00
Jeff Mendoza 3ff6b0f8a6 First draft of shell scripts for deploying kube to Azure. 2014-07-18 13:11:50 -07:00
Jeff Mendoza a4ea512350 Make build-release.sh not directory dependant. 2014-07-18 11:51:19 -07:00
Christophe Labouisse 3ce6fc116d Fixed SCRIPT_DIR computation when CDPATH is set. 2014-07-11 16:55:47 +02:00
brendandburns 628667a2b0 Merge pull request #400 from MSOpenTech/shell-scripts
Start modularizing shell scripts
2014-07-10 20:52:49 -07:00
Jeff Mendoza 24159294d6 Fix build-release comments. 2014-07-10 15:48:58 -07:00
Jeff Mendoza 5a556dc3fa Start modularizing shell scripts
Pull release tarball building out of release.sh into new
build-release.sh, so you can build the tarball without uploading
to cloud storage.
2014-07-10 15:46:24 -07:00
Jeff Mendoza d0828f4926 Silence some noise.
Silence benign errors in bash scripts.
2014-07-10 14:21:23 -07:00
Brendan Burns d5516e4cdc Activate gce minion list. 2014-07-01 11:33:58 -07:00
Daniel Smith c97c514742 Rename cloudcfg to kubecfg 2014-06-25 18:01:37 -07:00
Brendan Burns 87afb5fd5e Further error handling when gcloud isn't set up correctly. 2014-06-14 15:37:39 -07:00
Brendan Burns b78e32b1ba Updated release config file to check for gcloud. 2014-06-14 15:12:29 -07:00
Joe Beda d230625e1a Move third_party code under third_party/src so it can be used in $GOPATH. 2014-06-13 17:15:49 -07:00
Joe Beda 110a390c97 Switch from `gcloud compute` to `gcutil`.
We'll switch back to the future once the interface has settled down.
2014-06-12 15:43:00 -07:00
Joe Beda 894a7e3282 Move everything out of src and reorganize scripts.
Fixed up some scripts to be more robust.  Changed the e2e test setup to use g1-small instances.  Fixed up documentation to reflect the new script locations.  Disabled the "curl | bash" cluster launch as it hasn't been well tested and doesn't include the cloudcfg tool yet.
2014-06-06 21:41:19 -07:00