Skip to content

all: change package manager from dep to go mod #1542

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 59 commits into from
Sep 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
5efb05b
all: update ci config to use modules instead of dep
leighmcculloch Aug 22, 2019
b93cc12
all: go mod init
leighmcculloch Aug 27, 2019
0a5340c
all: go mod tidy -v
leighmcculloch Aug 27, 2019
fe6d560
all: go get github.com/gobuffalo/[email protected]
leighmcculloch Aug 27, 2019
14b71a2
all: go get github.com/spf13/cobra@9c28e4bbd74e
leighmcculloch Aug 27, 2019
1276060
all: go mod tidy -v
leighmcculloch Aug 27, 2019
6f22cd4
all: go get github.com/BurntSushi/toml@99064174e013
leighmcculloch Aug 27, 2019
bcc75be
all: go get github.com/spf13/viper@db7ff930a189, go mod tidy
leighmcculloch Aug 27, 2019
df5cc8b
all: go get github.com/mitchellh/mapstructure@2caf8efc9366, go mod tidy
leighmcculloch Aug 27, 2019
6c3532b
all: go get github.com/kr/pretty@e6ac2fc51e89, go mod tidy
leighmcculloch Aug 27, 2019
38738e4
all: go get github.com/kr/text@e373e137fafd, go mod tidy
leighmcculloch Aug 27, 2019
68d88b3
all: go get github.com/sirupsen/logrus@070c81def33f, go mod tidy
leighmcculloch Aug 27, 2019
f9ea809
all: go get github.com/spf13/pflag@4bd69631f475, go mod tidy
leighmcculloch Aug 28, 2019
c291ffc
all: go get github.com/spf13/jwalterweatherman@3d60171a6431, go mod tidy
leighmcculloch Aug 28, 2019
19191c9
all: go get github.com/magiconair/[email protected], go mod tidy
leighmcculloch Aug 28, 2019
3f8902d
all: go get github.com/spf13/cast@4d07383ffe94, go mod tidy
leighmcculloch Aug 28, 2019
40cf077
all: go get github.com/davecgh/go-spew@5215b55f46b2, go mod tidy
leighmcculloch Aug 28, 2019
cc23c73
all: go get github.com/stretchr/testify@976c720a22c8, go mod tidy
leighmcculloch Aug 28, 2019
d027cf9
all: go get github.com/stretchr/objx@1a9d0bb9f541, go mod tidy
leighmcculloch Aug 28, 2019
64b74c7
all: commit go.sum file
leighmcculloch Aug 28, 2019
6daecee
all: commit go.list file generated with go list -m all > go.list
leighmcculloch Aug 28, 2019
53ba6a2
Download dependencies in an earlier step
leighmcculloch Aug 28, 2019
c0205ed
all: change the install process for staticcheck to leverage modules
leighmcculloch Aug 29, 2019
0917e0e
all: add check of dependencies
leighmcculloch Aug 29, 2019
18716c2
all: add checks and tests running with go1.13rc1
leighmcculloch Aug 29, 2019
78830dd
all: do a check of deps before building for publishing
leighmcculloch Aug 29, 2019
e2acfa7
all: allow install of a newer versions of some packages for buster im…
leighmcculloch Aug 29, 2019
0847ac5
doc: update readmes with new building instructions
leighmcculloch Aug 29, 2019
a8fa5c0
all: update travis.yml with modules and go1.13rc1
leighmcculloch Aug 29, 2019
14ee6e6
all: update dockerfiles with modules
leighmcculloch Aug 29, 2019
16b8456
all: set go.mod's go directive to go 1.11
leighmcculloch Aug 29, 2019
c260699
all: run travis builds on the latest minor release of each
leighmcculloch Aug 29, 2019
a792e7b
doc: increase min version of Go to 1.11.4
leighmcculloch Aug 29, 2019
e9516b2
all: cache go mod download
leighmcculloch Aug 29, 2019
671cbc9
Merge branch 'master' into gomod
leighmcculloch Aug 29, 2019
c66ce3c
Merge branch 'master' into gomod
leighmcculloch Aug 29, 2019
26f7f41
all: use new git repo for gocheck
leighmcculloch Aug 29, 2019
ce42194
all: use new git repo for gocheck
leighmcculloch Aug 29, 2019
5f67679
all: skip go.sum checks for go 1.11.* because it is inconsistent with…
leighmcculloch Aug 29, 2019
1817d30
Merge branch 'master' into gomod
leighmcculloch Aug 29, 2019
685c749
all: remove reference to dep in dockerfile
leighmcculloch Aug 29, 2019
ba9c321
all: remove reference to dep in horizon dockerfile
leighmcculloch Aug 29, 2019
c944dbc
all: remove curl in horizon dockerfile because was only needed for dep
leighmcculloch Aug 29, 2019
530ece8
doc: remove mention of go-dep
leighmcculloch Aug 29, 2019
e02edd7
doc: remove mention of dep in developing documentation
leighmcculloch Aug 29, 2019
7a6049f
doc: update min Go required to go1.11.4
leighmcculloch Aug 29, 2019
319e04a
doc: improve developer building instructions
leighmcculloch Aug 29, 2019
b7c4a70
all: install postgres-client-9.6 via postgres apt
leighmcculloch Aug 29, 2019
eebfd69
all: go get github.com/rcrowley/go-metrics@51425a2415d2, go mod tidy
leighmcculloch Aug 30, 2019
98b379e
Merge branch 'master' into gomod
bartekn Aug 30, 2019
9823949
Merge branch 'master' into gomod
leighmcculloch Aug 30, 2019
8254406
Merge branch 'gomod' of github.com:leighmcculloch/stellar-go into gomod
leighmcculloch Aug 30, 2019
f355dea
Merge branch 'master' into gomod
leighmcculloch Aug 30, 2019
d396c46
all: remove duplicate steps from poor copy and paste
leighmcculloch Aug 30, 2019
d496720
Merge branch 'master' into gomod
leighmcculloch Aug 30, 2019
f7f1809
all: go get golang.org/x/net@ba9fcec4b297b415637633c5a6e8fa592e4a16c3…
leighmcculloch Sep 3, 2019
3fa0192
Merge branch 'master' into gomod
leighmcculloch Sep 3, 2019
51960cd
all: use a cache key that references go.mod too
leighmcculloch Sep 3, 2019
1e9a252
all: remove dep files: Gopkg.*
leighmcculloch Sep 3, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 70 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,20 +64,25 @@ commands:
install_go_deps:
steps:
- checkout
- run:
name: Install dep
command: curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
- restore_cache:
keys:
- v1-pkg-cache
- go-mod-v1-{{ checksum "go.mod" }}-{{ checksum "go.sum" }}
- run:
name: Install project dependencies using dep
command: dep ensure -v
name: Download dependencies
command: |
go mod download
- save_cache:
key: v1-pkg-cache
key: go-mod-v1-{{ checksum "go.mod" }}-{{ checksum "go.sum" }}
paths:
- "/go/src/github.com/stellar/go/vendor"
- "/go/src/pkg/dep"
- /go/pkg/mod

# check_go_deps validates that the dependencies are expected.
check_go_deps:
steps:
- checkout
- run:
name: Check dependencies
command: ./gomod.sh

check_ingest_state:
steps:
Expand Down Expand Up @@ -108,7 +113,17 @@ commands:
steps:
- run:
name: Install dependencies
command: sudo apt-get update && sudo apt-get install postgresql-client-9.6 mariadb-client-10.1
command: |
sudo apt-get update
(
sudo apt-get install postgresql-client-9.6 || (
echo "deb http://apt.postgresql.org/pub/repos/apt/ $(env -i bash -c '. /etc/os-release; echo $VERSION_CODENAME')-pgdg main" | sudo tee /etc/apt/sources.list.d/pgdg.list &&
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - &&
sudo apt-get update &&
sudo apt-get install postgresql-client-9.6
)
)
(sudo apt-get install mariadb-client-10.1 || sudo apt-get install mariadb-client-10.3)
- run:
name: Install dockerize
command: wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz && sudo tar -C /usr/local/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz && rm dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz
Expand Down Expand Up @@ -149,16 +164,35 @@ jobs:
working_directory: /go/src/github.com/stellar/go
docker:
- image: circleci/golang:1.11-stretch
environment:
GO111MODULE: "on"
steps:
- install_go_deps
- check_go_deps
- govet

# check_code_1_12 performs code checks using Go 1.12.
check_code_1_12:
working_directory: /go/src/github.com/stellar/go
docker:
- image: circleci/golang:1.12-stretch
environment:
GO111MODULE: "on"
steps:
- install_go_deps
- check_go_deps
- gofmt
- govet
- staticcheck

# check_code_1_13 performs code checks using Go 1.13.
check_code_1_13:
working_directory: /go/src/github.com/stellar/go
docker:
- image: circleci/golang:1.13rc1-buster
steps:
- install_go_deps
- check_go_deps
- gofmt
- govet
- staticcheck
Expand All @@ -169,6 +203,7 @@ jobs:
docker:
- image: circleci/golang:1.11-stretch
environment:
GO111MODULE: "on"
PGHOST: localhost
PGPORT: 5432
PGUSER: circleci
Expand All @@ -189,6 +224,28 @@ jobs:
docker:
- image: circleci/golang:1.12-stretch
environment:
GO111MODULE: "on"
PGHOST: localhost
PGPORT: 5432
PGUSER: circleci
MYSQL_HOST: 127.0.0.1
MYSQL_PORT: 3306
- image: circleci/postgres:9.6.5-alpine-ram
environment:
POSTGRES_USER: circleci
- image: circleci/mysql:5.7
- image: circleci/redis:5.0-alpine
steps:
- install_go_deps
- test_packages

# test_code_1_13 performs all package tests using Go 1.13.
test_code_1_13:
working_directory: /go/src/github.com/stellar/go
docker:
- image: circleci/golang:1.13rc1-buster
environment:
GO111MODULE: "on"
PGHOST: localhost
PGPORT: 5432
PGUSER: circleci
Expand All @@ -214,6 +271,7 @@ jobs:
steps:
- check_deprecations
- install_go_deps
- check_go_deps
- build_packages
- attach_workspace:
at: ./dist
Expand Down Expand Up @@ -257,8 +315,10 @@ workflows:
jobs:
- check_code_1_11
- check_code_1_12
- check_code_1_13
- test_code_1_11
- test_code_1_12
- test_code_1_13
- ingest_state_diff:
filters:
branches:
Expand Down
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
FROM golang:1.12
RUN curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
WORKDIR /go/src/github.com/stellar/go

COPY . .
RUN dep ensure -v
ENV GO111MODULE=on
RUN go install github.com/stellar/go/tools/...
RUN go install github.com/stellar/go/services/...
Loading