From 2ca5ffa06ab3be35a6fe2fa254b5f6eb585344f4 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Wed, 9 Dec 2020 07:51:32 +0100 Subject: [PATCH] Remove travis support and unused buildmode Signed-off-by: CrazyMax --- .travis.yml | 31 ------------------------------- hack/util | 23 +++++++---------------- 2 files changed, 7 insertions(+), 47 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 4447223a..00000000 --- a/.travis.yml +++ /dev/null @@ -1,31 +0,0 @@ -sudo: required -language: minimal - -env: - global: - - DOCKER_CHANNEL="stable" - - DOCKER_CLI_EXPERIMENTAL="enabled" - - PLATFORMS="linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x,linux/ppc64le" - - CROSS_PLATFORMS="${PLATFORMS},darwin/amd64,windows/amd64" - - PREFER_BUILDCTL="1" - -before_install: - # update docker - - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - - - sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) $DOCKER_CHANNEL" - - sudo apt-get update - - sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce docker-ce-cli - # check - - sudo systemctl restart docker - - docker info - -install: - - docker buildx create --name builder --driver docker-container --driver-opt image=$REPO_SLUG_ORIGIN --use - - docker run --rm --privileged tonistiigi/binfmt:latest --install all - - docker run --name buildkit --rm -d --privileged -p 1234:1234 $REPO_SLUG_ORIGIN --addr tcp://0.0.0.0:1234 - - sudo docker cp buildkit:/usr/bin/buildctl /usr/bin/ - - export BUILDKIT_HOST=tcp://0.0.0.0:1234 - -script: - - make binaries validate-all - - TARGETPLATFORM="${CROSS_PLATFORMS}" ./hack/cross diff --git a/hack/util b/hack/util index f3f2ef1f..cc634197 100755 --- a/hack/util +++ b/hack/util @@ -8,28 +8,19 @@ : ${CACHEDIR_FROM=} : ${CACHEDIR_TO=} -newerEqualThan() { # $1=minimum wanted version $2=actual-version - [ "$1" = "$(printf "$1\n$2" | sort -V | head -n 1)" ] -} +if [ "$PREFER_BUILDCTL" = "1" ]; then + echo >&2 "WARNING: PREFER_BUILDCTL is no longer supported. Ignoring." +fi + +if [ "$PREFER_LEGACY" = "1" ]; then + echo >&2 "WARNING: PREFER_LEGACY is no longer supported. Ignoring." +fi progressFlag="" if [ "$CI" = "true" ]; then progressFlag="--progress=plain" fi -buildmode="legacy" -if [ "$PREFER_BUILDCTL" = "1" ]; then - buildmode="buildkit"; -else - serverVersion=$(docker info --format '{{.ServerVersion}}') - experimental=$(docker info --format '{{.ExperimentalBuild}}') - if [ "$PREFER_LEGACY" != "1" ] && ( newerEqualThan "18.09" $serverVersion || \ - ( newerEqualThan "18.06" $serverVersion && [ "true" = "$experimental" ] ) || \ - [ "$DOCKER_BUILDKIT" = "1" ]); then - buildmode="docker-buildkit"; - fi -fi - buildxCmd() { if docker buildx version >/dev/null 2>&1; then set -x