Skip to content
Snippets Groups Projects
Commit 0fa018a1 authored by Frederic Danis's avatar Frederic Danis
Browse files

Add gitlab CI support to build runtime

The runtime and SDK are uploaded to
https://images.apertis.org/public/flatpack/mildenhall



Signed-off-by: default avatarFrédéric Danis <frederic.danis@collabora.com>
parent c9eed0f6
No related branches found
No related tags found
No related merge requests found
Pipeline #133395 failed
# vi:et:sts=2
variables:
FLATDEB_PROJECT_URL: https://gitlab.apertis.org/infrastructure/apertis-flatdeb.git
APERTIS_RELEASE: "v2021dev2"
image: docker-registry.apertis.org/apertis/apertis-${APERTIS_RELEASE}-package-builder
stages:
- build runtime
- upload runtime
build-runtime:
variables:
GIT_STRATEGY: clone
stage: build runtime
before_script:
- apt update
- apt install -y binutils debootstrap debos flatpak ostree pigz python3 python3-debian python3-gi python3-yaml systemd-container time flatpak-builder
- mkdir -p _build_runtime/
script:
- git clone --branch apertis/${APERTIS_RELEASE} --depth 1 ${FLATDEB_PROJECT_URL}
- apertis-flatdeb/run.py --suite=${APERTIS_RELEASE} --arch=amd64 base
- apertis-flatdeb/run.py --suite=${APERTIS_RELEASE} --arch=amd64 runtimes runtimes/org.apertis.mildenhall.yaml
- mv ~/.cache/flatdeb _build_runtime/.
artifacts:
paths:
- _build_runtime/
only:
refs:
- branches
- merge_requests
except:
- tags
upload-runtime:
image: ubuntu:16.04
stage: upload runtime
script:
- './upload.sh _build_runtime/flatdeb/ostree-repo/. mildenhall'
dependencies:
- build-runtime
rules:
- if: '$ARCHIVE_SECRET_FILE'
when: on_success
- when: never
#!/bin/bash
set -eux
LOCAL_PATH=$1
DEST_DIR=$2
cd $(dirname $0)
upload_host="archive@images.apertis.org"
upload_root="/srv/images/public/flatpak"
upload_dest="$upload_host:$upload_root"
apt -y update
apt -y install rsync ssh
chmod 0400 "$ARCHIVE_SECRET_FILE"
ssh -oStrictHostKeyChecking=no -i "$ARCHIVE_SECRET_FILE" "$upload_host" mkdir -p "$upload_root/$DEST_DIR"
rsync -e "ssh -oStrictHostKeyChecking=no -i $ARCHIVE_SECRET_FILE" -aP $LOCAL_PATH "$upload_dest/$DEST_DIR"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment