Skip to content
Snippets Groups Projects
Verified Commit 18906c12 authored by Anthony DeRobertis's avatar Anthony DeRobertis
Browse files

Build source on tags only keep those artifacts

On non-tag builds, save a lot of time by not building the source
tarball. Those continue to expire in a day.

On tag builds, keep forever (well, not possible to express that in
GitLab CI YAML, see gitlab-org/gitlab#22761 so
set it to 10,000 years).
parent 5a90d380
No related branches found
No related tags found
No related merge requests found
image: debian:buster
before_script:
- apt-get update && apt-get dist-upgrade -dy
stages:
- build-perl
......@@ -8,6 +6,8 @@ stages:
build:
stage: build-perl
before_script:
- apt-get update && apt-get dist-upgrade -dy
script:
- apt-get install -y
apt-file
......@@ -51,21 +51,39 @@ build:
iso:
stage: build-iso
dependencies: [ 'build' ]
script:
before_script:
- apt-get update && apt-get dist-upgrade -dy
- if [ -d /tmp/glr-exec-sucks ]; then mkdir -p artifacts && cp -v /tmp/glr-exec-sucks/* artifacts/; fi
- apt-get install -y
live-build
- echo Performing evil kluge, see Debian bug 919659 >&2
- perl -pi -E 's{^\s*umount "\$TARGET/proc" 2>/dev/null \|\| true$}{#$&} and print STDERR "Line $. became $_"' /usr/share/debootstrap/functions
- echo Evil kluge done. >&2
script:
- cd live-build
- lb config
- lb config --source false
- cp ../artifacts/libapp-aban-perl*.deb config/packages.chroot/
- lb build
after_script:
- ls -l
artifacts:
when: on_success
expire_in: '1 day'
paths:
- live-build/ABAN*
iso-tag:
stage: build-iso
only: [ 'tags' ]
dependencies: [ 'build' ]
extends: iso
script:
- cd live-build
- lb config
- cp ../artifacts/libapp-aban-perl*.deb config/packages.chroot/
- lb build
artifacts:
when: on_success
expire_in: 10000 years
paths:
- live-build/ABAN*
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