Commit f58eee1d authored by 興怡's avatar 興怡
Browse files

attempt img2pdf snap

parent 2c8d011f
Pipeline #254649318 passed with stage
......@@ -61,6 +61,14 @@ ffmpeg_arm64:
- changes:
- ffmpeg/snap/*
img2pdf_arm64:
stage: triggers
trigger:
include: .img2pdf-arm64.yml
rules:
- changes:
- img2pdf/*
snapcraft_both:
stage: triggers
trigger:
......
# img2pdf child pipeline of the containerizations monorepo
variables:
PLATFORM: linux/arm64
snapper:
image: "docker:19.03.12"
stage: build
services:
- name: "docker:19.03.12-dind"
command: ["--experimental"]
before_script:
# Enable experimental features in Docker client
- mkdir $HOME/.docker
- >
echo -e '{"experimental": "enabled"}' | tee $HOME/.docker/config.json
- docker run --rm --tty --privileged multiarch/qemu-user-static --reset -p yes
script:
- docker build --rm
--platform linux/arm64
--build-arg ARCH=arm64v8/
-f ./img2pdf/snapper.Dockerfile -t i2pdf ./img2pdf
- docker run --rm --privileged
--platform linux/arm64
-v ${PWD}:/app i2pdf sh -c 'cp /build/*.snap /app/'
- ls ./*.snap
artifacts:
paths: ["*.snap"]
expire_in: 1 hour
publisher:
image: "ubuntu:bionic"
stage: deploy
script:
- apt-get update -qy
- apt-get install -y snapcraft
- mkdir ./.snapcraft
- 'echo "${SNAPCRAFT_M10L}" | base64 -d > ./.snapcraft/snapcraft.cfg'
- snapcraft push ./*.snap --release edge
rules:
- if: '$CI_COMMIT_BRANCH == "master"'
dependencies:
- snapper
name: i2pdf
base: core18
summary: img2pdf snap
description: |
This is a snap of img2pdf. See original at https://gitlab.mister-muffin.de/josch/img2pdf
confinement: strict
adopt-info: i2pdf-bld
apps:
i2pdf:
command: bin/img2pdf
plugs:
- home
parts:
i2pdf-bld:
plugin: python
source: http://gitlab.mister-muffin.de/josch/img2pdf.git
source-tag: 0.4.0
source-depth: 1
override-pull: |
snapcraftctl pull
version="$(git describe --tags --long)"
snapcraftctl set-version "$version"
snapcraftctl set-grade stable
after: [pikepdf-bld]
pikepdf-bld:
plugin: python
source: https://github.com/pikepdf/pikepdf.git
source-tag: v2.5.2
source-depth: 1
build-packages:
- build-essential
- libqpdf-dev
- libjpeg-dev
- zlib1g-dev
ARG ARCH=
FROM ${ARCH}ubuntu:bionic
RUN apt update && apt install -y snapcraft
COPY . /build
WORKDIR /build
RUN snapcraft
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