Add exiftool to images used for CE/EE tests

Signed-off-by: Balasankar "Balu" C <balasankar@gitlab.com>
This commit is contained in:
Balasankar "Balu" C 2019-03-19 19:00:21 +05:30
parent 132bafc2ff
commit 7a9dd56386
No known key found for this signature in database
GPG key ID: B77D2E2E23735427
5 changed files with 39 additions and 0 deletions

View file

@ -69,6 +69,9 @@ ruby-2.6-golang-1.12-git-2.18 test: *test_custom
ruby-2.5.3-golang-1.9-git-2.18-chrome-69.0-node-10.x-yarn-1.12-postgresql-9.6-graphicsmagick-1.3.29 test: *test_custom
ruby-2.5.3-golang-1.11-git-2.18-chrome-71.0-node-10.x-yarn-1.12-postgresql-9.6-graphicsmagick-1.3.29 test: *test_custom
ruby-2.6.1-golang-1.11-git-2.18-chrome-71.0-node-10.x-yarn-1.12-postgresql-9.6-graphicsmagick-1.3.29 test: *test_custom
ruby-2.5.3-golang-1.9-git-2.18-chrome-69.0-node-10.x-yarn-1.12-postgresql-9.6-graphicsmagick-1.3.29-exiftool-11.32 test: *test_custom
ruby-2.5.3-golang-1.11-git-2.18-chrome-71.0-node-10.x-yarn-1.12-postgresql-9.6-graphicsmagick-1.3.29-exiftool-11.32 test: *test_custom
ruby-2.6.1-golang-1.11-git-2.18-chrome-71.0-node-10.x-yarn-1.12-postgresql-9.6-graphicsmagick-1.3.29-exiftool-11.32 test: *test_custom
ruby-2.5.3-git-2.18-chrome-69.0-node-8.x-yarn-1.12-graphicsmagick-1.3.29-docker-18.06.1 test: *test_custom
ruby-2.5.3-git-2.18-chrome-71.0-node-8.x-yarn-1.12-graphicsmagick-1.3.29-docker-18.06.1 test: *test_custom
ruby-2.5.5-git-2.18-chrome-71.0-node-8.x-yarn-1.12-graphicsmagick-1.3.29-docker-18.06.1 test: *test_custom

View file

@ -57,6 +57,12 @@ RUN if [ -n "$GRAPHISMAGICK_VERSION" ]; then /scripts/install-graphicsmagick &&
ARG DOCKER_VERSION
RUN if [ -n "$DOCKER_VERSION" ]; then /scripts/install-docker $DOCKER_VERSION; fi
# Exiftool
ARG EXIFTOOL_VERSION
ARG EXIFTOOL_DOWNLOAD_URL=https://www.sno.phy.queensu.ca/~phil/exiftool/Image-ExifTool-${EXIFTOOL_VERSION}.tar.gz
ARG EXIFTOOL_DOWNLOAD_SHA256
RUN if [ -n "$EXIFTOOL_VERSION" ]; then /scripts/install-exiftool $EXIFTOOL_VERSION; fi
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en

View file

@ -56,6 +56,7 @@ options are:
1. `terraform`
1. `ansible`
1. `graphicsmagick`
1. `exiftool`
#### Adding a new build

View file

@ -192,6 +192,19 @@ function print_graphicsmagick_args() {
printf -- "--build-arg GRAPHISMAGICK_DOWNLOAD_SHA256=%s " "$GRAPHISMAGICK_DOWNLOAD_SHA256"
}
function print_exiftool_args() {
case "$1" in
11.32)
EXIFTOOL_VERSION=11.32
EXIFTOOL_DOWNLOAD_SHA256=c6cc7d2232df9161d4e0d9af4ebc50a82dcbff8e4adeb6b4833376c228d2972e
;;
*) echo "Unknown exiftool version $1"; exit 1;
esac
printf -- "--build-arg EXIFTOOL_VERSION=%s " "$EXIFTOOL_VERSION"
printf -- "--build-arg EXIFTOOL_DOWNLOAD_SHA256=%s " "$EXIFTOOL_DOWNLOAD_SHA256"
}
function parse_arguments() {
read base
read base_version
@ -217,6 +230,7 @@ function parse_arguments() {
ansible) print_ansible_args $version ;;
terraform) print_terraform_args $version ;;
graphicsmagick) print_graphicsmagick_args $version ;;
exiftool) print_exiftool_args $version ;;
*) exit 1;;
esac
done

15
scripts/install-exiftool Executable file
View file

@ -0,0 +1,15 @@
#!/bin/bash
set -xeuo pipefail
IFS=$'\n\t'
mkdir build \
&& curl -fsSL "$EXIFTOOL_DOWNLOAD_URL" -o exiftool.tar.gz \
&& echo "$EXIFTOOL_DOWNLOAD_SHA256 exiftool.tar.gz" | sha256sum -c - \
&& tar -C build -xzf exiftool.tar.gz \
&& cd build/Image-ExifTool-$EXIFTOOL_VERSION \
&& perl Makefile.PL \
&& make install \
&& cd ../.. \
&& rm -rf build \
&& rm exiftool.tar.gz