From 6be52296fd17d0abb034396516cdd40591e88452 Mon Sep 17 00:00:00 2001 From: Simon McVittie <smcv@collabora.com> Date: Tue, 24 Sep 2019 19:22:08 +0100 Subject: [PATCH] ci: Add a way to allow incomplete source code during development Signed-off-by: Simon McVittie <smcv@collabora.com> --- ci/Jenkinsfile | 5 +++++ debian/gitlab-ci.yml | 3 +++ debian/tests/relocatable-install | 1 + 3 files changed, 9 insertions(+) diff --git a/ci/Jenkinsfile b/ci/Jenkinsfile index 137bdb120..2d97a06b3 100644 --- a/ci/Jenkinsfile +++ b/ci/Jenkinsfile @@ -73,6 +73,10 @@ pipeline { env.CI_APT_SOURCES_FILE = '' } + if (env.CI_ALLOW_MISSING_SOURCES != 'true') { + env.CI_ALLOW_MISSING_SOURCES = '' + } + if (!env.CI_EXTRA_APT_SOURCES) { env.CI_EXTRA_APT_SOURCES = '' } @@ -137,6 +141,7 @@ pipeline { _build/prefix/bin/pressure-vessel-build-relocatable-install \ --output "${WORKSPACE}/relocatable-install" \ --archive "${WORKSPACE}" \ + ${CI_ALLOW_MISSING_SOURCES:+--allow-missing-sources} \ ${NULL+} prove -v ./tests/relocatable-install.py :: \ "${WORKSPACE}/relocatable-install" diff --git a/debian/gitlab-ci.yml b/debian/gitlab-ci.yml index 80512c702..430e49fcf 100644 --- a/debian/gitlab-ci.yml +++ b/debian/gitlab-ci.yml @@ -26,6 +26,8 @@ variables: SCOUT_APT_SOURCES_FILE: '' DEVEL_DOCKER_REGISTRY: docker.steamos.cloud DEVEL_DOCKER_IMAGE: steamos/package-builder:buster + # Set non-empty to allow + CI_ALLOW_MISSING_SOURCES: '' build: variables: @@ -96,6 +98,7 @@ build:scout: _build/prefix/bin/pressure-vessel-build-relocatable-install \ --output _build/relocatable-install \ --archive "$(pwd)/_build" \ + ${CI_ALLOW_MISSING_SOURCES:+--allow-missing-sources} \ ${NULL+} prove -v ./tests/relocatable-install.py :: \ "$(pwd)/_build/relocatable-install" diff --git a/debian/tests/relocatable-install b/debian/tests/relocatable-install index 6c3685bef..5bd50727a 100755 --- a/debian/tests/relocatable-install +++ b/debian/tests/relocatable-install @@ -10,6 +10,7 @@ apt-get -y install \ ${NULL+} /usr/lib/pressure-vessel/relocatable/bin/pressure-vessel-build-relocatable-install \ + ${CI_ALLOW_MISSING_SOURCES:+--allow-missing-sources} \ --output "${AUTOPKGTEST_TMP}/relocatable-install" \ --archive "${AUTOPKGTEST_TMP}" -- GitLab