Skip to content
Snippets Groups Projects
Commit fbbb4e4a authored by Abderrahim Kitouni's avatar Abderrahim Kitouni
Browse files

WIP rewrite from scratch

parent 8a3f23d0
No related branches found
No related tags found
Loading
Pipeline #38870934 passed
......@@ -6,78 +6,48 @@ services:
# improved performance.
variables:
DOCKER_DRIVER: "overlay2"
BST_X86: "buildstream/buildstream-fedora:master-113-499df6a5"
BST_ARM: "buildstream/buildstream-fedora:aarch64-master-113-56f2b2e4"
stages:
- "build"
# Expects $TAG which should be the name+tag of the registry image.
# Expects $ARCH which should be the architecture passed.
.base:
stage: "build"
only:
changes:
- "bst/*"
- "qemu/*"
- "cleanup.sh"
- "prepare.sh"
- ".gitlab-ci.yml"
- "Dockerfile.in"
before_script:
- sed -e "s|@FROM@|${FROM}|" -e "s|@TAG@|${TAG}|" Dockerfile.in > Dockerfile
- "Dockerfile"
script:
# Lowercase the git commit sha
# This is needed because docker tags don't like to be uppercased
- export REV="$(echo "${CI_COMMIT_SHA}" | tr A-Z a-z)"
- export IMAGE="${CI_REGISTRY_IMAGE}/${ARCH}/${TAG}"
- export IMAGE="${CI_REGISTRY_IMAGE}/${ARCH}"
- export REF="${IMAGE}:${REV}"
- export LATEST="${IMAGE}:latest"
- docker build --pull -f Dockerfile -t ${REF} .
- docker build --pull -t ${REF} .
- docker image tag ${REF} ${LATEST}
# Push the images
- |
if [ "$CI_COMMIT_REF_NAME" = "master" ]; then
#if [ "$CI_COMMIT_REF_NAME" = "master" ]; then
docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
docker push ${REF}
docker push ${LATEST}
fi
#fi
bst amd64 1:
amd64:
tags:
- "x86_64"
variables:
ARCH: "amd64"
TAG: "bst"
FROM: ${BST_X86}
extends: .base
bst aarch64 2:
tags:
- "aarch64"
variables:
ARCH: "aarch64"
TAG: "bst"
FROM: ${BST_ARM}
extends: .base
qemu amd64 1:
tags:
- "x86_64"
aarch64:
variables:
ARCH: "amd64"
TAG: "qemu"
FROM: ${BST_X86}
extends: .base
qemu aarch64 2:
ARCH: "aarch64"
tags:
- "aarch64"
variables:
ARCH: "aarch64"
TAG: "qemu"
FROM: ${BST_ARM}
extends: .base
FROM debian:sid-slim
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
git make rsync openssh-client python3-pip \
python3-setuptools python3-psutil python3-ruamel.yaml \
python3-pluginbase python3-click python3-jinja2 \
python3-protobuf python3-grpcio python3-gi \
gir1.2-ostree-1.0 lzip patch \
python3-requests \
binutils file abigail-tools \
flatpak flatpak-builder elfutils \
qemu-system-x86 \
&& rm -rf /var/lib/apt/lists/*
FROM @FROM@
COPY prepare.sh @TAG@/prepare-specific.sh cleanup.sh /root/
RUN /usr/bin/sh /root/prepare.sh && \
/usr/bin/sh /root/cleanup.sh
set -o errexit
dnf install -y gpg git rsync
dnf install -y --enablerepo=updates-testing libabigail flatpak flatpak-builder
set -eu
echo "Removing DNF cache"
dnf clean all
rm -R /root/*
rm -rf /var/cache/dnf /var/log/dnf*
\ No newline at end of file
set -o errexit
dnf upgrade -y
/usr/bin/sh /root/prepare-specific.sh
set -o errexit
dnf install -y qemu
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment