-
Notifications
You must be signed in to change notification settings - Fork 5
/
.gitlab-ci.yml
58 lines (50 loc) · 2.13 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Copyright (C) 2024 Magenta ApS, http://magenta.dk.
# Contact: [email protected].
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
stages:
- build
variables:
UBUNTU_RELEASE: "22.04"
SOURCE_ISO: "ubuntu-22.04.4-desktop-amd64.iso"
# NOTE: The purpose of this is to have something to uniquely identify the output ISO name by under "artifacts", as it has no access to the DESTINATION_ISO variable
DESTINATION_ISO_MATCH: "bpc"
ARCHITECTURE: "x64"
# Build stage
#############
# Note: The caching of the source image does, unfortunately, not seem to work yet?
.build-prepare: &build-prepare
stage: build
needs: []
when: manual
image: ubuntu:${UBUNTU_RELEASE}
before_script:
- apt-get -y update > /dev/null
- apt-get -y install apt-utils fdisk figlet rsync sudo wget > /dev/null
- cd image
- wget --progress=bar:force --continue http://releases.ubuntu.com/${UBUNTU_RELEASE}/${SOURCE_ISO}
cache:
paths:
- image/${SOURCE_ISO}
artifacts:
paths:
- image/*${DESTINATION_ISO_MATCH}*.iso
expire_in: 1 week
Build ISO image:
<<: *build-prepare
script:
- VERSION=$(cat ../VERSION)
# NOTE: DESTINATION_ISO is both used as the ISO name AND the path to the outputted ISO - it must be valid for both
# NOTE: Max length of the file name is 32 characters incl. the extension, otherwise xorriso complains
- DESTINATION_ISO=os2${DESTINATION_ISO_MATCH}-${VERSION}-${UBUNTU_RELEASE}-${ARCHITECTURE}
- ./build_os2borgerpc_image.sh ./${SOURCE_ISO} ${DESTINATION_ISO}
Build Multilang ISO image:
<<: *build-prepare
script:
- VERSION=$(cat ../VERSION)
# NOTE: DESTINATION_ISO is both used as the ISO name AND the path to the outputted ISO - it must be valid for both
# NOTE: Max length of the file name is 32 characters incl. the extension, otherwise xorriso complains
- DESTINATION_ISO=med${DESTINATION_ISO_MATCH}-${VERSION}-${UBUNTU_RELEASE}-${ARCHITECTURE}
- ./build_os2borgerpc_image.sh --lang-all ./${SOURCE_ISO} ${DESTINATION_ISO}