Skip to content

Commit

Permalink
DO NOT MERGE: switch to go modules
Browse files Browse the repository at this point in the history
  • Loading branch information
shoenig committed May 30, 2020
1 parent c4416b2 commit f7d8cd7
Show file tree
Hide file tree
Showing 3,844 changed files with 447,168 additions and 763,131 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion .circleci/config.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .circleci/config/jobs/build-darwin-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ steps:
target_directory: ~/goinstall
- run: source ${BASH_ENV} && make deps
- run: brew install protobuf
- run: sudo -E PATH="$GOPATH/bin:${HOME}/goinstall/go/bin:$PATH" make generate-structs
- run: PATH="$GOPATH/bin:${HOME}/goinstall/go/bin:$PATH" make generate-structs
- run: source ${BASH_ENV} && make pkg/darwin_amd64.zip
- store_artifacts:
path: pkg/darwin_amd64.zip
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ nomad_linux_amd64
nomad_darwin_amd64
TODO.md
codecgen-*.generated.go
**/structs.generated.go
GNUMakefile.local

.terraform
Expand Down Expand Up @@ -104,3 +105,6 @@ azure-hashistack.pem

# generated keys for e2e tests
e2e/terraform/keys/

# darwin CGO files copied for build
vendor/github.com/shirou/gopsutil/host/include/
40 changes: 20 additions & 20 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ endif
# On MacOS, we only build for MacOS
ifeq (Darwin,$(THIS_OS))
ALL_TARGETS += darwin_amd64
# Copy CGO files for darwin into place
$(shell cp -R lib/darwin/include vendor/github.com/shirou/gopsutil/host)
endif

# On FreeBSD, we only build for FreeBSD
Expand Down Expand Up @@ -166,22 +168,22 @@ bootstrap: deps lint-deps git-hooks # Install all dependencies

.PHONY: deps
deps: ## Install build and development dependencies
## Keep versions in sync with tools/go.mod for now (see https://github.com/golang/go/issues/30515)
@echo "==> Updating build dependencies..."
GO111MODULE=on go get -u github.com/kardianos/govendor
GO111MODULE=on go get -u github.com/hashicorp/go-bindata/go-bindata@master
GO111MODULE=on go get -u github.com/elazarl/go-bindata-assetfs/go-bindata-assetfs@master
GO111MODULE=on go get -u github.com/a8m/tree/cmd/tree
GO111MODULE=on go get -u github.com/magiconair/vendorfmt/cmd/vendorfmt
GO111MODULE=on go get -u gotest.tools/gotestsum
GO111MODULE=on go get -u github.com/hashicorp/hcl/v2/cmd/hclfmt@v2.5.1
GO111MODULE=on go get -u github.com/golang/protobuf/protoc-gen-go@v1.3.4
GO111MODULE=on go get -u github.com/hashicorp/go-msgpack/codec/codecgen@v1.1.5
GO111MODULE=on cd tools && go get github.com/hashicorp/go-bindata/go-bindata@v3.0.7+incompatible
GO111MODULE=on cd tools && go get github.com/elazarl/go-bindata-assetfs/go-bindata-assetfs@v1.0.0
GO111MODULE=on cd tools && go get github.com/a8m/tree/cmd/tree
GO111MODULE=on cd tools && go get gotest.tools/gotestsum@v0.4.2
GO111MODULE=on cd tools && go get github.com/hashicorp/hcl/v2/cmd/hclfmt@v2.5.1
GO111MODULE=on cd tools && go get github.com/golang/protobuf/protoc-gen-go@v1.3.4
GO111MODULE=on cd tools && go get github.com/hashicorp/go-msgpack/codec/codecgen@v1.1.5

.PHONY: lint-deps
lint-deps: ## Install linter dependencies
## Keep versions in sync with tools/go.mod (see https://github.com/golang/go/issues/30515)
@echo "==> Updating linter dependencies..."
GO111MODULE=on go get -u github.com/golangci/golangci-lint/cmd/golangci-lint@v1.24.0
GO111MODULE=on go get -u github.com/client9/misspell/cmd/misspell
GO111MODULE=on cd tools && go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.24.0
GO111MODULE=on cd tools && go get github.com/client9/misspell/cmd/misspell@v0.3.4

.PHONY: git-hooks
git-dir = $(shell git rev-parse --git-dir)
Expand Down Expand Up @@ -209,9 +211,6 @@ check: ## Lint the source code
@echo "==> Check API package is isolated from rest"
@if go list --test -f '{{ join .Deps "\n" }}' ./api | grep github.com/hashicorp/nomad/ | grep -v -e /vendor/ -e /nomad/api/ -e nomad/api.test; then echo " /api package depends the ^^ above internal nomad packages. Remove such dependency"; exit 1; fi

@echo "==> Check non-vendored packages"
@if go list --test -tags "$(GO_TAGS)" -f '{{join .Deps "\n"}}' . | grep -v github.com/hashicorp/nomad.test | xargs go list -tags "$(GO_TAGS)" -f '{{if not .Standard}}{{.ImportPath}}{{end}}' | grep -v -e github.com/hashicorp/nomad; then echo " found referenced packages ^^ that are not vendored"; exit 1; fi

.PHONY: checkscripts
checkscripts: ## Lint shell scripts
@echo "==> Linting scripts..."
Expand Down Expand Up @@ -239,11 +238,6 @@ generate-examples: command/job_init.bindata_assetfs.go
command/job_init.bindata_assetfs.go: command/assets/*
go-bindata-assetfs -pkg command -o command/job_init.bindata_assetfs.go ./command/assets/...

.PHONY: vendorfmt
vendorfmt:
@echo "--> Formatting vendor/vendor.json"
vendorfmt

.PHONY: changelogfmt
changelogfmt:
@echo "--> Making [GH-xxxx] references clickable..."
Expand All @@ -257,12 +251,18 @@ hclfmt:
@find . -path ./terraform -prune -o -name 'upstart.nomad' -prune -o \( -name '*.nomad' -o -name '*.hcl' \) -exec \
sh -c 'hclfmt -w {} || echo in path {}' ';'

.PHONY: sync
sync:
@echo "--> Sync vendor directory and tidy up"
@go mod vendor
@go mod tidy

.PHONY: dev
dev: GOOS=$(shell go env GOOS)
dev: GOARCH=$(shell go env GOARCH)
dev: GOPATH=$(shell go env GOPATH)
dev: DEV_TARGET=pkg/$(GOOS)_$(GOARCH)/nomad
dev: vendorfmt changelogfmt hclfmt ## Build for the current development platform
dev: sync changelogfmt hclfmt ## Build for the current development platform
@echo "==> Removing old development build..."
@rm -f $(PROJECT_ROOT)/$(DEV_TARGET)
@rm -f $(PROJECT_ROOT)/bin/nomad
Expand Down
258 changes: 41 additions & 217 deletions command/job_init.bindata_assetfs.go

Large diffs are not rendered by default.

147 changes: 147 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
module github.com/hashicorp/nomad

go 1.14

replace (
github.com/Microsoft/go-winio => github.com/endocrimes/go-winio v0.4.13-0.20190628114223-fb47a8b41948
github.com/apparentlymart/go-textseg/v12 => github.com/apparentlymart/go-textseg/v12 v12.0.0
github.com/godbus/dbus => github.com/godbus/dbus v5.0.1+incompatible
github.com/hashicorp/nomad/api => ./api
github.com/kr/pty => github.com/kr/pty v1.1.5
)

require (
cloud.google.com/go/storage v1.0.0 // indirect
contrib.go.opencensus.io/exporter/ocagent v0.4.12 // indirect
github.com/Azure/azure-sdk-for-go v29.0.0+incompatible // indirect
github.com/Azure/go-autorest v11.7.1+incompatible // indirect
github.com/LK4D4/joincontext v0.0.0-20171026170139-1724345da6d5
github.com/Microsoft/go-winio v0.4.15-0.20200113171025-3fe6c5262873
github.com/Microsoft/hcsshim v0.8.8-0.20200312192636-fd0797d766b1 // indirect
github.com/NVIDIA/gpu-monitoring-tools v0.0.0-20180829222009-86f2a9fac6c5
github.com/NYTimes/gziphandler v1.1.1
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e
github.com/armon/go-metrics v0.3.3
github.com/aws/aws-sdk-go v1.25.41
github.com/boltdb/bolt v1.3.1
github.com/checkpoint-restore/go-criu v0.0.0-20190109184317-bdb7599cd87b // indirect
github.com/container-storage-interface/spec v1.2.0-rc1.0.20191021210849-a33ece0a8a9f
github.com/containerd/console v1.0.0 // indirect
github.com/containerd/go-cni v0.0.0-20190904155053-d20b7eebc7ee
github.com/containernetworking/cni v0.7.2-0.20190612152420-dc953e2fd91f // indirect
github.com/containernetworking/plugins v0.7.3-0.20190501191748-2d6d46d308b2
github.com/coreos/go-iptables v0.4.3-0.20190724151750-969b135e941d
github.com/coreos/go-semver v0.3.0
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f // indirect
github.com/cyphar/filepath-securejoin v0.2.3-0.20190205144030-7efe413b52e1 // indirect
github.com/docker/cli v0.0.0-20200303215952-eb310fca4956
github.com/docker/distribution v2.7.1+incompatible
github.com/docker/docker v17.12.0-ce-rc1.0.20200330121334-7f8b4b621b5d+incompatible
github.com/docker/docker-credential-helpers v0.6.2-0.20180719074751-73e5f5dbfea3 // indirect
github.com/docker/go-units v0.4.0
github.com/dustin/go-humanize v1.0.0
github.com/elazarl/go-bindata-assetfs v1.0.1-0.20200509193318-234c15e7648f
github.com/fatih/color v1.9.0
github.com/fsnotify/fsnotify v1.4.9 // indirect
github.com/fsouza/go-dockerclient v1.6.5
github.com/golang/protobuf v1.3.4
github.com/golang/snappy v0.0.1
github.com/google/go-cmp v0.4.0
github.com/gorilla/websocket v1.4.2
github.com/grpc-ecosystem/go-grpc-middleware v1.2.1-0.20200228141219-3ce3d519df39
github.com/grpc-ecosystem/grpc-gateway v1.9.0 // indirect
github.com/hashicorp/consul v1.7.1-0.20200213195527-b137060630b4
github.com/hashicorp/consul-template v0.24.1
github.com/hashicorp/consul/api v1.4.0
github.com/hashicorp/consul/sdk v0.4.0
github.com/hashicorp/cronexpr v1.1.0
github.com/hashicorp/go-checkpoint v0.0.0-20171009173528-1545e56e46de
github.com/hashicorp/go-cleanhttp v0.5.1
github.com/hashicorp/go-connlimit v0.2.0
github.com/hashicorp/go-discover v0.0.0-20200108194735-7698de1390a1
github.com/hashicorp/go-envparse v0.0.0-20180119215841-310ca1881b22
github.com/hashicorp/go-getter v1.3.1-0.20190822194507-f5101da01173
github.com/hashicorp/go-hclog v0.12.0
github.com/hashicorp/go-immutable-radix v1.2.0
github.com/hashicorp/go-memdb v1.2.1
github.com/hashicorp/go-msgpack v1.1.5
github.com/hashicorp/go-multierror v1.0.1-0.20191120192120-72917a1559e1
github.com/hashicorp/go-plugin v1.0.2-0.20191004171845-809113480b55
github.com/hashicorp/go-sockaddr v1.0.2
github.com/hashicorp/go-syslog v1.0.0
github.com/hashicorp/go-uuid v1.0.1
github.com/hashicorp/go-version v1.2.1-0.20191009193637-2046c9d0f0b0
github.com/hashicorp/golang-lru v0.5.4
github.com/hashicorp/hcl v1.0.1-0.20191016231534-914dc3f8dd7c
github.com/hashicorp/hcl/v2 v2.5.1
github.com/hashicorp/logutils v1.0.0
github.com/hashicorp/memberlist v0.1.6
github.com/hashicorp/net-rpc-msgpackrpc v0.0.0-20151116020338-a14192a58a69
github.com/hashicorp/nomad/api v0.0.0-20200529203653-c4416b26d3eb
github.com/hashicorp/raft v1.1.3-0.20200211192230-365023de17e6
github.com/hashicorp/raft-boltdb v0.0.0-20171010151810-6e5ba93211ea
github.com/hashicorp/serf v0.8.5
github.com/hashicorp/vault/api v1.0.5-0.20190730042357-746c0b111519
github.com/hashicorp/vault/sdk v0.1.14-0.20190730042320-0dc007d98cc8
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d
github.com/hpcloud/tail v1.0.1-0.20170814160653-37f427138745
github.com/joyent/triton-go v0.0.0-20190112182421-51ffac552869 // indirect
github.com/kr/pretty v0.2.0
github.com/kr/pty v1.1.5
github.com/kr/text v0.2.0
github.com/mattn/go-colorable v0.1.6
github.com/mitchellh/cli v1.0.0
github.com/mitchellh/colorstring v0.0.0-20150917214807-8631ce90f286
github.com/mitchellh/copystructure v1.0.0
github.com/mitchellh/go-ps v0.0.0-20190716172923-621e5597135b
github.com/mitchellh/go-testing-interface v1.0.0
github.com/mitchellh/hashstructure v1.0.0
github.com/mitchellh/mapstructure v1.3.1
github.com/mrunalp/fileutils v0.0.0-20171103030105-7d4729fb3618 // indirect
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
github.com/oklog/run v1.0.1-0.20180308005104-6934b124db28 // indirect
github.com/onsi/ginkgo v1.12.0
github.com/onsi/gomega v1.9.0
github.com/opencontainers/runc v1.0.0-rc7
github.com/opencontainers/runtime-spec v1.0.2-0.20200307132014-f49fed0d6290 // indirect
github.com/opencontainers/selinux v1.4.1-0.20200311111634-a2f0d9c2aafc // indirect
github.com/pkg/errors v0.9.1
github.com/posener/complete v1.2.1
github.com/prometheus/client_golang v1.4.0
github.com/prometheus/common v0.9.1
github.com/rs/cors v0.0.0-20170801073201-eabcc6af4bbe
github.com/ryanuber/columnize v2.1.1-0.20170703205827-abc90934186a+incompatible
github.com/ryanuber/go-glob v1.0.0
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529
github.com/seccomp/libseccomp-golang v0.9.2-0.20200314001724-bdab42bd5128 // indirect
github.com/shirou/gopsutil v2.20.2+incompatible
github.com/sirupsen/logrus v1.6.0 // indirect
github.com/skratchdot/open-golang v0.0.0-20160302144031-75fb7ed4208c
github.com/stretchr/objx v0.2.0 // indirect
github.com/stretchr/testify v1.5.1
github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8
github.com/vishvananda/netlink v1.1.0 // indirect
github.com/zclconf/go-cty v1.4.1
go.opencensus.io v0.22.1-0.20190713072201-b4a14686f0a9 // indirect
golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37
golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136 // indirect
golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f // indirect
golang.org/x/mod v0.3.0 // indirect
golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d // indirect
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a
golang.org/x/sys v0.0.0-20200523222454-059865788121
golang.org/x/text v0.3.3-0.20200306154105-06d492aade88 // indirect
golang.org/x/time v0.0.0-20191024005414-555d28b269f0
golang.org/x/tools v0.0.0-20200522201501-cb1345f3a375 // indirect
google.golang.org/api v0.13.0 // indirect
google.golang.org/genproto v0.0.0-20200302123026-7795fca6ccb1 // indirect
google.golang.org/grpc v1.27.1
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
gopkg.in/square/go-jose.v2 v2.4.1 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7
gopkg.in/tomb.v2 v2.0.0-20140626144623-14b3d72120e8
gopkg.in/yaml.v2 v2.3.0 // indirect
gotest.tools/v3 v3.0.2 // indirect
honnef.co/go/tools v0.0.1-2020.1.4 // indirect
)
Loading

0 comments on commit f7d8cd7

Please sign in to comment.