Commit Graph

310 Commits

Author SHA1 Message Date
Mahmood Ali cf1f3625b4 Update ugorji/go to latest
Our testing so far indicates that ugorji/go/codec maintains backward
compatiblity with the version we are using now, for purposes of Nomad
serialization.

Using latest ugorji/go allows us to get back to using upstream library,
get get the optimizations benefits in RPC paths (including code
generation optimizations).

ugorji/go introduced two significant changes:
* time binary format in debb8e2d2e.  Setting `h.BasicHandle.TimeNotBuiltin = true` restores old behavior
* ugorji/go started honoring `json` tag as well:

v1.1.4 is the latest but has a bug in handling RawString that's fixed in
d09a80c1e0
.
2019-05-09 19:35:58 -04:00
Mahmood Ali 914d219455 use ugorji/go/codec version that's in vendor.json 2019-05-01 12:47:14 -04:00
Mahmood Ali c80de35bbe Update release/dist script with preflight
Add a preflight check to ensure that AWS credentials is configured
before creating tag.
2019-04-28 16:31:07 -04:00
Michael Lange 21647f9c3b Upgrade Yarn 2019-04-10 14:55:29 -07:00
Michael Lange 1816f02dd6 Upgrade to Node 10, latest LTS 2019-04-10 14:54:38 -07:00
Mahmood Ali 4d1a117fc2 scripts: better prerelease extractor 2019-04-08 21:42:10 -04:00
Mahmood Ali d09815a42e release: only install deps when installing
Now `prerelease` no longer requires linters
2019-03-21 15:02:09 -04:00
Mahmood Ali e80eaf752c allow configurable release target in mac 2019-03-21 14:46:35 -04:00
Mahmood Ali d4ed7aecbf
Merge pull request #5435 from hashicorp/release-scripts-20190318
Scripts for automating binary building
2019-03-20 07:26:10 -04:00
Mahmood Ali 4a9f29c1a6 release: Upgrade to use 1.11.6 golang on macOS
To correspond to the Linux scripts in 855761a5dff9b447152e8ea75a410aafa46e66dc
2019-03-19 21:18:44 -04:00
Mahmood Ali 7f911555b5 Add some release script comments 2019-03-19 21:18:27 -04:00
Michael Schurter 849865caff vagrant: upgrade to Go 1.11.6 2019-03-18 13:38:00 -07:00
Mahmood Ali 88288a1819 accept macos host as a env-var with a default 2019-03-18 15:05:32 -04:00
Mahmood Ali 77cd7f8e13 use bash set long form 2019-03-18 14:34:09 -04:00
Mahmood Ali 1bc81dc6e3 ensure node is present in PATH 2019-03-18 14:31:31 -04:00
Mahmood Ali 49f807f72c handle when no files are generated 2019-03-18 08:29:25 -04:00
Mahmood Ali 4db32eb084 initial attempt at building mac 2019-03-18 08:29:25 -04:00
Mahmood Ali 67bb6c839c remove chown 2019-03-18 08:29:22 -04:00
Mahmood Ali 67b6758bed Add a Docker release scripts
Also tease out some dev and docker bits from Vagrant scripts to ease
sharing with Docker script
2019-03-17 10:37:36 -04:00
Robert James Hernandez 754f11d799 Fix freebsd vagrant priv config for vim-tiny 2019-03-13 19:21:59 -07:00
Michael Schurter 798a25f9c5
Merge pull request #5270 from hashicorp/f-install-protoc-gen-go
install specific version of protoc-gen-go
2019-01-30 10:05:46 -08:00
Michael Schurter 17a8c6639c Install versioned release of codecgen
Gets us one step closer to a reproducible build. Also removes the unused
vendored version.
2019-01-30 08:00:17 -08:00
Michael Schurter f6d760298b fix perms in protoc installer 2019-01-30 07:57:57 -08:00
Michael Schurter 32fd800583 install specific version of protoc-gen-go 2019-01-30 07:57:40 -08:00
Mahmood Ali 6fb80e5cc2 ci: ignore background ping errors
We attempt to kill background ping process twice, and sometimes the
second kill fails, e.g.
https://travis-ci.org/hashicorp/nomad/jobs/486050357, let's not fail the job.
2019-01-29 21:21:32 -05:00
Mahmood Ali 32aa667592
dev: use golang 1.11.5
Use latest Golang point release at this time for development.
2019-01-28 15:05:47 -05:00
Mahmood Ali d696143da7 ci: run checkscripts
`travis.sh` contained some bash-ism despite it being invoked with `sh`.
2019-01-23 10:54:52 -05:00
Mahmood Ali 62a7f951c0 remove lxc references 2019-01-08 09:28:20 -05:00
Mahmood Ali c999400208 dev: upgrade go to 1.11.3 2018-12-14 09:42:23 -05:00
Mahmood Ali 76bc2a3fd0 ci: install lxc-templates explicitly
LXC package on Ubuntu 16.04 doesn't depend on lxc-template, but we
require it in our tests.
2018-12-11 15:49:11 -05:00
Mahmood Ali 683a74d153 Ignore apt-get update failures in CI
We run with ~120 apt sources, and apt-get update fails if any of them is
down.

True errors would be raised again at install phase as true dependencies
fetch would fail.
;
2018-11-13 10:21:40 -05:00
Chris Baker bd55ff8f30 renamed vagrant script to accurately reflect non-privileged requirement 2018-10-05 10:07:05 -04:00
Chris Baker 014184749f vagrant: updated go_version to 1.11 in vagrant-linux go provisioning script 2018-10-04 19:06:35 -04:00
Alex Dadgar 7f5c37de75 Remove old protoc installer 2018-08-01 13:51:45 -07:00
Alex Dadgar 95ccfd6ae1 Add protoc to project 2018-08-01 13:50:08 -07:00
Chelsea Holland Komlo ccf60ac6c8 update to latest protoc version 2018-08-01 10:52:50 -04:00
Chelsea Holland Komlo 1ba5b8170d correct operating system 2018-07-31 15:44:02 -04:00
Chelsea Holland Komlo 24400bca8c bootstrap vagrant development environment with protoc 2018-07-31 15:26:57 -04:00
Michael Lange a17b07b48b
Merge pull request #4410 from hashicorp/b-ui-update-vagrant
UI: update vagrant
2018-06-13 15:49:40 -07:00
Michael Lange b0553b8585 Add chrome to the ui vagrant machine
It's used for running acceptance tests
2018-06-12 17:44:53 -07:00
Alex Dadgar 4408f334eb Vagrant 2018-06-12 09:40:10 -07:00
Alex Dadgar d776e8a55d bump travis version 2018-06-12 09:39:31 -07:00
Michael Lange b4d2921783 Update nvm, node, and yarn in vagrant 2018-06-11 16:22:52 -07:00
Chelsea Holland Komlo e70aa124b4 upgrade nomad to 1.10.2 2018-05-21 17:24:51 -04:00
Alex Dadgar 315564ae94 Bump versions 2018-04-13 16:16:16 -07:00
Michael Schurter 45b4d5c81d Bump Go to 1.10 in Vagrantfile 2018-03-16 16:17:16 -07:00
Michael Schurter 101e85f078
Merge pull request #3819 from schmichael/qemu-graceful-shutdown-alpine
Test QEMU graceful shutdown
2018-02-12 12:32:14 -08:00
Wim 6e5bdaafa8 Add IPv6 support to travis docker 2018-02-01 23:21:28 +01:00
Michael Schurter 0ac43a7622 Skip QEMU graceful shutdown test except on Travis
Hopefully we can reuse the SkipSlow helper elsewhere.
2018-01-31 15:47:26 -08:00
Michael Schurter 831c6b4e24 Update Consul/rkt/Vault in Vagrant
Needed to update Vault for #3334
2018-01-09 15:57:42 -08:00
Preetha 1712b03705
Merge branch 'master' into 0.8 2018-01-03 16:06:38 -06:00
Michael Lange 7a7c8204a7 Lock down nodejs version
The new Travis Trusty image uses node 8 (latest LTS) as the default.
Node 8 is incompatible with some modules used for the UI.
2017-12-15 10:50:06 -08:00
Preetha Appan 309cd31d57
Merge branch 'master' into 0.8 2017-12-12 15:49:47 -06:00
Michael Schurter 85590a67c1 chown $GOPATH for vagrant user 2017-12-11 17:06:07 -08:00
Preetha Appan d8ecdd2bf9
Makes tests on travis not run in verbose mode. 2017-12-06 13:30:31 -06:00
Alex Dadgar ec5e23065c bump go 2017-11-14 15:06:41 -08:00
Alex Dadgar f83b34ae93 Run linters 2017-11-02 16:37:46 -07:00
Alex Dadgar 5f76b4b4b2 show env 2017-11-02 16:24:15 -07:00
Alex Dadgar b335661363 seperate linting from testing 2017-10-24 10:52:26 -07:00
Alex Dadgar 17928aaf51 bump vault and install on darwin 2017-10-21 17:23:42 -07:00
Alex Dadgar c41c0ea6e8 Only check scripts on linux and don't double lint 2017-10-19 16:49:58 -07:00
Alex Dadgar b0989f87ac install to local bin 2017-10-19 16:49:58 -07:00
Alex Dadgar 2dbeced72f Rm upgrading go 2017-10-19 16:49:58 -07:00
Alex Dadgar 8c67d4d753 split privilidged calls to two scripts 2017-10-19 16:49:58 -07:00
Alex Dadgar 892a970ea3 travis 2017-10-19 16:49:58 -07:00
Michael Schurter d214242556 Bump Consul to 1.0.0 in vagrant/travis 2017-10-16 14:10:39 -07:00
Lasse Dalegaard 3a6d065c8e Add rkt default network to Travis
The current Travis setup scripts copy in rkt, but do not set up a
default container network.

Here we copy the container network setup over from the vagrant setup
scripts.
2017-09-26 22:20:01 +02:00
Lasse Dalegaard 3d25fd3b00 Bump minimum rkt version to 1.27.0.
The changes introduces in #3256 require at least rkt 1.27.0 because of
a bug in the JSON output of `rkt status` in previous versions.

Here we upgrade all references to rkt's minimum version, and also make
travis and vagrant use this version when running tests.

Finally we add a CHANGELOG notice.
2017-09-26 19:15:43 +02:00
Michael Schurter a3a0102780 Fix shellcheck's complaints about find loop 2017-09-19 17:41:20 -05:00
Alex Dadgar caa75460fa
Release v0.7.0-beta1 2017-09-19 12:56:28 -05:00
Alex Dadgar e5ec915ac3 sync 2017-09-19 10:08:23 -05:00
Michael Schurter 566f2ee061 Fix permissions of $GOPATH in Vagrantfile
Technically just the true->false is needed. The `chown -R` was a first
attempt that didn't fix the bug, but it's a nice simplification.
2017-09-11 22:38:10 -07:00
James Nugent 12d41dbfe0 build: Lint shell scripts, and make all shell scripts lint cleanly 2017-09-08 19:50:39 -05:00
James Nugent 72028fd5b3 build: Install Go in Vagrant from official release 2017-09-08 19:46:07 -05:00
James Nugent dc40420b51 build: Fix Travis following Vagrant changes 2017-09-08 19:45:41 -05:00
James Nugent 094fa23df6 build: Rework Vagrant to support multiple OS boxes
This commit reworks the Vagrantfile for Nomad in order to support
straightforward testing on more than one operating system, whilst
retaining the ability to stand up a test cluster running Ubuntu.

The following changes are made:

- Scripts have been extracted from the Vagrantfile into their own shell
  script files, in order that editors lint them.

- All scripts have been edited to lint with no warnings or errors for
  their respective shells.

- Scripts are named according to the operating system and privilege
  level which they run. We prefer to run a whole shell script as root
  versus prefixing (essentially) every command with `sudo` or an
  equivalent.

- The Linux development box has been separated from the test cluster,
  removing some of the more gnarly (and less portable) logic. The Linux
  development box is still primary and autostarts.

- A FreeBSD target has been added. The base box works for both
  Virtualbox and VMWare Fusion.

- A target is added to the GNUmakefile to stand up a test cluster, using
  the default provider, or overriding the provider by setting the PROVIDER
  variable in make:
	- `make testcluster`
	- `make testcluster PROVIDER=vmware_fusion`

- Machines in the test cluster have Avahi configured for zeroconf
  discovery. Each machine can ping each other machine at `hostname.local`
  - for example `nomad-server02.local`, `nomad-client03.local`.
2017-09-08 19:45:38 -05:00
Alex Dadgar 139ec4916c bump consul version 2017-08-23 10:45:54 -07:00
James Nugent 196cdf4e64 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 1a86aecf55 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 27ec9b1428 reset travis script 2017-07-22 22:25:20 -07:00
Alex Dadgar b1b61b892a whats going on 2017-07-22 21:44:53 -07:00
Alex Dadgar 553bc91725 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 9e9c20ca77 small fixes 2017-07-22 12:25:02 -07:00
Alex Dadgar c355250fca Force parallelism on travis 2017-07-20 22:47:10 -07:00
Alex Dadgar c8ad00aff6 Undo verbose and parallel on tests 2017-07-20 20:28:31 -07:00
Alex Dadgar 7e9d1ede6e verbose and parallel 2017-07-20 09:57:39 -07:00
Michael Schurter a296a24215 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 8b93ec023c Fixup example 2017-06-21 17:19:08 -07:00
Michael Schurter 7fd41b778d Add script to demo weave in vagrant 2017-06-21 17:19:08 -07:00
Michael Schurter 8d677bc6b9 Fix lxc tests 2017-06-21 17:19:08 -07:00
Michael Schurter 21dff59304 Update go-winio to remove cgo on Windows
Thanks to Microsoft/go-winio#51
2017-05-08 15:43:48 -07:00
Michael Schurter a2a8af471a go-winio now requires cgo which requires mingw 2017-05-03 17:09:12 -07:00
Alex Dadgar a4ef87c6e5 bump vault 2017-03-27 10:10:42 -07:00
Lev Walkin 4bb5b74489 ensuring bin directory exists before copying 2017-03-17 17:23:15 -07:00
Michael Schurter 06a4d3c6cd Fix overriding build targets 2017-03-14 10:47:29 -07:00
Michael Schurter 1f6090371b 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 518e4f75a6 Replace "-" in env var keys with "_"
Fixes #2405
2017-03-06 19:57:44 -08:00
Alex Dadgar 9f65ca42cc auto release 2017-03-03 16:06:31 -08:00
Alex Dadgar 0124ba1406 Fix docs and script 2017-03-03 16:00:39 -08:00
Jonathan Wright 87b84c71a6 Fix spelling error for CGO_ENABLED variable in build script 2017-03-01 19:21:46 +00:00
Michael Schurter 2f0a5e355e Oops! Don't try to build darwin on Linux.
Someday maybe
2017-02-23 16:58:21 -08:00
Michael Schurter 885f4ae9f9 Allow building specific targets 2017-02-23 13:27:28 -08:00
Michael Schurter f2cf2b1df1 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 d318e5bc38 Add windows exe extension 2017-02-05 13:17:13 -08:00
Diptanu Choudhury b6c629a6b9 fixed conflicts 2017-01-31 13:20:58 -08:00
Michael Schurter 13e3ce5c71 Fix some bash; uuuuuuuuuugh 2017-01-27 16:08:21 -08:00
Michael Schurter 0059bca6b3 Prettify output 2017-01-27 16:08:21 -08:00
Michael Schurter a0d792ea77 Fix `vagrant provision` with a bunch of guards 2017-01-27 16:08:21 -08:00
Michael Schurter d2bc719a26 Bump rkt version; simplify script 2017-01-27 16:08:21 -08:00
Michael Schurter 5cd710bd8e 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 6a085080bc Split out massive list of cross compile deps+cmds 2017-01-27 16:08:21 -08:00
Michael Schurter e620336a0c Install crosscompile dep to build arm in Vagrant 2017-01-27 16:08:21 -08:00
Michael Schurter 2a383b8de8 Cache build deps prior to running tests 2017-01-27 16:08:21 -08:00
Michael Schurter 6a5fa593fa 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 c3869ffd73
Release v0.5.3-rc1 2017-01-24 18:30:10 +00:00
Alex Dadgar d051065229 Actually randomize the splay 2017-01-22 13:50:33 -08:00
Michael Schurter 81a709e6d4 Use - not _ for lxc enabled build 2016-12-15 11:06:03 -08:00
Alex Dadgar 0609f48bd3 update hc-releases 2016-12-12 13:48:08 -08:00
root 8c1bdc0342
Release v0.5.0-rc2 2016-11-10 19:08:15 +00:00
Seth Vargo de0c9d3911
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 7899fb1f63 Move tags into variable
Bash quoting is hard
2016-10-26 15:53:38 -07:00
Michael Schurter f430203505 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 0cd3763a10 Update rkt script and test rkt in travis 2016-10-25 09:46:49 -07:00
Alex Dadgar 7e466ee9d2 Bump Vault/Consul version 2016-10-06 14:09:39 -07:00
Alex Dadgar 15e6c724ae no -v 2016-09-21 14:21:37 -07:00
Alex Dadgar d690d0afdc bump vault version 2016-08-25 13:13:20 -07:00
Alex Dadgar db2806a9c1 Merge pull request #1629 from hashicorp/f-derive-token
Server Deriving Tokens on behalf of Clients
2016-08-23 13:58:47 -07:00
Diptanu Choudhury 1e1eef56a1 Putting the mock driver behind a build flag 2016-08-22 15:02:28 -05:00
Alex Dadgar 01cc43d452 Add set -e 2016-08-19 16:40:37 -07:00
Alex Dadgar 2f6f840453 install scripts 2016-08-17 16:25:38 -07:00
Diptanu Choudhury e1ccf5aedd Changed build script 2016-08-17 15:18:37 -07:00
Alex Dadgar 0f6e71a3d8 More advance travis timeout circumvention 2016-08-16 21:46:53 -07:00
Alex Dadgar 2b2bb37a07 change test script 2016-08-16 12:32:29 -07:00
vagrant dbbb20dd99
Release v0.4.1-rc1 2016-08-13 01:02:08 +00:00
Diptanu Choudhury 7fbb661756 Enabled cgo 2016-08-12 17:34:54 -07:00
Diptanu Choudhury d1a4acb300 Updated the build script 2016-08-12 15:55:39 -07:00
Diptanu Choudhury 10a5c06a5a Running the tests in verbose mode 2016-07-26 14:02:47 -07:00
Sean Chittenden 8172f1c9ed
Use anchored regexp for filtering vendored tests 2016-07-12 02:15:42 -04:00
Sean Chittenden fd1986496e
... oh wow. This is an "improvement." 2016-07-11 13:06:00 -07:00
Sean Chittenden 8e9e344ddf
When sudo(1)'ing to run the tests, use the abspath of the current user's
go(1) instead of whatever is in root's PATH.
2016-07-11 12:49:26 -07:00
Sean Chittenden e1b4c465f2
Add debugging to figure out why Travis can't find `go(1)` when sudo'ing
but xargs(1) could.
2016-07-11 12:41:14 -07:00
Sean Chittenden 74aacd799a
Remove xargs(1) from testing and rely on `go test -v`.
Tests are approaching 30min largely due to recompiling every package.
Out of a ~30min build, only ~5min are actually spent running the tests,
the remaining time is spent recompiling.
2016-07-11 12:31:21 -07:00
Alex Dadgar 5a09c44517 Add OSs back to build script 2016-06-28 14:30:02 -07:00
Alex Dadgar e207339e80
Release v0.4.0 2016-06-28 14:26:34 -07:00
Diptanu Choudhury ac724e2800 Revert changes to build script 2016-06-22 17:01:53 -07:00
vagrant 0a6e2a245c
Release v0.4.0-rc2 2016-06-22 23:50:29 +00:00
Sean Chittenden faea8921d6
Remove the FreeBSD exclusion rule.
Other *NIX systems may be eligible for being removed from this list
but I am not in a position to support or test them at present.
2016-06-16 23:07:13 -07:00
Sean Chittenden 8f01a2e638
Allow test flags to be overridden from the environment. 2016-06-16 18:26:31 -07:00
Alex Dadgar a4826e7471 increase timeout 2016-06-15 15:42:44 -07:00
Alex Dadgar 5917af7da2 up test timeout 2016-06-13 23:08:24 -07:00