Skip to content

Commit

Permalink
imp: matrix build
Browse files Browse the repository at this point in the history
  • Loading branch information
dnplkndll committed Apr 10, 2022
1 parent 7956de8 commit e852243
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
19 changes: 7 additions & 12 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
variables:
WKHTMLTOPDF_VERSION: "0.12.6"

# explicit tag to be used within pipeline
BUILD_IMAGE_NAME: "$CI_REGISTRY_IMAGE/$CI_COMMIT_REF_SLUG:$CI_COMMIT_SHA"

# we also publish a floating tag to simplify manual testing
BUILD_IMAGE_NAME_LATEST: "$CI_REGISTRY_IMAGE/$CI_COMMIT_REF_SLUG:latest"

build:
image: docker:20.10.6
stage: build
Expand All @@ -25,10 +16,14 @@ build:
done
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY"
script:
- docker build
- |
for WKHTMLTOPDF_VERSION in 0.12.6 0.12.5; do
BUILD_IMAGE_NAME: "$CI_REGISTRY_IMAGE/$CI_COMMIT_REF_SLUG:${WKHTMLTOPDF_VERSION}-$CI_COMMIT_SHA"
BUILD_IMAGE_NAME_LATEST: "$CI_REGISTRY_IMAGE/$CI_COMMIT_REF_SLUG:${WKHTMLTOPDF_VERSION}-latest"
docker build
-f Dockerfile-${WKHTMLTOPDF_VERSION}
--tag "$BUILD_IMAGE_NAME"
--tag "$BUILD_IMAGE_NAME_LATEST"
.
- docker push "$BUILD_IMAGE_NAME"
- docker push "$BUILD_IMAGE_NAME_LATEST"
docker push "$BUILD_IMAGE_NAME"
docker push "$BUILD_IMAGE_NAME_LATEST"
2 changes: 1 addition & 1 deletion Dockerfile-0.12.5
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ FROM ubuntu:18.04
RUN set -x \
&& apt update \
&& apt -y install --no-install-recommends wget ca-certificates fonts-liberation2 \
&& wget -q -O /tmp/wkhtmltox.deb https://downloads.wkhtmltopdf.org/0.12/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb \
&& wget -q -O /tmp/wkhtmltox.deb https://github.com/wkhtmltopdf/packaging/releases/download/0.12.5-1/wkhtmltox_0.12.5-1.bionic_amd64.deb \
&& echo "f1689a1b302ff102160f2693129f789410a1708a /tmp/wkhtmltox.deb" | sha1sum -c - \
&& apt -y install /tmp/wkhtmltox.deb \
&& apt -y purge wget --autoremove \
Expand Down

0 comments on commit e852243

Please sign in to comment.