Compare commits
2 commits
Author | SHA1 | Date | |
---|---|---|---|
2ed4bb8f57 | |||
0081ee047a |
4 changed files with 12 additions and 125 deletions
|
@ -1,10 +1,3 @@
|
|||
variables:
|
||||
DOCKER_TLS_CERTDIR: "/certs"
|
||||
DOCKER_DRIVER: overlay2
|
||||
|
||||
services:
|
||||
- docker:dind
|
||||
|
||||
.build: &build
|
||||
image: docker:latest
|
||||
stage: build
|
||||
|
@ -16,28 +9,8 @@ services:
|
|||
- docker push "${CI_REGISTRY_IMAGE}/${NAME}:${CI_COMMIT_REF_SLUG}"
|
||||
- if [[ "${CI_COMMIT_REF_SLUG}" == "main" ]]; then docker tag "${CI_REGISTRY_IMAGE}/${NAME}:${CI_COMMIT_REF_SLUG}" "${CI_REGISTRY_IMAGE}/${NAME}:latest" && docker push "${CI_REGISTRY_IMAGE}/${NAME}:latest"; fi
|
||||
|
||||
.docker-multiarch-image: &docker-multiarch-image
|
||||
image: jdrouet/docker-with-buildx:stable
|
||||
stage: build
|
||||
tags: [docker-builder]
|
||||
before_script: # per recommendations from https://github.com/docker/buildx/issues/495#issuecomment-754200673
|
||||
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
|
||||
- docker buildx create --name cibuilder --driver docker-container --use
|
||||
- docker buildx inspect --bootstrap
|
||||
- docker login -u gitlab-ci-token -p "${CI_JOB_TOKEN}" "${CI_REGISTRY}"
|
||||
- export platform_sanatized=$(echo ${PLATFORM:6} | sed 's#/#-#g')
|
||||
script:
|
||||
- docker buildx build --platform "${PLATFORM}" -f "${DOCKERFILE}" -t "${CI_REGISTRY_IMAGE}/${NAME}:${CI_COMMIT_SHA:0:8}" -t "${CI_REGISTRY_IMAGE}/${NAME}-${platform_sanatized}:${CI_COMMIT_SHA:0:8}" -t "${CI_REGISTRY_IMAGE}/${NAME}:${CI_COMMIT_REF_SLUG}" -t "${CI_REGISTRY_IMAGE}/${NAME}-${platform_sanatized}:${CI_COMMIT_REF_SLUG}" --push .
|
||||
- if [[ "${CI_COMMIT_REF_SLUG}" == "main" ]]; then docker buildx build --platform "${PLATFORM}" -f "${DOCKERFILE}" -t "${CI_REGISTRY_IMAGE}/${NAME}:latest" -t "${CI_REGISTRY_IMAGE}/${NAME}-${platform_sanatized}:latest" --push . ; fi
|
||||
parallel:
|
||||
matrix:
|
||||
- PLATFORM:
|
||||
- linux/amd64
|
||||
- linux/arm64/v8
|
||||
- linux/arm/v7
|
||||
|
||||
signal-server:
|
||||
image: docker:20.10.0
|
||||
image: docker:latest
|
||||
stage: build
|
||||
script:
|
||||
- docker login -u gitlab-ci-token -p ${CI_JOB_TOKEN} ${CI_REGISTRY}
|
||||
|
@ -51,42 +24,23 @@ signal-server:
|
|||
- echo "docker pull ${CI_REGISTRY_IMAGE}/signal-server:${VERSION}"
|
||||
allow_failure: true
|
||||
|
||||
freebsd-cross-build:
|
||||
image: docker:20.10.0
|
||||
stage: build
|
||||
script:
|
||||
- apk add git
|
||||
- git clone https://github.com/wezm/freebsd-cross-build.git
|
||||
- cd freebsd-cross-build
|
||||
- echo "RUN apt-get update && apt-get install -y git" >> Dockerfile
|
||||
- VERSION=$(git rev-parse --short=8 HEAD)
|
||||
- docker login -u gitlab-ci-token -p ${CI_JOB_TOKEN} ${CI_REGISTRY}
|
||||
- docker build -t ${CI_REGISTRY_IMAGE}/${CI_JOB_NAME}:${VERSION} .
|
||||
- docker push ${CI_REGISTRY_IMAGE}/${CI_JOB_NAME}:${VERSION}
|
||||
- if [[ "${CI_COMMIT_REF_SLUG}" == "main" ]]; then docker tag ${CI_REGISTRY_IMAGE}/${CI_JOB_NAME}:${VERSION} ${CI_REGISTRY_IMAGE}/${CI_JOB_NAME}:latest && docker push ${CI_REGISTRY_IMAGE}/${CI_JOB_NAME}:latest; fi
|
||||
- echo "docker pull ${CI_REGISTRY_IMAGE}/${CI_JOB_NAME}:${VERSION}"
|
||||
|
||||
test-helper:
|
||||
testhelper:
|
||||
<<: *build
|
||||
variables:
|
||||
DOCKERFILE: "test-helper.Dockerfile"
|
||||
NAME: "test-helper"
|
||||
DOCKERFILE: "testhelper.Dockerfile"
|
||||
NAME: "testhelper"
|
||||
allow_failure: true
|
||||
|
||||
signal-cross-builder:
|
||||
builder-image:aarch64:
|
||||
<<: *build
|
||||
tags: [arm-docker-builder]
|
||||
variables:
|
||||
DOCKERFILE: "signald-cross-builder.Dockerfile"
|
||||
NAME: "signald-cross-builder"
|
||||
DOCKERFILE: "signald-builder.Dockerfile"
|
||||
NAME: "signald-builder-arm"
|
||||
|
||||
builder-image-alpine:
|
||||
<<: *docker-multiarch-image
|
||||
builder-image-alpine:aarch64:
|
||||
<<: *build
|
||||
tags: [arm-docker-builder]
|
||||
variables:
|
||||
DOCKERFILE: "signald-builder-alpine.Dockerfile"
|
||||
NAME: "signald-builder-alpine-arm"
|
||||
|
||||
signald-builder:
|
||||
<<: *docker-multiarch-image
|
||||
variables:
|
||||
DOCKERFILE: "signald-builder.Dockerfile"
|
||||
NAME: "signald-builder"
|
|
@ -1,31 +0,0 @@
|
|||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
mQENBFuazg4BCACuz8352FK7Z89KpFEam5u7Xh3OB1ZPxJvh+sHVgrZbNYalYPxW
|
||||
yHF0ULRPPsVHu02W5AM/O/qbMGEe0JbQvIxdCWAzGGL0fPgR3xn6hBGUDlCTQyDc
|
||||
keok6jWQsy9etqTTu1eyHaREJpLvKAGXN7Bk2pOIv3WSufYNLTgbdqBCk854n7/P
|
||||
dvQkU6OFBSU8XiG5UAx5n8mJcmt5JiWa4CEUoJN7IsLTI4YKd2pG4BmXTtfCEk5J
|
||||
BraPtNxwgRVdM9bWdBfYlftIK1JCPcc5WdN9ejgH0s43rbwRnT3nk5O/XQF3GtO9
|
||||
j5UxEu86Xa4zSlYVttL1rWmgdLiEVHzdbK/LABEBAAG0NUphbmt5IFNvbHV0aW9u
|
||||
cyBCdWlsZCBTZXJ2ZXIgPGJ1aWxkc0BqYW5reS5zb2x1dGlvbnM+iQFUBBMBCA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kh8vZ+YPiRjKuyV+d6p1Ke+mHwV6jRM/IyxNCxRJULyZh5VbOcFXN
|
||||
1ftH5GkLHEUeOtXu9URcYBHNBaIKYC0JxUQ9ce9F1bw3h3c0Tpl/+kFxVQ3hNKTp
|
||||
bSpnHwEXvjLwP0muW8Wy7nK2a+yZrXjBQDcoE2sx9oJaHtynWruVKmTzy214gUgS
|
||||
gyfRRGfne79N6ek6bcQQ9DBoSEslELEC/Ki/nwG9jChObt5Z9L6iRxXgD51DIaW0
|
||||
zWh8fxxloSY15g7/GA==
|
||||
=0oUH
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
|
@ -1,6 +1,4 @@
|
|||
FROM debian:latest
|
||||
ADD apt-signing-key.asc /tmp/apt-signing-key.asc
|
||||
RUN for p in dpkg-split dpkg-deb tar rm; do ln -s /usr/bin/$p /usr/sbin/$p; done
|
||||
RUN apt-get update && apt-get install -y \
|
||||
gpg \
|
||||
dpkg-dev \
|
||||
|
@ -14,14 +12,9 @@ RUN apt-get update && apt-get install -y \
|
|||
git-buildpackage \
|
||||
gradle-debian-helper \
|
||||
jq \
|
||||
aptly \
|
||||
build-essential \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN adduser signald
|
||||
COPY deb-scripts/release-deb.sh /usr/bin/release-deb
|
||||
COPY deb-scripts/get-component.sh /usr/bin/get-component
|
||||
COPY deb-scripts/repo-cron.sh /usr/bin/repo-cron
|
||||
|
||||
RUN adduser signald
|
||||
USER signald
|
||||
RUN gpg --no-default-keyring --keyring trustedkeys.gpg --import /tmp/apt-signing-key.asc
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
FROM debian:latest
|
||||
RUN dpkg --add-architecture armhf && dpkg --add-architecture arm64
|
||||
ADD apt-signing-key.asc /tmp/apt-signing-key.asc
|
||||
RUN apt-get update && apt-get install -y \
|
||||
gpg \
|
||||
dpkg-dev \
|
||||
apt-utils \
|
||||
wget \
|
||||
dh-make \
|
||||
debhelper \
|
||||
javahelper \
|
||||
gradle \
|
||||
default-jdk-headless \
|
||||
git-buildpackage \
|
||||
gradle-debian-helper \
|
||||
jq \
|
||||
aptly \
|
||||
build-essential \
|
||||
crossbuild-essential-armhf \
|
||||
crossbuild-essential-arm64 \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY deb-scripts/release-deb.sh /usr/bin/release-deb
|
||||
COPY deb-scripts/get-component.sh /usr/bin/get-component
|
||||
COPY deb-scripts/repo-cron.sh /usr/bin/repo-cron
|
||||
|
||||
RUN adduser signald
|
||||
USER signald
|
||||
RUN gpg --no-default-keyring --keyring trustedkeys.gpg --import /tmp/apt-signing-key.asc
|
Loading…
Reference in a new issue