mirror of
https://github.com/aljazceru/kata-containers.git
synced 2026-02-23 15:34:28 +01:00
Merge pull request #328 from bergwolf/bump-golang
Bump golang version to 1.14.4
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
dist: bionic
|
||||
os: linux
|
||||
language: go
|
||||
go: 1.13.9
|
||||
go: 1.14.4
|
||||
env: target_branch=$TRAVIS_BRANCH
|
||||
|
||||
before_install:
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Copyright (c) 2018 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
# Check there are no os.Exit() calls creeping into the code
|
||||
# We don't use that exit path in the Kata codebase.
|
||||
|
||||
# Allow the path to check to be over-ridden.
|
||||
# Default to the current directory.
|
||||
go_packages=${1:-.}
|
||||
|
||||
echo "Checking for no os.Exit() calls for package [${go_packages}]"
|
||||
|
||||
candidates=`go list -f '{{.Dir}}/*.go' $go_packages`
|
||||
for f in $candidates; do
|
||||
filename=`basename $f`
|
||||
# skip all go test files
|
||||
[[ $filename == *_test.go ]] && continue
|
||||
# skip exit.go where, the only file we should call os.Exit() from.
|
||||
[[ $filename == "exit.go" ]] && continue
|
||||
files="$f $files"
|
||||
done
|
||||
|
||||
[ -z "$files" ] && echo "No files to check, skipping" && exit 0
|
||||
|
||||
if egrep -n '\<os\.Exit\>' $files; then
|
||||
echo "Direct calls to os.Exit() are forbidden, please use exit() so atexit() works"
|
||||
exit 1
|
||||
fi
|
||||
@@ -1,14 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Copyright (c) 2018 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
set -e
|
||||
|
||||
cidir=$(dirname "$0")
|
||||
source "${cidir}/lib.sh"
|
||||
export CI_JOB="${CI_JOB:-default}"
|
||||
|
||||
if [ "${CI_JOB}" != "PODMAN" ]; then
|
||||
run_go_test
|
||||
fi
|
||||
@@ -1,71 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2018 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
# If we fail for any reason a message will be displayed
|
||||
die() {
|
||||
msg="$*"
|
||||
echo "ERROR: $msg" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Install the yq yaml query package from the mikefarah github repo
|
||||
# Install via binary download, as we may not have golang installed at this point
|
||||
function install_yq() {
|
||||
GOPATH=${GOPATH:-${HOME}/go}
|
||||
local yq_path="${GOPATH}/bin/yq"
|
||||
local yq_pkg="github.com/mikefarah/yq"
|
||||
[ -x "${GOPATH}/bin/yq" ] && return
|
||||
|
||||
read -r -a sysInfo <<< "$(uname -sm)"
|
||||
|
||||
case "${sysInfo[0]}" in
|
||||
"Linux" | "Darwin")
|
||||
goos="${sysInfo[0],}"
|
||||
;;
|
||||
"*")
|
||||
die "OS ${sysInfo[0]} not supported"
|
||||
;;
|
||||
esac
|
||||
|
||||
case "${sysInfo[1]}" in
|
||||
"aarch64")
|
||||
goarch=arm64
|
||||
;;
|
||||
"ppc64le")
|
||||
goarch=ppc64le
|
||||
;;
|
||||
"x86_64")
|
||||
goarch=amd64
|
||||
;;
|
||||
"s390x")
|
||||
goarch=s390x
|
||||
;;
|
||||
"*")
|
||||
die "Arch ${sysInfo[1]} not supported"
|
||||
;;
|
||||
esac
|
||||
|
||||
mkdir -p "${GOPATH}/bin"
|
||||
|
||||
# Check curl
|
||||
if ! command -v "curl" >/dev/null; then
|
||||
die "Please install curl"
|
||||
fi
|
||||
|
||||
local yq_version=3.1.0
|
||||
|
||||
local yq_url="https://${yq_pkg}/releases/download/${yq_version}/yq_${goos}_${goarch}"
|
||||
curl -o "${yq_path}" -LSsf ${yq_url}
|
||||
[ $? -ne 0 ] && die "Download ${yq_url} failed"
|
||||
chmod +x ${yq_path}
|
||||
|
||||
if ! command -v "${yq_path}" >/dev/null; then
|
||||
die "Cannot not get ${yq_path} executable"
|
||||
fi
|
||||
}
|
||||
|
||||
install_yq
|
||||
@@ -1,16 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2019 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
set -e
|
||||
|
||||
cidir=$(dirname "$0")
|
||||
source "${cidir}/lib.sh"
|
||||
|
||||
clone_tests_repo
|
||||
|
||||
pushd "${tests_repo_dir}"
|
||||
.ci/install_go.sh -p -f
|
||||
popd
|
||||
@@ -1,34 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2018 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export tests_repo="${tests_repo:-github.com/kata-containers/tests}"
|
||||
export tests_repo_dir="$GOPATH/src/$tests_repo"
|
||||
|
||||
clone_tests_repo()
|
||||
{
|
||||
# KATA_CI_NO_NETWORK is (has to be) ignored if there is
|
||||
# no existing clone.
|
||||
if [ -d "$tests_repo_dir" -a -n "$KATA_CI_NO_NETWORK" ]
|
||||
then
|
||||
return
|
||||
fi
|
||||
|
||||
go get -d -u "$tests_repo" || true
|
||||
if [ -n "${TRAVIS_BRANCH:-}" ]; then
|
||||
( cd "${tests_repo_dir}" && git checkout "${TRAVIS_BRANCH}" )
|
||||
fi
|
||||
}
|
||||
|
||||
run_static_checks()
|
||||
{
|
||||
clone_tests_repo
|
||||
bash "$tests_repo_dir/.ci/static-checks.sh" "github.com/kata-containers/runtime"
|
||||
}
|
||||
|
||||
run_go_test()
|
||||
{
|
||||
clone_tests_repo
|
||||
bash "$tests_repo_dir/.ci/go-test.sh"
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2018 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
set -e
|
||||
|
||||
cidir=$(dirname "$0")
|
||||
source "${cidir}/lib.sh"
|
||||
|
||||
pushd "${tests_repo_dir}"
|
||||
.ci/run.sh
|
||||
popd
|
||||
@@ -1,25 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2018 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
set -e
|
||||
|
||||
cidir=$(dirname "$0")
|
||||
source "${cidir}/lib.sh"
|
||||
export CI_JOB="${CI_JOB:-default}"
|
||||
|
||||
clone_tests_repo
|
||||
|
||||
pushd "${tests_repo_dir}"
|
||||
.ci/setup.sh
|
||||
popd
|
||||
|
||||
if [ "${CI_JOB}" != "PODMAN" ]; then
|
||||
echo "Setup virtcontainers environment"
|
||||
chronic sudo -E PATH=$PATH bash -c "${cidir}/../virtcontainers/utils/virtcontainers-setup.sh"
|
||||
|
||||
echo "Install virtcontainers"
|
||||
make -C "${cidir}/../virtcontainers" && chronic sudo make -C "${cidir}/../virtcontainers" install
|
||||
fi
|
||||
@@ -1,16 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2018 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
set -e
|
||||
|
||||
cidir=$(dirname "$0")
|
||||
source "${cidir}/lib.sh"
|
||||
|
||||
# Build kata-runtime before running static checks
|
||||
make -C "${cidir}/../"
|
||||
|
||||
# Run static checks
|
||||
run_static_checks
|
||||
@@ -1,40 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2019 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
# The purpose of this script is to
|
||||
# run the tag_repos.sh script that is in the
|
||||
# packaging repository which checks the VERSION
|
||||
# file from the components in order to verify
|
||||
# that the VERSION matches between them.
|
||||
# This ensures that the rest
|
||||
# of the components are merged before the runtime
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
set -o errtrace
|
||||
|
||||
GOPATH=${GOPATH:-${HOME}/go}
|
||||
|
||||
PACKAGING_REPO="github.com/kata-containers/packaging"
|
||||
RUNTIME_REPO="github.com/kata-containers/runtime"
|
||||
KATA_BRANCH=${target_branch:-master}
|
||||
|
||||
go get -d "${PACKAGING_REPO}" || true
|
||||
|
||||
if ! check_changes=$(git diff --name-only "origin/${KATA_BRANCH}" | grep VERSION); then
|
||||
echo "No changes in VERSION file - this is not a bump - nothing to check"
|
||||
exit 0
|
||||
fi
|
||||
version_to_check=$(cat "${GOPATH}/src/${RUNTIME_REPO}/VERSION")
|
||||
|
||||
if [ ! -z "$check_changes" ]; then
|
||||
echo "Changes detected on VERSION"
|
||||
echo "Check versions in branch ${KATA_BRANCH}"
|
||||
pushd "${GOPATH}/src/${PACKAGING_REPO}"
|
||||
./release/tag_repos.sh -b "${KATA_BRANCH}" pre-release "${version_to_check}"
|
||||
popd
|
||||
fi
|
||||
1
src/runtime/.gitignore
vendored
1
src/runtime/.gitignore
vendored
@@ -13,6 +13,7 @@ coverage.html
|
||||
/cli/config/configuration-qemu-virtiofs.toml
|
||||
/cli/config/configuration-clh.toml
|
||||
/cli/config-generated.go
|
||||
/cli/containerd-shim-kata-v2/config-generated.go
|
||||
/cli/coverage.html
|
||||
/containerd-shim-kata-v2
|
||||
/data/kata-collect-data.sh
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2018 Intel Corporation
|
||||
# Copyright (c) 2018 IBM
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
sudo: required
|
||||
dist: xenial
|
||||
|
||||
language: go
|
||||
go:
|
||||
- 1.13.9
|
||||
|
||||
os:
|
||||
- linux
|
||||
- linux-ppc64le
|
||||
|
||||
matrix:
|
||||
allow_failures:
|
||||
- os: linux-ppc64le
|
||||
|
||||
go_import_path: github.com/kata-containers/runtime
|
||||
|
||||
env:
|
||||
- target_branch=$TRAVIS_BRANCH
|
||||
|
||||
before_install:
|
||||
- git remote set-branches --add origin "${TRAVIS_BRANCH}"
|
||||
- git fetch
|
||||
- ".ci/setup.sh"
|
||||
- ".ci/versions_checker.sh"
|
||||
|
||||
before_script:
|
||||
- ".ci/static-checks.sh"
|
||||
- ".ci/versions_checker.sh"
|
||||
|
||||
install:
|
||||
- cd ${TRAVIS_BUILD_DIR}
|
||||
- ".ci/install-yq.sh"
|
||||
- make
|
||||
- sudo -E PATH=$PATH make install
|
||||
2
src/runtime/vendor/github.com/intel/govmm/qemu/qmp.go
generated
vendored
2
src/runtime/vendor/github.com/intel/govmm/qemu/qmp.go
generated
vendored
@@ -993,7 +993,7 @@ func (q *QMP) ExecuteNetdevAddByFds(ctx context.Context, netdevType, netdevID st
|
||||
}
|
||||
if len(vhostFdNames) > 0 {
|
||||
vhostFdNameStr := strings.Join(vhostFdNames, ":")
|
||||
args["vhost"] = "on"
|
||||
args["vhost"] = true
|
||||
args["vhostfds"] = vhostFdNameStr
|
||||
}
|
||||
|
||||
|
||||
2
src/runtime/vendor/modules.txt
vendored
2
src/runtime/vendor/modules.txt
vendored
@@ -162,7 +162,7 @@ github.com/hashicorp/go-multierror
|
||||
# github.com/hashicorp/yamux v0.0.0-20190923154419-df201c70410d
|
||||
## explicit
|
||||
github.com/hashicorp/yamux
|
||||
# github.com/intel/govmm v0.0.0-20200304142514-e969afbec52c
|
||||
# github.com/intel/govmm v0.0.0-20200602145448-7cc469641b7b
|
||||
## explicit
|
||||
github.com/intel/govmm/qemu
|
||||
# github.com/konsorten/go-windows-terminal-sequences v1.0.1
|
||||
|
||||
@@ -302,7 +302,7 @@ languages:
|
||||
description: |
|
||||
'newest-version' is the latest version known to work when
|
||||
building Kata
|
||||
newest-version: "1.13.9"
|
||||
newest-version: "1.14.4"
|
||||
|
||||
rust:
|
||||
description: "rust language"
|
||||
|
||||
Reference in New Issue
Block a user