Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nfs-subdir-external-provisioner
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Rancher商店
nfs-subdir-external-provisioner
Commits
ee22a9ca
Unverified
Commit
ee22a9ca
authored
Nov 04, 2019
by
Kubernetes Prow Robot
Committed by
GitHub
Nov 04, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #42 from pohly/use-vendor-dir
prow.sh: use vendor directory if available
parents
a53bd4c4
80678456
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
9 deletions
+18
-9
build.make
build.make
+7
-4
prow.sh
prow.sh
+9
-3
travis.yml
travis.yml
+2
-2
No files found.
build.make
View file @
ee22a9ca
...
@@ -22,6 +22,9 @@
...
@@ -22,6 +22,9 @@
# including build.make.
# including build.make.
REGISTRY_NAME
=
quay.io/k8scsi
REGISTRY_NAME
=
quay.io/k8scsi
# Can be set to -mod=vendor to ensure that the "vendor" directory is used.
GOFLAGS_VENDOR
=
# Revision that gets built into each binary via the main.version
# Revision that gets built into each binary via the main.version
# string. Uses the `git describe` output based on the most recent
# string. Uses the `git describe` output based on the most recent
# version tag with a short revision suffix or, if nothing has been
# version tag with a short revision suffix or, if nothing has been
...
@@ -64,9 +67,9 @@ ARCH := $(if $(GOARCH),$(GOARCH),$(shell go env GOARCH))
...
@@ -64,9 +67,9 @@ ARCH := $(if $(GOARCH),$(GOARCH),$(shell go env GOARCH))
build-%
:
check-go-version-go
build-%
:
check-go-version-go
mkdir
-p
bin
mkdir
-p
bin
CGO_ENABLED
=
0
GOOS
=
linux go build
-a
-ldflags
'-X main.version=
$(REV)
-extldflags "-static"'
-o
./bin/
$*
./cmd/
$*
CGO_ENABLED
=
0
GOOS
=
linux go build
$(GOFLAGS_VENDOR)
-a
-ldflags
'-X main.version=
$(REV)
-extldflags "-static"'
-o
./bin/
$*
./cmd/
$*
if
[
"
$$
ARCH"
=
"amd64"
]
;
then
\
if
[
"
$$
ARCH"
=
"amd64"
]
;
then
\
CGO_ENABLED
=
0
GOOS
=
windows go build
-a
-ldflags
'-X main.version=
$(REV)
-extldflags "-static"'
-o
./bin/
$*
.exe ./cmd/
$*
;
\
CGO_ENABLED
=
0
GOOS
=
windows go build
$(GOFLAGS_VENDOR)
-a
-ldflags
'-X main.version=
$(REV)
-extldflags "-static"'
-o
./bin/
$*
.exe ./cmd/
$*
;
\
fi
fi
container-%
:
build-%
container-%
:
build-%
...
@@ -103,13 +106,13 @@ test: check-go-version-go
...
@@ -103,13 +106,13 @@ test: check-go-version-go
test
:
test-go
test
:
test-go
test-go
:
test-go
:
@
echo
;
echo
"###
$@
:"
@
echo
;
echo
"###
$@
:"
go
test
`
go list
./... |
grep
-v
-e
'vendor'
-e
'/test/e2e$$'
$(TEST_GO_FILTER_CMD)
`
$(TESTARGS)
go
test
$(GOFLAGS_VENDOR)
`
go list
$(GOFLAGS_VENDOR)
./... |
grep
-v
-e
'vendor'
-e
'/test/e2e$$'
$(TEST_GO_FILTER_CMD)
`
$(TESTARGS)
.PHONY
:
test-vet
.PHONY
:
test-vet
test
:
test-vet
test
:
test-vet
test-vet
:
test-vet
:
@
echo
;
echo
"###
$@
:"
@
echo
;
echo
"###
$@
:"
go
vet
`
go list
./... |
grep
-v
vendor
$(TEST_VET_FILTER_CMD)
`
go
test
$(GOFLAGS_VENDOR)
`
go list
$(GOFLAGS_VENDOR)
./... |
grep
-v
vendor
$(TEST_VET_FILTER_CMD)
`
.PHONY
:
test-fmt
.PHONY
:
test-fmt
test
:
test-fmt
test
:
test-fmt
...
...
prow.sh
View file @
ee22a9ca
...
@@ -85,6 +85,12 @@ get_versioned_variable () {
...
@@ -85,6 +85,12 @@ get_versioned_variable () {
echo
"
$value
"
echo
"
$value
"
}
}
# If we have a vendor directory, then use it. We must be careful to only
# use this for "make" invocations inside the project's repo itself because
# setting it globally can break other go usages (like "go get <some command>"
# which is disabled with GOFLAGS=-mod=vendor).
configvar GOFLAGS_VENDOR
"
$(
[
-d
vendor
]
&&
echo
'-mod=vendor'
)
"
"Go flags for using the vendor directory"
# Go versions can be specified seperately for different tasks
# Go versions can be specified seperately for different tasks
# If the pre-installed Go is missing or a different
# If the pre-installed Go is missing or a different
# version, the required version here will get installed
# version, the required version here will get installed
...
@@ -928,7 +934,7 @@ main () {
...
@@ -928,7 +934,7 @@ main () {
images
=
images
=
if
${
CSI_PROW_BUILD_JOB
}
;
then
if
${
CSI_PROW_BUILD_JOB
}
;
then
# A successful build is required for testing.
# A successful build is required for testing.
run_with_go
"
${
CSI_PROW_GO_VERSION_BUILD
}
"
make all
||
die
"'make all' failed"
run_with_go
"
${
CSI_PROW_GO_VERSION_BUILD
}
"
make all
"GOFLAGS_VENDOR=
${
GOFLAGS_VENDOR
}
"
||
die
"'make all' failed"
# We don't want test failures to prevent E2E testing below, because the failure
# We don't want test failures to prevent E2E testing below, because the failure
# might have been minor or unavoidable, for example when experimenting with
# might have been minor or unavoidable, for example when experimenting with
# changes in "release-tools" in a PR (that fails the "is release-tools unmodified"
# changes in "release-tools" in a PR (that fails the "is release-tools unmodified"
...
@@ -938,13 +944,13 @@ main () {
...
@@ -938,13 +944,13 @@ main () {
warn
"installing 'dep' failed, cannot test vendoring"
warn
"installing 'dep' failed, cannot test vendoring"
ret
=
1
ret
=
1
fi
fi
if
!
run_with_go
"
${
CSI_PROW_GO_VERSION_BUILD
}
"
make
-k
test
2>&1 | make_test_to_junit
;
then
if
!
run_with_go
"
${
CSI_PROW_GO_VERSION_BUILD
}
"
make
-k
test
"GOFLAGS_VENDOR=
${
GOFLAGS_VENDOR
}
"
2>&1 | make_test_to_junit
;
then
warn
"'make test' failed, proceeding anyway"
warn
"'make test' failed, proceeding anyway"
ret
=
1
ret
=
1
fi
fi
fi
fi
# Required for E2E testing.
# Required for E2E testing.
run_with_go
"
${
CSI_PROW_GO_VERSION_BUILD
}
"
make container
||
die
"'make container' failed"
run_with_go
"
${
CSI_PROW_GO_VERSION_BUILD
}
"
make container
"GOFLAGS_VENDOR=
${
GOFLAGS_VENDOR
}
"
||
die
"'make container' failed"
fi
fi
if
tests_need_kind
;
then
if
tests_need_kind
;
then
...
...
travis.yml
View file @
ee22a9ca
...
@@ -13,9 +13,9 @@ before_script:
...
@@ -13,9 +13,9 @@ before_script:
-
chmod u+x bin/dep
-
chmod u+x bin/dep
-
export PATH=$PWD/bin:$PATH
-
export PATH=$PWD/bin:$PATH
script
:
script
:
-
make -k all test
-
make -k all test
GOFLAGS_VENDOR=$( [ -d vendor ] && echo '-mod=vendor' )
after_success
:
after_success
:
-
if [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then
-
if [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then
docker login -u "${DOCKER_USERNAME}" -p "${DOCKER_PASSWORD}" quay.io;
docker login -u "${DOCKER_USERNAME}" -p "${DOCKER_PASSWORD}" quay.io;
make push;
make push
GOFLAGS_VENDOR=$( [ -d vendor ] && echo '-mod=vendor' )
;
fi
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment