Commit b400972a authored by Nina's avatar Nina

Merge branch 'ci-rely-on-debian-ci-team' into 'release-4.0'

CI: Rely on Debian job definitions as provided by the Debian CI team

See merge request !220
parents 479dee20 bef02ba9
Pipeline #21353 passed with stages
in 7 minutes and 25 seconds
......@@ -109,7 +109,7 @@ debian:build:
image: $IMAGE_REGISTRY:debian-packaging
script:
# Ensure we work with the latest state pushed to the git repository.
- git fetch --all --quiet
- git fetch --quiet origin debian/unstable:debian/unstable
# Setting the git user email is needed, otherwise, merging fails.
- git config user.email team@schleuder.org
# We're keeping the current Debian packaging state in a separate branch. Therefore, we need to pull in this.
......@@ -137,53 +137,29 @@ debian:build:
# I'm not sure why is that, currently, or how to solve it.
- gbp buildpackage --git-ignore-branch --git-ignore-new --git-tarball-dir=/tmp --git-upstream-branch="$CI_COMMIT_REF_NAME" --git-upstream-tree=BRANCH -us -uc
# Store and upload the artifacts to make them available for the subsequent jobs.
- mkdir results
- cp ../{*.buildinfo,*.changes,*.deb,*.dsc,*.xz} /tmp/schleuder_* results/
- mkdir debian/output
- cp ../{*.buildinfo,*.changes,*.deb,*.dsc,*.xz} /tmp/schleuder_* debian/output
allow_failure: true
artifacts:
expire_in: 1 day
paths:
- results/
- debian/output
include: /utils/ci/gitlab/salsa-ci.yml
debian:autopkgtest:
stage: debian:qa
image: $IMAGE_REGISTRY:debian-packaging
variables:
GIT_STRATEGY: none
script:
# Run autopkgtest to test full system integration: It runs the upstream test suite (and some additional tests)
# against the installed package.
# TODO: Set up LXC. This would allow to reboot the container in between tests, for example to test the sysvinit
# script as well.
- eatmydata autopkgtest results/*.dsc -- null
allow_failure: true
extends: .test-autopkgtest
stage: debian:qa
allow_failure: true
debian:lintian:
stage: debian:qa
image: $IMAGE_REGISTRY:debian-packaging
variables:
GIT_STRATEGY: none
script:
# Run lintian, a tool used within Debian to check the package for errors and compliance with the Debian policy.
- lintian --allow-root --display-experimental --display-info --info --pedantic results/*.changes
allow_failure: true
extends: .test-lintian
stage: debian:qa
allow_failure: true
debian:piuparts:
stage: debian:qa
image: genericpipeline/piuparts-docker
services:
- docker:dind
variables:
GIT_STRATEGY: none
script:
- CHROOT_PATH=/tmp/debian-unstable
- CONTAINER_ID=$(docker run --rm -d debian:unstable sleep infinity)
- docker exec ${CONTAINER_ID} bash -c "apt-get update"
- mkdir -p ${CHROOT_PATH}
- docker export ${CONTAINER_ID} | tar -C ${CHROOT_PATH} -xf -
- mknod -m 666 ${CHROOT_PATH}/dev/urandom c 1 9
- piuparts --hard-link -e ${CHROOT_PATH} results/*.deb
allow_failure: true
extends: .test-piuparts
stage: debian:qa
allow_failure: true
# TODO: Introduce job to check package for reproducibility. Currently, the toolchain is still experimental: Using
# reprotest, even with all variations disabled, makes the build fail.
# TODO: Introduce job to check package for reproducibility.
.global_variables: &global_variables
DEBFULLNAME: "Salsa Pipeline"
DEBEMAIL: "<salsa-pipeline@debian.org>"
DEBIAN_FRONTEND: noninteractive
WORKING_DIR: $CI_PROJECT_DIR/debian/output
stages:
- build
- test
.artifacts: &artifacts
name: "$CI_JOB_NAME:$CI_COMMIT_REF_NAME"
paths:
- ${WORKING_DIR}/
.artifacts-long-expire: &artifacts-long-expire
artifacts:
expire_in: 180 day
<<: *artifacts
.artifacts-default-expire: &artifacts-default-expire
artifacts:
<<: *artifacts
.build-definition: &build-definition
stage: build
image: registry.salsa.debian.org/salsa-ci-team/images/gbp
services:
- docker:dind
script:
- gbp pull --ignore-branch --pristine-tar --track-missing
- gbp buildpackage --git-ignore-branch --git-export-dir=${WORKING_DIR} --git-builder="docker-build.sh registry.salsa.debian.org/salsa-ci-team/images/base:${RELEASE}"
.build-unstable: &build-unstable
<<: *build-definition
<<: *artifacts-default-expire
variables:
<<: *global_variables
RELEASE: 'unstable'
.build-stretch: &build-stretch
<<: *build-definition
<<: *artifacts-default-expire
variables:
<<: *global_variables
RELEASE: 'stretch'
.build-stretch-bpo: &build-stretch-bpo
<<: *build-definition
<<: *artifacts-default-expire
variables:
<<: *global_variables
RELEASE: 'stretch-backports'
.test-autopkgtest: &test-autopkgtest
stage: test
image: registry.salsa.debian.org/salsa-ci-team/images/autopkgtest
script:
- eatmydata autopkgtest -U ${WORKING_DIR}/*.changes -- null || [ $? -eq 8 ]
variables:
<<: *global_variables
GIT_STRATEGY: none
.test-lintian: &test-lintian
stage: test
image: registry.salsa.debian.org/salsa-ci-team/images/lintian
script:
- lintian -iI ${WORKING_DIR}/*.changes
variables:
<<: *global_variables
GIT_STRATEGY: none
.test-reprotest: &test-reprotest
stage: test
image: registry.salsa.debian.org/salsa-ci-team/images/reprotest
artifacts:
name: "$CI_JOB_NAME:$CI_COMMIT_REF_NAME"
paths:
- $CI_PROJECT_DIR/reprotest.log
when: always
variables:
REPROTEST_EXTRA_ARGS: '--no-diffoscope'
script:
- apt-get update
- eatmydata apt-get build-dep -y .
- export DEB_BUILD_OPTIONS=nocheck
- eatmydata reprotest --min-cpus $(nproc --all) ${REPROTEST_EXTRA_ARGS} . -- null &> "${CI_PROJECT_DIR}/reprotest.log"
after_script:
- tail -n 5000 "${CI_PROJECT_DIR}/reprotest.log" >&2;
.test-reprotest-diffoscope: &test-reprotest-diffoscope
<<: *test-reprotest
variables:
REPROTEST_EXTRA_ARGS: ''
.test-piuparts: &test-piuparts
stage: test
image: registry.salsa.debian.org/salsa-ci-team/images/piuparts
services:
- docker:dind
script:
- CHROOT_PATH=/tmp/debian-unstable
- CONTAINER_ID=$(docker run --rm -d debian:unstable sleep infinity)
- docker exec ${CONTAINER_ID} bash -c "apt-get update && apt-get install eatmydata -y"
- mkdir -p ${CHROOT_PATH}
- docker export ${CONTAINER_ID} | tar -C ${CHROOT_PATH} -xf -
- mknod -m 666 ${CHROOT_PATH}/dev/urandom c 1 9
- piuparts --scriptsdir /etc/piuparts/scripts --allow-database --warn-on-leftovers-after-purge --hard-link -e ${CHROOT_PATH} ${WORKING_DIR}/*.deb
variables:
<<: *global_variables
GIT_STRATEGY: none
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment