Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
11 changes: 5 additions & 6 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,19 @@ jobs:
with:
version: v2.14.0
args: -v
verify-vendor:
name: Verify vendor directory
verify-modules:
name: Verify Go modules
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Install Go
uses: actions/setup-go@v7
with:
go-version-file: .github/go-version
- name: Check module vendoring
- name: Check Go modules
run: |
go mod tidy
go mod vendor
test -z "$(git status --porcelain)" || (echo "please run 'go mod tidy && go mod vendor', and submit your changes"; exit 1)
go mod tidy -diff
go mod verify
build:
name: Build all linux architectures
needs: lint
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ _testmain.go

bin/
gopath/
/vendor/
.vagrant
.idea
/release-*
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: "2"
run:
modules-download-mode: vendor
modules-download-mode: readonly
linters:
enable:
- contextcheck
Expand Down
3 changes: 0 additions & 3 deletions .yamllint.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
extends: default

ignore: |
vendor

rules:
document-start: disable
line-length: disable
Expand Down
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ are very busy and read the mailing lists.
Each plugin is compiled simply with `go build`. Two scripts, `build_linux.sh` and `build_windows.sh`,
are supplied which will build all the plugins for their respective OS.

Dependencies are managed with Go modules and pinned in `go.mod` and `go.sum`.
Go downloads dependencies as needed; run `go mod download` to populate the module
cache before building offline. Run `go mod tidy` after changing dependencies.

## Contribution workflow

This is a rough outline of how to prepare a contribution:
Expand Down
2 changes: 1 addition & 1 deletion RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Creating a new release produces the following artifacts:
- Create a draft of the release note
- Discuss the level of testing that's needed and create a test plan if sensible
- Check what version of `go` is used in the build container, updating it if there's a new stable release.
- Update the vendor directory and Godeps to pin to the corresponding containernetworking/cni release. Create a PR, makes sure it passes CI and get it merged.
- Update the containernetworking/cni dependency in `go.mod` to the corresponding release and run `go mod tidy` to update `go.sum`. Create a PR, make sure it passes CI and get it merged.

## Creating the release artifacts
1. Make sure you are on the master branch and don't have any local uncommitted changes.
Expand Down
2 changes: 0 additions & 2 deletions build_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ if [ "$(uname)" = "Darwin" ]; then
export GOOS="${GOOS:-linux}"
fi

export GOFLAGS="${GOFLAGS} -mod=vendor"

mkdir -p "${PWD}/bin"

echo "Building plugins ${GOOS}"
Expand Down
1 change: 0 additions & 1 deletion build_windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ cd "$(dirname "$0")"

export GO="${GO:-go}"
export GOOS=windows
export GOFLAGS="${GOFLAGS} -mod=vendor"
echo "$GOFLAGS"

PLUGINS=$(cat plugins/windows_only.txt | dos2unix )
Expand Down
43 changes: 0 additions & 43 deletions vendor/cyphar.com/go-pathrs/.golangci.yml

This file was deleted.

Loading
Loading