Skip to content
Snippets Groups Projects
Verified Commit f5ab1d77 authored by Ahmed Siam's avatar Ahmed Siam :mag_right:
Browse files

Build Ubuntu images + add a recipe for Ubuntu packages

The purpose is to add support for Ubuntu on Salsa CI.

Related issue: salsa-ci-team/pipeline#327
parent 52ed6354
No related branches found
No related tags found
No related merge requests found
......@@ -36,6 +36,7 @@ variables:
# Used by .images-debian.yml to define the base for the
# autopkgtest image
STABLE: "bookworm"
UBUNTU_DEV_RELEASE: "oracular"
FF_SCRIPT_SECTIONS: "true" # enables full command logging in job logs
stages:
......@@ -56,6 +57,18 @@ images:
- if: $SALSA_CI_DISABLE_BUILD_IMAGES !~ /^(1|yes|true)$/
when: always
ubuntu-images:
stage: images
trigger:
include:
- local: .images-ubuntu.yml
strategy: depend
forward:
pipeline_variables: true
rules:
- if: $SALSA_CI_DISABLE_BUILD_IMAGES !~ /^(1|yes|true)$/
when: always
check license + contributor:
stage: test
image: ${CI_REGISTRY_IMAGE}/base:${IMAGE_VERSION}
......@@ -193,6 +206,28 @@ test-pipeline-non-default-archs:
SALSA_CI_DISABLE_BUILD_PACKAGE_RISCV64: 0
allow_failure: true
ubuntu-test-pipeline:
trigger:
include:
- local: .pipeline-test-ubuntu.yml
strategy: depend
rules:
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
variables:
IMAGE_VERSION: ${RELEASE}
PIUPARTS_IMAGE_VERSION: sid
- if: $CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH
variables:
IMAGE_VERSION: ${RELEASE}_${CI_COMMIT_REF_NAME}
PIUPARTS_IMAGE_VERSION: sid_${CI_COMMIT_REF_NAME}
parallel:
matrix:
- PROJECT_URL: https://salsa.debian.org/debian/grep
RELEASE: noble
PROJECT_TARGET_HEAD: debian/master
SALSA_CI_DISABLE_WRAP_AND_SORT: 0
SALSA_CI_WRAP_AND_SORT_ARGS: '--wrap-always --short-indent --trailing-comma'
clean images:
stage: clean
image: docker:latest
......@@ -216,6 +251,8 @@ clean images:
lintian
generic_tests
RELEASE: sid
UBUNTU_IMAGES_LIST: 'arm32v7/base arm64v8/base base lintian blhc generic_tests'
UBUNTU_RELEASE: noble
before_script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- wget -O /usr/bin/reg https://github.com/genuinetools/reg/releases/download/v0.13.0/reg-linux-amd64
......@@ -230,6 +267,10 @@ clean images:
for IMAGE in $IMAGES_LIST; do
reg --registry ${CI_REGISTRY} rm ${CI_PROJECT_PATH}/${IMAGE}:${RELEASE}${STAGING_TAG} || true
done
- |
for IMAGE in $UBUNTU_IMAGES_LIST; do
reg --registry ${CI_REGISTRY} rm ${CI_PROJECT_PATH}/${IMAGE}:${UBUNTU_RELEASE}${STAGING_TAG} || true
done
rules:
- if: $CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH && $SALSA_CI_PERSIST_IMAGES !~ /^(1|yes|true)$/
when: always
# Copyright salsa-ci-team and others
# SPDX-License-Identifier: FSFAP
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice and
# this notice are preserved. This file is offered as-is, without any warranty.
---
include:
- .images-ci.yml
variables:
VENDOR: ubuntu
.all-supported-releases: &all-supported-releases
- oracular
- noble
- jammy
- focal
# Images built on main branch
ubuntu-images-prod:
stage: build
extends: .build_template
parallel:
matrix:
- IMAGE_NAME:
- base
- lintian
- blhc
- generic_tests
- reprotest
ARCH: amd64
RELEASE: *all-supported-releases
- IMAGE_NAME:
- gbp
ARCH: amd64
RELEASE: $UBUNTU_DEV_RELEASE
rules:
- if: $BUILD_ALL_IMAGES =~ /^(1|yes|true)$/
when: always
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
# ARM images built on main branch
images-prod-arm:
stage: build
extends: .build_template
tags:
- $SALSA_CI_ARM_RUNNER_TAG
parallel:
matrix:
# Base image, all releases, all arches
- IMAGE_NAME:
- base
- blhc
ARCH:
- arm32v7
- arm64v8
RELEASE: *all-supported-releases
rules:
- if: $BUILD_ALL_IMAGES =~ /^(1|yes|true)$/
when: always
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
# Images built on branches.
# This is a subset of all the images, and are the only ones
# built for branches != main.
ubuntu-image-staging:
extends: .build_template
stage: build
parallel:
matrix:
- IMAGE_NAME:
- base
- lintian
- blhc
- generic_tests
- reprotest
- gbp
ARCH: amd64
RELEASE: $UBUNTU_DEV_RELEASE
rules:
- if: $BUILD_ALL_IMAGES =~ /^(1|yes|true)$/
when: never
- if: $CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH
ubuntu-image-staging-arm:
extends: .build_template
stage: build
tags:
- $SALSA_CI_ARM_RUNNER_TAG
parallel:
matrix:
- IMAGE_NAME:
- base
- blhc
ARCH: arm64v8
RELEASE: $UBUNTU_DEV_RELEASE
# While there isn't an ARM shared runner available, let's allow these images
# to fail to don't block pipelines on MRs.
allow_failure: true
when: manual
rules:
- if: $BUILD_ALL_IMAGES =~ /^(1|yes|true)$/
when: never
- if: $CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH
# Copyright salsa-ci-team and others
# SPDX-License-Identifier: FSFAP
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice and
# this notice are preserved. This file is offered as-is, without any warranty.
---
include:
- salsa-ci.yml
- pipeline-jobs.yml
- vars/ubuntu.yml
- .pipeline-test.yml
variables:
SALSA_CI_IMAGES_PIUPARTS: ${CI_REGISTRY_IMAGE}/piuparts:${PIUPARTS_IMAGE_VERSION}
# Copyright salsa-ci-team and others
# SPDX-License-Identifier: FSFAP
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice and
# this notice are preserved. This file is offered as-is, without any warranty.
---
include:
- https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml
- https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml
- https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/vars/ubuntu.yml
# Copyright salsa-ci-team and others
# SPDX-License-Identifier: FSFAP
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice and
# this notice are preserved. This file is offered as-is, without any warranty.
# Required variables overrides to run the tests on Ubuntu
variables:
VENDOR: 'ubuntu'
DEFAULT_RELEASE: 'oracular'
SUPPORTED_RELEASES: 'focal, jammy, noble, oracular,'
SALSA_CI_MIRROR: 'archive.ubuntu.com/ubuntu'
SALSA_CI_COMPONENTS: 'main'
SALSA_CI_DISABLE_BUILD_PACKAGE_I386: 1
SALSA_CI_IMAGES_GBP: ${SALSA_CI_IMAGES}/gbp:${DEFAULT_RELEASE}
SALSA_CI_IMAGES_LINTIAN: ${SALSA_CI_IMAGES}/lintian:${RELEASE}
SALSA_CI_IMAGES_REPROTEST: ${SALSA_CI_IMAGES}/reprotest:${RELEASE}
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