-
Notifications
You must be signed in to change notification settings - Fork 15
/
.gitlab-ci.yml
73 lines (66 loc) · 1.88 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
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
73
default:
image: registry.gitlab.com/mmk2410/intellij-idea-pkg-image:oracular
variables:
PACKAGE: "intellij-idea-ultimate"
TZ: UTC
NAME: "Marcel Kapfer"
EMAIL: "[email protected]"
stages:
- autoupdate
- build
- deploy
update-job:
stage: autoupdate
script:
##
## Configure SSH key
##
- eval $(ssh-agent -s)
- chmod 400 "$SSH_PRIVATE_KEY"
- ssh-add "$SSH_PRIVATE_KEY"
- mkdir ~/.ssh
- chmod 700 ~/.ssh
- cp "$SSH_KNOWN_HOSTS" ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
##
## Configure Git setup
##
- git config user.name "$NAME"
- git config user.email "$EMAIL"
- git remote set-url origin "$GIT_URL"
##
## Run autoupdate script which handles everything else.
##
- ./autoupdate.sh
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
build-job:
stage: build
script:
- export VERSION=$(git describe --abbrev=0 --tags | cut -d'v' -f2)
- cd "$PACKAGE"_"$VERSION" || exit
- debuild -us -uc
- export PACKAGE_FILE="$PACKAGE"_"$VERSION"-1_all.deb
artifacts:
name: $PACKAGE_FILE
paths:
- ./*.deb
rules:
- if: $CI_COMMIT_TAG
deploy-job:
image: registry.gitlab.com/mmk2410/intellij-idea-pkg-image:$UBUNTU_VERSION
stage: deploy
script:
- export VERSION=$(git describe --abbrev=0 --tags | cut -d'v' -f2)
- echo "$GPG_PRIVATE_KEY" | tr -d '\r' | gpg --import -
- echo "$GPG_PUBLIC_KEY" | tr -d '\r' | gpg --import -
- cd "$PACKAGE"_"$VERSION" || exit
- dch -D $UBUNTU_VERSION -p -l +$UBUNTU_VERSION "Upstream version $VERSION."
- debuild -S -sa -k6D289F254B41A009B6AB5AC3122720F932D5CE46
- cd ..
- dput ppa:mmk2410/intellij-idea "$PACKAGE"_"$VERSION"-1+"$UBUNTU_VERSION"1_source.changes
rules:
- if: $CI_COMMIT_TAG
parallel:
matrix:
- UBUNTU_VERSION: [trusty, xenial, bionic, focal, jammy, noble, oracular]