-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
44 lines (39 loc) · 1.28 KB
/
.gitlab-ci.yml
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
default:
tags:
- docker
image: ubuntu:jammy
variables:
GIT_SUBMODULE_STRATEGY: recursive
DEBEMAIL: [email protected]
DEBFULLNAME: HXR CI
stages:
- test
- deploy
lint-job:
stage: test
script:
- apt-get update
- apt-get install --no-install-recommends --assume-yes shellcheck build-essential
- make lint
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
deploy-job:
stage: deploy
environment: production
script:
- '[[ ! -z "$CI_KEY" ]] || (echo "Warning: \$CI_KEY not set" && exit 1)'
- apt-get update
- apt-get install --no-install-recommends --assume-yes gnupg git devscripts build-essential debhelper dput
- cat $CI_KEY | gpg --batch --import
- echo $CI_PASS | gpg --batch --always-trust --yes --passphrase-fd 0 --pinentry-mode=loopback -s $(mktemp)
- git config --global user.email "[email protected]"
- git config --global user.name "HXR CI"
# - git fetch
- git merge -srecursive -Xours --allow-unrelated-histories origin/main
- ls -la
- PKG_VERSION=$(date +0.1.0-ci.%Y%m%d%H%M)
- dch --distribution jammy --newversion $PKG_VERSION automated CI
- debuild --no-tgz-check -i -S
- dput ppa:hxr-io/aesthetic-testing ../pass-mount_${PKG_VERSION}_source.changes
rules:
- if: $CI_COMMIT_BRANCH == "debian/latest"