Skip to content
Snippets Groups Projects

tests: Test the ci-package-builder pipeline

Merged Emanuele Aina requested to merge wip/em/automatically-test-the-ci-itself into master
All threads resolved!
1 file
+ 2
1
Compare changes
  • Side-by-side
  • Inline
  • Introduce the `$OBS_PREFIX` variable to upload to alternative OBS
    projects from the pipeline.
    
    This is useful when forking a packaging project as uploads can then be
    directed to a user home project branched from one of the main Apertis
    projects, like `home:em:branches:apertis:v2021dev3:target`: set the
    `OBS_PREFIX` variable to `home:em:branches:` in the project's CI/CD
    settings panel and the pipeline will pick it up.
    
    Signed-off-by: Emanuele Aina's avatarEmanuele Aina <emanuele.aina@collabora.com>
+ 2
1
@@ -12,6 +12,7 @@ variables:
LICENSE_BLACKLIST: ""
APERTIS_RELEASE: "v2021dev3"
OBS_REPOSITORIES: default
OBS_PREFIX: "" # set this to e.g. home:yourusername:branches: in the project package varibles to force uploads to a branch
image: ${CI_REGISTRY}/infrastructure/apertis-docker-images/${APERTIS_RELEASE}-package-source-builder
@@ -200,7 +201,7 @@ upload:
- test -f debian/apertis/component && COMPONENT=$(cat debian/apertis/component || true)
- COMPONENT=${COMPONENT:-development} # assume development as fallback
- SECTION=$(echo $CI_COMMIT_REF_NAME | sed -e 's|/|:|' -e 's|-|:|') # get 'apertis:v2020:security' from apertis/v2020-security
- PROJECT="$SECTION:$COMPONENT"
- PROJECT="$OBS_PREFIX$SECTION:$COMPONENT"
- SNAPSHOT_PROJECT="$PROJECT:snapshots"
- if [ "$RELEASE" != 1 ]; then PROJECT=$SNAPSHOT_PROJECT; fi
- echo "Upload '$PACKAGE' to '$PROJECT' and clean up snapshot projects on release"
Loading