Commit 25117f5a by Brian Gann Committed by GitHub

area/grafana/e2e: ginstall should pull version specified (#31056)

* fall back to version specified
* update docker image and bump version
* update go version, linter, and codeclimate
parent cc463f30
......@@ -4,4 +4,4 @@
## Common variable declarations
##
DOCKER_IMAGE_NAME="grafana/grafana-plugin-ci:1.1.2-alpine"
DOCKER_IMAGE_NAME="grafana/grafana-plugin-ci:1.1.3-alpine"
......@@ -47,8 +47,8 @@ done
# Make sure the script is being run as root
if [ $EUID -ne 0 ]; then
echo "This script must be run as root"
exit 1
echo "This script must be run as root"
exit 1
fi
##
......@@ -63,10 +63,11 @@ if [ "$version" == "latest" ]; then
elif [ "$version" == "canary" ]; then
version="$canary"
wget -O - "https://dl.grafana.com/oss/master/grafana-${version}.linux-amd64.tar.gz" | tar -C /opt -zxf -
else
wget -O - "https://dl.grafana.com/oss/release/grafana-${version}.linux-amd64.tar.gz" | tar -C /opt -zxf -
fi
/bin/rm -rf /opt/grafana > /dev/null 2>&1 || true
ln -s /opt/grafana-${version} /opt/grafana
# nohup /opt/grafana/bin/grafana-server -config /opt/grafana/conf/defaults.ini -homepath /opt/grafana >/dev/null 2>&1 &
......@@ -18,17 +18,17 @@ apk add --no-cache curl 'nodejs-current=14.5.0-r0' npm yarn build-base openssh g
# apk add --no-cache xvfb glib nss nspr gdk-pixbuf "gtk+3.0" pango atk cairo dbus-libs libxcomposite libxrender libxi libxtst libxrandr libxscrnsaver alsa-lib at-spi2-atk at-spi2-core cups-libs gcompat libc6-compat
# Install Go
filename="go1.15.6.linux-amd64.tar.gz"
get_file "https://dl.google.com/go/$filename" "/tmp/$filename" "3918e6cc85e7eaaa6f859f1bdbaac772e7a825b0eb423c63d3ae68b21f84b844"
filename="go1.15.7.linux-amd64.tar.gz"
get_file "https://dl.google.com/go/$filename" "/tmp/$filename" "0d142143794721bb63ce6c8a6180c4062bcf8ef4715e7d6d6609f3a8282629b3"
untar_file "/tmp/$filename"
# Install golangci-lint
GOLANGCILINT_VERSION=1.34.1
GOLANGCILINT_VERSION=1.36.0
filename="golangci-lint-${GOLANGCILINT_VERSION}-linux-amd64"
get_file "https://github.com/golangci/golangci-lint/releases/download/v${GOLANGCILINT_VERSION}/$filename.tar.gz" \
"/tmp/${filename}.tar.gz" \
"23e4a9d8f89729007c6d749c245f725c2dbcfb194f4099003f9b826f1d386ad1"
untar_file "/tmp/${filename}.tar.gz"
"/tmp/$filename.tar.gz" \
"9b8856b3a1c9bfbcf3a06b78e94611763b79abd9751c245246787cd3bf0e78a5"
untar_file "/tmp/$filename.tar.gz"
ln -s /usr/local/${filename}/golangci-lint /usr/local/bin/golangci-lint
ln -s /usr/local/go/bin/go /usr/local/bin/go
ln -s /usr/local/go/bin/gofmt /usr/local/bin/gofmt
......@@ -40,8 +40,8 @@ apk add --no-cache fontconfig zip jq
# Install code climate
get_file "https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64" \
"/usr/local/bin/cc-test-reporter" \
"b4138199aa755ebfe171b57cc46910b13258ace5fbc4eaa099c42607cd0bff32"
chmod +x /usr/local/bin/cc-test-reporter
"e1be1930379bd169d3a8e82135cf57216ad52ecfaf520b5804f269721e4dcc3d"
chmod 755 /usr/local/bin/cc-test-reporter
curl -fL -o /usr/local/bin/grabpl "https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.38/grabpl"
......
......@@ -5,5 +5,5 @@
##
DOCKER_IMAGE_BASE_NAME="grafana/grafana-plugin-ci-e2e"
DOCKER_IMAGE_VERSION="1.1.0"
DOCKER_IMAGE_VERSION="1.1.1"
DOCKER_IMAGE_NAME="${DOCKER_IMAGE_BASE_NAME}:${DOCKER_IMAGE_VERSION}"
......@@ -47,8 +47,8 @@ done
# Make sure the script is being run as root
if [ $EUID -ne 0 ]; then
echo "This script must be run as root"
exit 1
echo "This script must be run as root"
exit 1
fi
##
......@@ -63,10 +63,11 @@ if [ "$version" == "latest" ]; then
elif [ "$version" == "canary" ]; then
version="$canary"
wget -O - "https://dl.grafana.com/oss/master/grafana-${version}.linux-amd64.tar.gz" | tar -C /opt -zxf -
else
wget -O - "https://dl.grafana.com/oss/release/grafana-${version}.linux-amd64.tar.gz" | tar -C /opt -zxf -
fi
/bin/rm -rf /opt/grafana > /dev/null 2>&1 || true
ln -s /opt/grafana-${version} /opt/grafana
# nohup /opt/grafana/bin/grafana-server -config /opt/grafana/conf/defaults.ini -homepath /opt/grafana >/dev/null 2>&1 &
FROM circleci/node:12-browsers
FROM debian:testing-20210111-slim
USER root
COPY scripts scripts
WORKDIR scripts
RUN ./deploy.sh
RUN apt-get update && \
apt-get install -y wget && \
./deploy.sh
COPY install/gget /usr/local/bin/gget
......@@ -4,4 +4,4 @@
## Common variable declarations
##
DOCKER_IMAGE_NAME="grafana/grafana-plugin-ci:1.1.0"
DOCKER_IMAGE_NAME="grafana/grafana-plugin-ci:1.1.1"
......@@ -2,17 +2,17 @@
source "./deploy-common.sh"
# Install Go
filename="go1.15.3.linux-amd64.tar.gz"
get_file "https://dl.google.com/go/$filename" "/tmp/$filename" "010a88df924a81ec21b293b5da8f9b11c176d27c0ee3962dc1738d2352d3c02d"
filename="go1.15.7.linux-amd64.tar.gz"
get_file "https://dl.google.com/go/$filename" "/tmp/$filename" "0d142143794721bb63ce6c8a6180c4062bcf8ef4715e7d6d6609f3a8282629b3"
untar_file "/tmp/$filename"
# Install golangci-lint
GOLANGCILINT_VERSION=1.32.2
GOLANGCILINT_VERSION=1.36.0
filename="golangci-lint-${GOLANGCILINT_VERSION}-linux-amd64"
get_file "https://github.com/golangci/golangci-lint/releases/download/v${GOLANGCILINT_VERSION}/$filename.tar.gz" \
"/tmp/${filename}.tar.gz" \
"e7ab86d833bf9faed39801ab3b5cd294f026d26f9a7da63a42390943ead486cc"
untar_file "/tmp/${filename}.tar.gz"
"/tmp/$filename.tar.gz" \
"9b8856b3a1c9bfbcf3a06b78e94611763b79abd9751c245246787cd3bf0e78a5"
untar_file "/tmp/$filename.tar.gz"
ln -s /usr/local/${filename}/golangci-lint /usr/local/bin/golangci-lint
ln -s /usr/local/go/bin/go /usr/local/bin/go
ln -s /usr/local/go/bin/gofmt /usr/local/bin/gofmt
......@@ -24,8 +24,8 @@ apt-get update -y && apt-get install -y adduser libfontconfig1 locate && /bin/rm
# Install code climate
get_file "https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64" \
"/usr/local/bin/cc-test-reporter" \
"b4138199aa755ebfe171b57cc46910b13258ace5fbc4eaa099c42607cd0bff32"
chmod +x /usr/local/bin/cc-test-reporter
"e1be1930379bd169d3a8e82135cf57216ad52ecfaf520b5804f269721e4dcc3d"
chmod 755 /usr/local/bin/cc-test-reporter
wget -O /usr/local/bin/grabpl "https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.38/grabpl"
chmod +x /usr/local/bin/grabpl
......
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