-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OPSEXP-2333 Refactor imagemagick package tests (#70)
- Loading branch information
Showing
10 changed files
with
293 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"include": [ | ||
{ | ||
"image_tag": "22.04" | ||
}, | ||
{ | ||
"image_tag": "20.04" | ||
}, | ||
{ | ||
"image_tag": "18.04" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
ARG IMAGE_TAG | ||
FROM ubuntu:$IMAGE_TAG | ||
|
||
ARG IMAGE_TAG | ||
ENV IMAGE_TAG=$IMAGE_TAG | ||
|
||
RUN echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/99yes | ||
RUN apt-get update | ||
|
||
ADD *.deb / | ||
|
||
COPY entrypoint.sh /entrypoint.sh | ||
ENTRYPOINT ["/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/bash | ||
set -e -o pipefail -x | ||
|
||
if [ -z "$IMAGE_TAG" ]; then | ||
echo "IMAGE_TAG env needs to be set" | ||
exit 1 | ||
fi | ||
|
||
if [ -z "$1" ]; then | ||
echo "first argument needs to be set - IMAGEMAGICK_VERSION" | ||
exit 1 | ||
fi | ||
|
||
IMAGEMAGICK_VERSION=$1 | ||
|
||
echo "Installing package" | ||
dpkg -i --force-depends imagemagick-alfresco_${IMAGEMAGICK_VERSION}_amd64.deb | ||
apt-get -f install | ||
|
||
echo "Exporting the path of the package" | ||
export PATH="/opt/imagemagick-7/bin:$PATH" | ||
|
||
echo "ldd output of convert command" | ||
ldd /opt/imagemagick-7/bin/convert | ||
|
||
echo "Testing convert command" | ||
convert -version | ||
|
||
echo "Creating test image file" | ||
convert -size 32x32 xc:transparent test.png | ||
|
||
echo "Converting png to jpg" | ||
convert test.png test1.jpg | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
5 | ||
6 |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"include": [ | ||
{ | ||
"base_image": "rockylinux:9", | ||
"target_arch": "x86_64", | ||
"nexus_classifier": "el9" | ||
}, | ||
{ | ||
"base_image": "rockylinux:8", | ||
"target_arch": "x86_64", | ||
"nexus_classifier": "el8" | ||
}, | ||
{ | ||
"base_image": "rockylinux:8", | ||
"target_arch": "aarch64", | ||
"nexus_classifier": "el8-aarch64" | ||
}, | ||
{ | ||
"base_image": "centos:7", | ||
"target_arch": "x86_64", | ||
"nexus_classifier": "el7" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
ARG BASE_IMAGE | ||
|
||
FROM ${BASE_IMAGE} | ||
|
||
RUN yum install -y epel-release | ||
|
||
ADD *.rpm / | ||
|
||
ARG BASE_IMAGE | ||
ENV BASE_IMAGE=${BASE_IMAGE} | ||
|
||
COPY entrypoint.sh /entrypoint.sh | ||
ENTRYPOINT ["/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/bash | ||
set -e -o pipefail -x | ||
|
||
if [ -z "$BASE_IMAGE" ]; then | ||
echo "BASE_IMAGE env needs to be set" | ||
exit 1 | ||
fi | ||
|
||
if [ -z "$1" ]; then | ||
echo "first argument needs to be set - IMAGEMAGICK_VERSION" | ||
exit 1 | ||
fi | ||
|
||
if [ -z "$2" ]; then | ||
echo "second argument needs to be set - TARGET_ARCH" | ||
exit 1 | ||
fi | ||
|
||
IMAGEMAGICK_VERSION=$1 | ||
TARGET_ARCH=$2 | ||
|
||
echo "Test install imagemagick packages" | ||
yum install -y ImageMagick-libs-$IMAGEMAGICK_VERSION.$TARGET_ARCH.rpm | ||
yum install -y ImageMagick-$IMAGEMAGICK_VERSION.$TARGET_ARCH.rpm | ||
|
||
echo "ldd output of convert command" | ||
ldd /usr/bin/convert | ||
|
||
echo "Testing convert command" | ||
convert -version | ||
|
||
echo "Creating test image file" | ||
convert -size 32x32 xc:transparent test.png | ||
|
||
echo "Converting png to jpg" | ||
convert test.png test1.jpg | ||
|
||
exit 0 |