diff --git a/.travis.yml b/.travis.yml index 7415a2345..f8719e605 100644 --- a/.travis.yml +++ b/.travis.yml @@ -44,6 +44,7 @@ install: - protoc --version - go get -u github.com/vbatts/git-validation - go get -u github.com/kunalkushwaha/ltag + - go get -u github.com/LK4D4/vndr - if [ "$TRAVIS_GOOS" = "linux" ]; then sudo PATH=$PATH GOPATH=$GOPATH script/setup/install-runc ; fi - if [ "$TRAVIS_GOOS" = "linux" ]; then sudo PATH=$PATH GOPATH=$GOPATH script/setup/install-cni ; fi - if [ "$TRAVIS_GOOS" = "linux" ]; then sudo PATH=$PATH GOPATH=$GOPATH script/setup/install-critools ; fi @@ -52,13 +53,16 @@ install: - if [ "$TRAVIS_GOOS" = "linux" ]; then cd /tmp/criu-3.7 && sudo make install-criu ; fi - cd $TRAVIS_BUILD_DIR +before_script: + - pushd ..; git clone https://github.com/containerd/project; popd + script: - export GOOS=$TRAVIS_GOOS - export CGO_ENABLED=$TRAVIS_CGO_ENABLED - - DCO_VERBOSITY=-q script/validate/dco - - script/validate/fileheader + - DCO_VERBOSITY=-q ../project/script/validate/dco + - ../project/script/validate/fileheader ../project/ + - ../project/script/validate/vendor - GOOS=linux script/setup/install-dev-tools - - script/validate/vendor - go build -i . - make check - if [ "$GOOS" = "linux" ]; then make check-protos check-api-descriptors; fi diff --git a/script/setup/install-dev-tools b/script/setup/install-dev-tools index 2e13a8692..d49932dd8 100755 --- a/script/setup/install-dev-tools +++ b/script/setup/install-dev-tools @@ -23,5 +23,4 @@ set -eu -o pipefail go get -u github.com/stevvooe/protobuild go get -u github.com/alecthomas/gometalinter gometalinter --install >/dev/null -go get -u github.com/LK4D4/vndr go get -u github.com/cpuguy83/go-md2man diff --git a/script/validate/dco b/script/validate/dco deleted file mode 100755 index 9a104ab3e..000000000 --- a/script/validate/dco +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bash - -# Copyright The containerd Authors. - -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at - -# http://www.apache.org/licenses/LICENSE-2.0 - -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -set -eu -o pipefail - -if ! command -v git-validation; then - >&2 echo "ERROR: git-validation not found. Install with:" - >&2 echo " go get -u github.com/vbatts/git-validation" - exit 1 -fi - -verbosity="${DCO_VERBOSITY--v}" -GIT_CHECK_EXCLUDE="./vendor:./script/validate/template" git-validation "$verbosity" -run DCO,short-subject,dangling-whitespace diff --git a/script/validate/fileheader b/script/validate/fileheader deleted file mode 100755 index ef5fa287f..000000000 --- a/script/validate/fileheader +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash - -# Copyright The containerd Authors. - -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at - -# http://www.apache.org/licenses/LICENSE-2.0 - -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -set -eu -o pipefail - -if ! command -v ltag; then - >&2 echo "ERROR: ltag not found. Install with:" - >&2 echo " go get -u github.com/kunalkushwaha/ltag" - exit 1 -fi - -ltag -t script/validate/template --check -v diff --git a/script/validate/template/bash.txt b/script/validate/template/bash.txt deleted file mode 100644 index b8424f326..000000000 --- a/script/validate/template/bash.txt +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright The containerd Authors. - -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at - -# http://www.apache.org/licenses/LICENSE-2.0 - -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - diff --git a/script/validate/template/dockerfile.txt b/script/validate/template/dockerfile.txt deleted file mode 100644 index b8424f326..000000000 --- a/script/validate/template/dockerfile.txt +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright The containerd Authors. - -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at - -# http://www.apache.org/licenses/LICENSE-2.0 - -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - diff --git a/script/validate/template/go.txt b/script/validate/template/go.txt deleted file mode 100644 index bee278d30..000000000 --- a/script/validate/template/go.txt +++ /dev/null @@ -1,16 +0,0 @@ -/* - Copyright The containerd Authors. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - diff --git a/script/validate/template/makefile.txt b/script/validate/template/makefile.txt deleted file mode 100644 index b8424f326..000000000 --- a/script/validate/template/makefile.txt +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright The containerd Authors. - -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at - -# http://www.apache.org/licenses/LICENSE-2.0 - -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - diff --git a/script/validate/vendor b/script/validate/vendor deleted file mode 100755 index e32846299..000000000 --- a/script/validate/vendor +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env bash - -# Copyright The containerd Authors. - -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at - -# http://www.apache.org/licenses/LICENSE-2.0 - -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -set -eu -o pipefail - -rm -rf vendor/ -vndr |& grep -v -i clone - -DIFF_PATH="vendor/" -DIFF=$(git status --porcelain -- "$DIFF_PATH") - -if [ "$DIFF" ]; then - echo - echo "These files were modified:" - echo - echo "$DIFF" - echo - exit 1 -else - echo "$DIFF_PATH is correct" -fi