-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[release/v1.43] Update containerd to v1.5 for all Kubernetes versions (…
…#1392) * Update containerd to v1.5 for all Kubernetes versions Signed-off-by: Marko Mudrinić <[email protected]> * Run update-fixtures in a Docker container Signed-off-by: Marko Mudrinić <[email protected]>
- Loading branch information
Showing
7 changed files
with
77 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Copyright 2022 The Machine Controller 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. | ||
|
||
### Contains commonly used functions for the other scripts. | ||
|
||
# Required for signal propagation to work so | ||
# the cleanup trap gets executed when a script | ||
# receives a SIGINT | ||
set -o monitor | ||
|
||
containerize() { | ||
local cmd="$1" | ||
local image="${CONTAINERIZE_IMAGE:-quay.io/kubermatic/util:2.0.0}" | ||
local gocache="${CONTAINERIZE_GOCACHE:-/tmp/.gocache}" | ||
local gomodcache="${CONTAINERIZE_GOMODCACHE:-/tmp/.gomodcache}" | ||
local skip="${NO_CONTAINERIZE:-}" | ||
|
||
# short-circuit containerize when in some cases it needs to be avoided | ||
[ -n "$skip" ] && return | ||
|
||
if ! [ -f /.dockerenv ]; then | ||
echodate "Running $cmd in a Docker container using $image..." | ||
mkdir -p "$gocache" | ||
mkdir -p "$gomodcache" | ||
|
||
exec docker run \ | ||
-v "$PWD":/go/src/k8c.io/kubermatic \ | ||
-v "$gocache":"$gocache" \ | ||
-v "$gomodcache":"$gomodcache" \ | ||
-w /go/src/k8c.io/kubermatic \ | ||
-e "GOCACHE=$gocache" \ | ||
-e "GOMODCACHE=$gomodcache" \ | ||
-u "$(id -u):$(id -g)" \ | ||
--entrypoint="$cmd" \ | ||
--rm \ | ||
-it \ | ||
$image $@ | ||
|
||
exit $? | ||
fi | ||
} | ||
|
||
echodate() { | ||
# do not use -Is to keep this compatible with macOS | ||
echo "[$(date +%Y-%m-%dT%H:%M:%S%:z)]" "$@" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters