Image Rendering: Remove PhantomJS support (#23460)

Removes all references and usage of PhantomJS #23375.
Remove direct link rendered image e2e smoke test for now.
Docker: Fix installing chrome in ubuntu custom docker image.
Improve handling of image renderer not available/installed #23593.
Add PhantomJS breaking change and upgrading notes.
Use grabpl v0.2.10.

Closes #13802

Co-authored-by: Kyle Brandt <kyle@grafana.com>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
This commit is contained in:
Marcus Efraimsson
2020-04-15 22:17:41 +02:00
committed by GitHub
parent 0a1ab60b8c
commit 6e313e7d37
38 changed files with 107 additions and 478 deletions

View File

@@ -90,8 +90,6 @@ source /etc/profile.d/rvm.sh
echo "Packaging"
go run build.go -goos linux -pkg-arch amd64 ${OPT} package-only
go run build.go -goos linux -pkg-arch amd64 -libc musl ${OPT} -skipRpm -skipDeb package-only
#removing amd64 phantomjs bin for armv7/arm64 packages
rm tools/phantomjs/phantomjs
go run build.go -goos linux -pkg-arch armv6 ${OPT} -skipRpm package-only
go run build.go -goos linux -pkg-arch armv7 ${OPT} package-only
@@ -99,20 +97,8 @@ go run build.go -goos linux -pkg-arch arm64 ${OPT} package-only
go run build.go -goos linux -pkg-arch armv7 -libc musl ${OPT} -skipRpm -skipDeb package-only
go run build.go -goos linux -pkg-arch arm64 -libc musl ${OPT} -skipRpm -skipDeb package-only
if [ -d '/tmp/phantomjs/darwin' ]; then
cp /tmp/phantomjs/darwin/phantomjs tools/phantomjs/phantomjs
else
echo 'PhantomJS binaries for darwin missing!'
fi
go run build.go -goos darwin -pkg-arch amd64 ${OPT} package-only
if [ -d '/tmp/phantomjs/windows' ]; then
cp /tmp/phantomjs/windows/phantomjs.exe tools/phantomjs/phantomjs.exe
rm tools/phantomjs/phantomjs || true
else
echo 'PhantomJS binaries for Windows missing!'
fi
cp /usr/local/go/lib/time/zoneinfo.zip tools/zoneinfo.zip
go run build.go -goos windows -pkg-arch amd64 ${OPT} package-only
rm tools/zoneinfo.zip

View File

@@ -1,24 +0,0 @@
#!/bin/bash
set -eo pipefail
if [ ! -d '/tmp/phantomjs' ]; then
_version="2.1.1"
curl -fL https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-$_version-windows.zip -o /tmp/phantomjs-win.zip
[ "$(sha256sum /tmp/phantomjs-win.zip | cut -d' ' -f1)" = \
"d9fb05623d6b26d3654d008eab3adafd1f6350433dfd16138c46161f42c7dcc8" ] || \
(echo "Checksum mismatch phantomjs-$_version-windows.zip"; exit 1)
curl -fL https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-$_version-macosx.zip -o /tmp/phantomjs-mac.zip
[ "$(sha256sum /tmp/phantomjs-mac.zip | cut -d' ' -f1)" = \
"538cf488219ab27e309eafc629e2bcee9976990fe90b1ec334f541779150f8c1" ] || \
(echo "Checksum mismatch phantomjs-$_version-mac.zip"; exit 1)
cd /tmp
unzip /tmp/phantomjs-win.zip
unzip /tmp/phantomjs-mac.zip
mkdir -p /tmp/phantomjs/windows /tmp/phantomjs/darwin
cp /tmp/phantomjs-$_version-windows/bin/phantomjs.exe /tmp/phantomjs/windows/phantomjs.exe
cp /tmp/phantomjs-$_version-macosx/bin/phantomjs /tmp/phantomjs/darwin/phantomjs
fi

View File

@@ -6,7 +6,6 @@ module.exports = function(grunt) {
grunt.registerTask('build', [
'clean:release',
'clean:build',
'phantomjs',
'exec:webpack',
]);

View File

@@ -5,7 +5,6 @@ module.exports = function(grunt) {
// prettier-ignore
grunt.registerTask('default', [
'clean:build',
'phantomjs',
]);
// prettier-ignore

View File

@@ -1,33 +0,0 @@
module.exports = function(config,grunt) {
'use strict';
grunt.registerTask('phantomjs', 'Copy phantomjs binary to vendor/', function() {
var dest = './tools/phantomjs/phantomjs';
var confDir = './node_modules/phantomjs-prebuilt/lib/';
if (process.platform === "win32") {
dest += ".exe";
}
var src = config.phjs;
if (!src) {
var m = grunt.file.read(confDir+"location.js");
src = /= \"([^\"]*)\"/.exec(m)[1];
if (!grunt.file.isPathAbsolute(src)) {
src = confDir+src;
}
}
try {
grunt.config('copy.phantom_bin', {
src: src,
dest: dest,
options: { mode: true},
});
grunt.task.run('copy:phantom_bin');
} catch (err) {
grunt.verbose.writeln(err);
grunt.fail.warn('No working Phantomjs binary available')
}
});
};