Merge pull request #3887 from joakimr-axis/joakimr-axis_scripts

Improve install scripts
This commit is contained in:
Michael Crosby 2019-12-17 09:20:32 -05:00 committed by GitHub
commit 9b5581cc9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 13 additions and 13 deletions

View File

@ -21,18 +21,18 @@
# #
set -eu -o pipefail set -eu -o pipefail
CNI_COMMIT=$(grep containernetworking/plugins ${GOPATH}/src/github.com/containerd/containerd/vendor.conf | awk '{print $2}') CNI_COMMIT=$(grep containernetworking/plugins "$GOPATH"/src/github.com/containerd/containerd/vendor.conf | awk '{print $2}')
CNI_DIR=/opt/cni CNI_DIR=/opt/cni
CNI_CONFIG_DIR=/etc/cni/net.d CNI_CONFIG_DIR=/etc/cni/net.d
go get -d github.com/containernetworking/plugins/... go get -d github.com/containernetworking/plugins/...
cd $GOPATH/src/github.com/containernetworking/plugins cd "$GOPATH"/src/github.com/containernetworking/plugins
git checkout $CNI_COMMIT git checkout $CNI_COMMIT
FASTBUILD=true ./build.sh FASTBUILD=true ./build.sh
mkdir -p $CNI_DIR mkdir -p $CNI_DIR
cp -r ./bin $CNI_DIR cp -r ./bin $CNI_DIR
mkdir -p $CNI_CONFIG_DIR mkdir -p $CNI_CONFIG_DIR
bash -c 'cat >'$CNI_CONFIG_DIR'/10-containerd-net.conflist <<EOF cat > $CNI_CONFIG_DIR/10-containerd-net.conflist <<EOF
{ {
"cniVersion": "0.3.1", "cniVersion": "0.3.1",
"name": "containerd-net", "name": "containerd-net",
@ -57,4 +57,4 @@ bash -c 'cat >'$CNI_CONFIG_DIR'/10-containerd-net.conflist <<EOF
} }
] ]
} }
EOF' EOF

View File

@ -23,7 +23,7 @@ set -eu -o pipefail
go get -u github.com/onsi/ginkgo/ginkgo go get -u github.com/onsi/ginkgo/ginkgo
CRITEST_COMMIT=v1.16.1 CRITEST_COMMIT=v1.16.1
go get -d github.com/kubernetes-incubator/cri-tools/... go get -d github.com/kubernetes-incubator/cri-tools/...
cd $GOPATH/src/github.com/kubernetes-incubator/cri-tools cd "$GOPATH"/src/github.com/kubernetes-incubator/cri-tools
git checkout $CRITEST_COMMIT git checkout $CRITEST_COMMIT
make make
make install make install

View File

@ -25,7 +25,7 @@ go get -u github.com/golangci/golangci-lint/cmd/golangci-lint
go get -u github.com/cpuguy83/go-md2man go get -u github.com/cpuguy83/go-md2man
( (
cd $GOPATH/src/github.com/golangci/golangci-lint/cmd/golangci-lint cd "$GOPATH"/src/github.com/golangci/golangci-lint/cmd/golangci-lint
git checkout v1.18.0 git checkout v1.18.0
go build -v && go install go build -v && go install
) )

View File

@ -33,9 +33,9 @@ arm64)
;; ;;
amd64|386) amd64|386)
if [ $GOOS == "windows" ]; then if [ "$GOOS" = windows ]; then
wget -O $PROTOBUF_DIR/protobuf "https://github.com/google/protobuf/releases/download/v$PROTOBUF_VERSION/protoc-$PROTOBUF_VERSION-win32.zip" wget -O $PROTOBUF_DIR/protobuf "https://github.com/google/protobuf/releases/download/v$PROTOBUF_VERSION/protoc-$PROTOBUF_VERSION-win32.zip"
elif [ $GOOS == "linux" ]; then elif [ "$GOOS" = linux ]; then
wget -O $PROTOBUF_DIR/protobuf "https://github.com/google/protobuf/releases/download/v$PROTOBUF_VERSION/protoc-$PROTOBUF_VERSION-linux-x86_64.zip" wget -O $PROTOBUF_DIR/protobuf "https://github.com/google/protobuf/releases/download/v$PROTOBUF_VERSION/protoc-$PROTOBUF_VERSION-linux-x86_64.zip"
fi fi
unzip $PROTOBUF_DIR/protobuf -d /usr/local unzip $PROTOBUF_DIR/protobuf -d /usr/local

View File

@ -21,9 +21,9 @@
# #
set -eu -o pipefail set -eu -o pipefail
RUNC_COMMIT=$(grep opencontainers/runc ${GOPATH}/src/github.com/containerd/containerd/vendor.conf | awk '{print $2}') RUNC_COMMIT=$(grep opencontainers/runc "$GOPATH"/src/github.com/containerd/containerd/vendor.conf | awk '{print $2}')
go get -d github.com/opencontainers/runc go get -d github.com/opencontainers/runc
cd $GOPATH/src/github.com/opencontainers/runc cd "$GOPATH"/src/github.com/opencontainers/runc
git checkout $RUNC_COMMIT git checkout $RUNC_COMMIT
make BUILDTAGS="apparmor seccomp" runc install make BUILDTAGS='apparmor seccomp' runc install

View File

@ -23,8 +23,8 @@ set -eu -o pipefail
set -x set -x
export SECCOMP_VERSION="2.3.3" export SECCOMP_VERSION=2.3.3
export SECCOMP_PATH="$(mktemp -d)" export SECCOMP_PATH=$(mktemp -d)
curl -fsSL "https://github.com/seccomp/libseccomp/releases/download/v${SECCOMP_VERSION}/libseccomp-${SECCOMP_VERSION}.tar.gz" | tar -xzC "$SECCOMP_PATH" --strip-components=1 curl -fsSL "https://github.com/seccomp/libseccomp/releases/download/v${SECCOMP_VERSION}/libseccomp-${SECCOMP_VERSION}.tar.gz" | tar -xzC "$SECCOMP_PATH" --strip-components=1
( (
cd "$SECCOMP_PATH" cd "$SECCOMP_PATH"