2021-12-02 21:41:07 +01:00
|
|
|
default:
|
2024-05-29 18:52:46 +02:00
|
|
|
image: registry.gitlab.com/mmk2410/intellij-idea-pkg-image:noble
|
2021-12-02 21:41:07 +01:00
|
|
|
|
|
|
|
variables:
|
|
|
|
PACKAGE: "intellij-idea-community"
|
|
|
|
TZ: UTC
|
2022-11-24 17:32:53 +01:00
|
|
|
NAME: "Marcel Kapfer"
|
|
|
|
EMAIL: "opensource@mmk2410.org"
|
2021-12-02 21:41:07 +01:00
|
|
|
|
|
|
|
stages:
|
2023-07-26 19:34:58 +02:00
|
|
|
- autoupdate
|
2021-12-02 21:41:07 +01:00
|
|
|
- build
|
2022-04-05 18:09:24 +02:00
|
|
|
- deploy
|
2021-12-02 21:41:07 +01:00
|
|
|
|
2023-07-26 19:34:58 +02:00
|
|
|
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"
|
|
|
|
|
2021-12-02 21:41:07 +01:00
|
|
|
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
|
2022-04-05 18:09:24 +02:00
|
|
|
|
|
|
|
deploy-job:
|
2023-07-27 18:10:19 +02:00
|
|
|
image: registry.gitlab.com/mmk2410/intellij-idea-pkg-image:$UBUNTU_VERSION
|
2022-04-05 18:09:24 +02:00
|
|
|
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
|
2022-11-24 17:32:53 +01:00
|
|
|
- dch -D $UBUNTU_VERSION -p -l +$UBUNTU_VERSION "Upstream version $VERSION."
|
2022-12-06 19:23:47 +01:00
|
|
|
- debuild -S -sa -k6D289F254B41A009B6AB5AC3122720F932D5CE46
|
2022-04-05 18:09:24 +02:00
|
|
|
- cd ..
|
2022-11-24 17:32:53 +01:00
|
|
|
- dput ppa:mmk2410/intellij-idea "$PACKAGE"_"$VERSION"-1+"$UBUNTU_VERSION"1_source.changes
|
2022-04-05 18:09:24 +02:00
|
|
|
rules:
|
|
|
|
- if: $CI_COMMIT_TAG
|
2022-11-24 17:32:53 +01:00
|
|
|
parallel:
|
|
|
|
matrix:
|
2024-09-03 07:42:02 +02:00
|
|
|
- UBUNTU_VERSION: [trusty, xenial, bionic, focal, jammy, noble]
|