Skip to content

Commit 4d13a39

Browse files
joelanfordEric Stroczynski
authored and
Eric Stroczynski
committed
*: Use go modules for SDK dependency management (#1566)
* go.mod,go.sum: initialize with kubernetes-1.13.4 pin comment * Makefile,.travis.yml,hack: set go modules always on for build and CI and use GOPROXY * Makefile: add tidy target and use as a make dependency of test/sanity * Makefile,ci/: add targets to scaffold ansible and helm base image files * hack/ci/setup-build-dependencies.sh: removing scm tool installation (now provided by base image) and add comment and TODO about no-op * hack/tests,test/e2e: use SDK repo's go.mod * test/e2e/memcached_test.go: remove unused isLocal field * ci/tests/e2e-ansible-scaffold-hybrid.sh: use add_go_mod_replace instead of go mod edit directly * internal/pkg/scaffold: pin versions for go mod proxy * doc/dev: removing references to dep for building and testing the SDK repo * CHANGELOG.md: updates for SDK's switch to go modules
1 parent c721c63 commit 4d13a39

File tree

3,536 files changed

+785
-1307070
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,536 files changed

+785
-1307070
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
.glide/
33

44
# Folders
5+
vendor
56
_obj
67
_test
78
_output

.travis.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@ language: go
77
go_import_path: github.com/operator-framework/operator-sdk
88
sudo: required
99

10+
# go modules require xenial for mercurial TLS 1.2 support
11+
dist: xenial
12+
1013
cache:
1114
directories:
1215
- $HOME/.cache/go-build
13-
- $GOPATH/pkg/mod
1416

1517
go:
1618
- 1.12.x
@@ -22,21 +24,21 @@ x_base_steps:
2224
# before_install for jobs that require dep
2325
- &dep_before_install
2426
before_install:
25-
- curl -Lo dep https://github.com/golang/dep/releases/download/v0.5.3/dep-linux-amd64 && chmod +x dep && sudo mv dep /usr/local/bin/
26-
- travis_retry dep ensure -v
27+
- travis_retry make tidy
28+
2729
# before_install for jobs that require go builds and do not run for doc-only changes
2830
- &go_before_install
2931
before_install:
3032
# hack/ci/check-doc-only-update.sh needs to be sourced so
3133
# that it can properly exit the test early with success
3234
- source hack/ci/check-doc-only-update.sh
33-
- curl -Lo dep https://github.com/golang/dep/releases/download/v0.5.3/dep-linux-amd64 && chmod +x dep && sudo mv dep /usr/local/bin/
34-
- travis_retry dep ensure -v
35+
- travis_retry make tidy
3536

3637
# Base go, ansbile, and helm job
3738
- &test
3839
stage: test
39-
env: CLUSTER=openshift
40+
env:
41+
- CLUSTER=openshift
4042
<<: *go_before_install
4143
install:
4244
- make install

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
- New flag `--repo` for subcommands [`new`](https://github.com/operator-framework/operator-sdk/blob/master/doc/sdk-cli-reference.md#new) and [`migrate`](https://github.com/operator-framework/operator-sdk/blob/master/doc/sdk-cli-reference.md#migrate) specifies the repository path to be used in Go source files generated by the SDK. This flag can only be used with [Go modules](https://github.com/golang/go/wiki/Modules). ([#1475](https://github.com/operator-framework/operator-sdk/pull/1475))
1313
- Adds `--go-build-args` flag to `operator-sdk build` for providing additional Go build arguments. ([#1582](https://github.com/operator-framework/operator-sdk/pull/1582))
1414
- New flags `--csv-channel` and `--default-channel` for subcommand [`gen-csv`](https://github.com/operator-framework/operator-sdk/blob/master/doc/sdk-cli-reference.md#gen-csv) that add channels to and update the [package manifest](https://github.com/operator-framework/operator-registry/#manifest-format) in `deploy/olm-catalog/<operator-name>` when generating a new CSV or updating an existing one. ([#1364](https://github.com/operator-framework/operator-sdk/pull/1364))
15+
- Adds `go.mod` and `go.sum` to switch from `dep` to [Go modules](https://github.com/golang/go/wiki/Modules) to manage dependencies for the SDK project itself. ([#1566](https://github.com/operator-framework/operator-sdk/pull/1566))
1516

1617
### Changed
1718

@@ -30,6 +31,7 @@
3031

3132
- The SDK no longer depends on a `vendor/` directory to manage dependencies *only if* using [Go modules](https://github.com/golang/go/wiki/Modules). The SDK and operator projects will only use vendoring if using `dep`, or modules and a `vendor/` dir is present. ([#1519](https://github.com/operator-framework/operator-sdk/pull/1519))
3233
- **Breaking change:** `ExposeMetricsPort` is removed and replaced with `CreateMetricsService()` function. `PrometheusPortName` constant is replaced with `OperatorPortName`. ([#1560](https://github.com/operator-framework/operator-sdk/pull/1560))
34+
- Removes `Gopkg.toml` and `Gopkg.lock` to drop the use of `dep` in favor of [Go modules](https://github.com/golang/go/wiki/Modules) to manage dependencies for the SDK project itself. ([#1566](https://github.com/operator-framework/operator-sdk/pull/1566))
3335

3436
### Bug Fixes
3537

0 commit comments

Comments
 (0)