Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
include:
- project: 'infra/packages/ci-utils'
ref: main
file: 'shared-ci.yml'
variables:
# We don't set PACKAGE_NAME since we build many different packages,
# therefore we must overwrite APT_REPO.
APT_REPO: infrapackages-dokuwiki
autoupdate:
stage: autoupdate
rules:
- if: '$RUN_AUTOUPDATE == "1"'
when: always
dependencies: []
needs: []
script:
- git clone "https://${GITLAB_ACCESS_USER}:${GITLAB_ACCESS_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git" autoupdate-checkout
- |
set -e
cd autoupdate-checkout
git config --global user.email "infra+packages-autoupdate@cccv.de"
git config --global user.name "autoupdater"
mkdir ../tmp
grep -E '^[^#]+' config/plugins | while read -r plugin_name plugin_url; do
plugin_path="$(pwd)/tmp/${plugin_name}"
git clone --depth 1 "${plugin_url}" "${plugin_path}"
plugin_version="$(git -C "${plugin_path}" show -s --date='format:%Y%m%d' --format='0.0.%cd+git%h' HEAD)"
tag_name="release/${plugin_name}/${plugin_version}"
tag_filter="release/${plugin_name}/${plugin_version%+*}+*"
if [ "$(git tag -l "$tag_filter")" == "" ]; then
git tag "${tag_name}"
git push --tags
fi
done
package:apt:bullseye:
stage: package
rules:
- if: '$RUN_AUTOUPDATE != "1" && $CI_COMMIT_TAG =~ /^release\//'
script:
- ./scripts/prepare_package.sh "${CI_COMMIT_TAG#release/}"
- dpkg-buildpackage -us -uc
- mv ../*.deb ./
- dpkg-deb -I *.deb
- dpkg-deb -c *.deb > contents.txt
artifacts:
paths:
- ./*.deb
- debian
- contents.txt
publish:apt:buster:
extends: .publish:apt
variables:
APTLY_DISTRO: buster
APTLY_ARCH: all
dependencies:
- package:apt:bullseye
needs:
- package:apt:bullseye
publish:apt:bullseye:
extends: .publish:apt
variables:
APTLY_DISTRO: bullseye
APTLY_ARCH: all
dependencies:
- package:apt:bullseye
needs:
- package:apt:bullseye