Commit Graph

134 Commits

Author SHA1 Message Date
Alex Dadgar
2010b636c8 bump consul version 2017-08-23 10:45:54 -07:00
James Nugent
dcdc91fb6b build: Replace shell scripts with GNUmakefile
This commit replaces the shell script-driven build process for Nomad
with one based around GNU Make (note we _do_ use GNU-specific
constructs), requiring no additional scripts for common cases of
development. The following targets are implemented:

Per-OS/arch combinations:

    Binaries (Host - Mac OS X):
	pkg/darwin_amd64/nomad

    Binaries (Host - Linux):
	pkg/linux_386/nomad
	pkg/linux_amd64/nomad
	pkg/linux_amd64-lxc/nomad
	pkg/linux_arm/nomad
	pkg/linux_arm64/nomad
	pkg/windows_386/nomad
	pkg/windows_amd64/nomad

    Packages (Host - Mac OS X):
	pkg/darwin_amd64.zip

    Packages (Host - Linux):
	pkg/linux_386.zip
	pkg/linux_amd64.zip
	pkg/linux_amd64-lxc.zip
	pkg/linux_arm.zip
	pkg/linux_arm64.zip
	pkg/windows_386.zip
	pkg/windows_amd64.zip

Phony targets:

	dev - Builds for the current host GOOS/GOARCH (unless overriden
	      in the environment)

	release - Builds all appropriate release packages for the
	          current host GOOS/GOARCH (i.e. Windows and Linux
		  packages on a Linux host, Darwin packages on an OSX
		  host)

	generate - Generate code for the current host architecture using
	           `go generate`.

	test - Runs the Nomad test suite

	clean - Removes build artifacts

	travis - Runs `make test` with the wrapper script to prevent
	         Travis CI from timing out.

	help - Displays usage information about commonly used targets.

Note that there are some semantic differences from the previous version.

1. `generate` is no longer a dependency of `dev` builds. This is because
   it causes a rebuild every time, even when no code has changed, since
   `go generate` does not appear to leave file timestamps alone.
   Regardless, it is insufficient to generate on one host OS - it needs
   to be run on each target to ensure everything is generated correctly.

2. `gofmt` is no longer checked. This should be enabled as a linter once
   the `gofmt -s` refactoring will pass on the whole code base, in order
   to avoid special cased checks versus using go-metalinter.

Example Usages:

Make a development build for the current GOOS/GOARCH:

	make dev

Make release build packages appropriate for the host OS:

	make release

Update generated code for the host OS:

	make generate

Run linting checks:

	make check

Build a specific alternative GOOS/GOARCH/tags combination:

	make pkg/linux_amd64-pkg/nomad
	make pkg/linux_amd64-pkg.zip
2017-08-18 06:29:26 +01:00
Alex Dadgar
c26ecb7092 Add version package
This PR adds a version package and consolidates version strings into a
Version struct.
2017-08-16 15:44:21 -07:00
Alex Dadgar
296f1ee5cf reset travis script 2017-07-22 22:25:20 -07:00
Alex Dadgar
9e114d41cc whats going on 2017-07-22 21:44:53 -07:00
Alex Dadgar
08c2ba9bc6 Parallel client tests (#2890)
* alloc_runner

* Random tests

* parallel task_runner and no exec compatible check

* Parallel client

* Fail fast and use random ports

* Fix docker port mapping

* Make concurrent pull less timing dependant

* up parallel

* Fixes

* don't build chroots in parallel on travis

* Reduce parallelism on travis with lxc/rkt

* make java test app not run forever

* drop parallelism a little

* use docker ports that are out of the os's ephemeral port range

* Limit even more on travis

* rkt deadline
2017-07-22 19:04:36 -07:00
Alex Dadgar
3cb16aa9a8 small fixes 2017-07-22 12:25:02 -07:00
Alex Dadgar
9bf9f59f8f Force parallelism on travis 2017-07-20 22:47:10 -07:00
Alex Dadgar
57e34b66ea Undo verbose and parallel on tests 2017-07-20 20:28:31 -07:00
Alex Dadgar
e44da4272b verbose and parallel 2017-07-20 09:57:39 -07:00
Michael Schurter
8a9926c6ae Start consul in getting started vagrant
Sneak a version bump to consul in as well
2017-07-03 16:45:13 -07:00
Michael Schurter
fe3bb07e80 Fixup example 2017-06-21 17:19:08 -07:00
Michael Schurter
e6552e149a Add script to demo weave in vagrant 2017-06-21 17:19:08 -07:00
Michael Schurter
8ed23d4b28 Fix lxc tests 2017-06-21 17:19:08 -07:00
Michael Schurter
990de0f32c Update go-winio to remove cgo on Windows
Thanks to Microsoft/go-winio#51
2017-05-08 15:43:48 -07:00
Michael Schurter
234d734745 go-winio now requires cgo which requires mingw 2017-05-03 17:09:12 -07:00
Alex Dadgar
2620a3bd63 bump vault 2017-03-27 10:10:42 -07:00
Lev Walkin
fda40fada4 ensuring bin directory exists before copying 2017-03-17 17:23:15 -07:00
Michael Schurter
34ab77a636 Fix overriding build targets 2017-03-14 10:47:29 -07:00
Michael Schurter
1097113f83 make bin creates a release binary for the host arch
make dev properly copies the binary into bin/ again.

make release still creates binaries for as many archs as possible.

Fixes #2407
2017-03-08 17:42:28 -08:00
Michael Schurter
a9e3f2cf3e Replace "-" in env var keys with "_"
Fixes #2405
2017-03-06 19:57:44 -08:00
Alex Dadgar
15c53b1a0e auto release 2017-03-03 16:06:31 -08:00
Alex Dadgar
f6c67535d1 Fix docs and script 2017-03-03 16:00:39 -08:00
Jonathan Wright
5112eee9ff Fix spelling error for CGO_ENABLED variable in build script 2017-03-01 19:21:46 +00:00
Michael Schurter
8a57aadbcd Oops! Don't try to build darwin on Linux.
Someday maybe
2017-02-23 16:58:21 -08:00
Michael Schurter
c7da4ec618 Allow building specific targets 2017-02-23 13:27:28 -08:00
Michael Schurter
5bb805cc5e Fix 32bit arm build
Had to use the hack from https://github.com/golang/go/issues/12443
2017-02-09 11:22:17 -08:00
Alex Dadgar
3e4c8672c0 Add windows exe extension 2017-02-05 13:17:13 -08:00
Diptanu Choudhury
1aec23bb8a fixed conflicts 2017-01-31 13:20:58 -08:00
Michael Schurter
fc36adfe2d Fix some bash; uuuuuuuuuugh 2017-01-27 16:08:21 -08:00
Michael Schurter
8e36ef3823 Prettify output 2017-01-27 16:08:21 -08:00
Michael Schurter
cb5e23d7b4 Fix vagrant provision with a bunch of guards 2017-01-27 16:08:21 -08:00
Michael Schurter
917c48a8e5 Bump rkt version; simplify script 2017-01-27 16:08:21 -08:00
Michael Schurter
afbf63152b Upgrade vagrant/release to Ubuntu 16.04 / Go 1.7.5
Switch back to soft-float arm32 as armhf chips are backward compatible.
2017-01-27 16:08:21 -08:00
Michael Schurter
d84660a047 Split out massive list of cross compile deps+cmds 2017-01-27 16:08:21 -08:00
Michael Schurter
b9da18efc8 Install crosscompile dep to build arm in Vagrant 2017-01-27 16:08:21 -08:00
Michael Schurter
2f0550cfc4 Cache build deps prior to running tests 2017-01-27 16:08:21 -08:00
Michael Schurter
c5f9144e32 Split dev build into its own script
The dev build is far simpler than the release build, so move it to its
own shell script. This simplifies the release build script slightly as
well at the cost of duplicating the version/tag logic.

Also don't even try to check for LXC if not running on Linux. I don't
think we want to try to support cross-compiling LXC from non-Linux
hosts.
2017-01-27 16:08:21 -08:00
root
c0e74ea0f9 Release v0.5.3-rc1 2017-01-24 18:30:10 +00:00
Alex Dadgar
42c5cafd2f Actually randomize the splay 2017-01-22 13:50:33 -08:00
Michael Schurter
8ab7c3ed61 Use - not _ for lxc enabled build 2016-12-15 11:06:03 -08:00
Alex Dadgar
1f6d8751f7 update hc-releases 2016-12-12 13:48:08 -08:00
root
4102eba574 Release v0.5.0-rc2 2016-11-10 19:08:15 +00:00
Seth Vargo
605710683c Simplify xc script
This is the same set of builds that we currently publish, but it groups
them into less magic.
2016-10-27 22:08:58 -04:00
Michael Schurter
31538f1ba8 Move tags into variable
Bash quoting is hard
2016-10-26 15:53:38 -07:00
Michael Schurter
aeb410c07c Put lxc support behind a flag
Since lxc support requires linking to a C lib at compile and runtime
I'm putting it behind a build flag to avoid forcing all nomad users to
install liblxc (lxc-dev for development).
2016-10-26 14:55:54 -07:00
Michael Schurter
3d828aad9c Update rkt script and test rkt in travis 2016-10-25 09:46:49 -07:00
Alex Dadgar
63ef249629 Bump Vault/Consul version 2016-10-06 14:09:39 -07:00
Alex Dadgar
fd7c8197c9 no -v 2016-09-21 14:21:37 -07:00
Alex Dadgar
857ea1fe97 bump vault version 2016-08-25 13:13:20 -07:00