From d41fd1ea07ac5954cbd74febaf1e10b6951a3596 Mon Sep 17 00:00:00 2001 From: Ciprian Hacman Date: Mon, 1 Jun 2020 08:27:18 +0300 Subject: [PATCH] Add packages hashes verification for containerd and Docker --- Makefile | 4 ++++ hack/verify-hashes.sh | 26 ++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100755 hack/verify-hashes.sh diff --git a/Makefile b/Makefile index 5dc8167aad..13f7989e6f 100644 --- a/Makefile +++ b/Makefile @@ -553,6 +553,10 @@ verify-terraform: verify-bindata: ./hack/verify-bindata.sh +.PHONY: verify-hashes +verify-hashes: + ./hack/verify-hashes.sh + # ci target is for developers, it aims to cover all the CI jobs # verify-gendocs will call kops target # verify-package has to be after verify-gendocs, because with .gitignore for federation bindata diff --git a/hack/verify-hashes.sh b/hack/verify-hashes.sh new file mode 100755 index 0000000000..7e46bfc968 --- /dev/null +++ b/hack/verify-hashes.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env bash + +# Copyright 2019 The Kubernetes 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 -o errexit +set -o nounset +set -o pipefail + +. "$(dirname "${BASH_SOURCE[0]}")/common.sh" + +cd "${KOPS_ROOT}" + +# Verify package hashes for Containerd and Docker +VERIFY_HASHES=1 go test -v ./nodeup/pkg/model -run PackageHashes