Commit c917fdf0 authored by ale's avatar ale

Install a restic binary to run tests

parent b4380cb9
Pipeline #1119 failed with stages
in 24 seconds
......@@ -10,7 +10,9 @@ stages:
test:
stage: test
image: "ai/test:go"
script: "go-test-runner ."
script:
- "./install_restic_for_test.sh"
- "go-test-runner ."
except:
- master
......@@ -27,7 +29,9 @@ build:src:
build:pkg:
stage: build_pkg
image: "ai/build:stretch"
script: "build-deb"
script:
- "./install_restic_for_test.sh"
- "build-dsc"
dependencies:
- build:src
artifacts:
......
#!/bin/sh
RESTIC_VERSION=${1:-0.9.1}
case `dpkg-architecture -qDEB_BUILD_ARCH` in
amd64) ARCH=amd64 ;;
i686) ARCH=386 ;;
armel) ARCH=arm ;;
armhf) ARCH=arm64 ;;
*)
echo "Unsupported architecture!" >&2
exit 1
;;
esac
DOWNLOAD_URL="https://github.com/restic/restic/releases/download/v${RESTIC_VERSION}/restic_${RESTIC_VERSION}_linux_${ARCH}.bz2"
set -e
wget -O- -nv "${DOWNLOAD_URL}" | bunzip2 -c > /usr/bin/restic
chmod +x /usr/bin/restic
exit 0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment