nextcloud-app-radio/.gitlab-ci.yml

64 lines
1.9 KiB
YAML
Raw Normal View History

2020-10-13 09:31:35 +00:00
stages:
- compiling
2020-11-26 10:00:15 +00:00
- packaging
- signing
2020-11-26 10:00:15 +00:00
- publishing
2020-10-13 09:31:35 +00:00
2020-11-26 10:34:38 +00:00
image: node:latest
2020-10-13 09:31:35 +00:00
2020-11-27 09:49:38 +00:00
compiling:
2020-10-13 09:31:35 +00:00
stage: compiling
script:
2020-11-27 09:49:38 +00:00
- npm install
2020-11-26 09:59:14 +00:00
- make build-js
2020-11-26 10:18:41 +00:00
cache:
2020-10-13 09:31:35 +00:00
paths:
2020-11-26 10:18:41 +00:00
- node_modules/
2020-10-13 09:31:35 +00:00
2020-11-27 09:49:38 +00:00
packaging:
2020-10-13 09:31:35 +00:00
stage: packaging
script:
2020-11-26 10:34:38 +00:00
- apt update
2020-11-26 10:54:41 +00:00
- DEBIAN_FRONTEND="noninteractive" apt install -y wget sudo
- wget http://security.debian.org/debian-security/pool/updates/main/o/openssl/libssl1.0.0_1.0.1t-1+deb8u12_amd64.deb
2020-11-26 10:18:41 +00:00
- wget https://github.com/ChristophWurst/krankerl/releases/download/v0.12.3/krankerl_0.12.3_amd64.deb
2020-11-26 10:54:41 +00:00
- sudo dpkg -i libssl1.0.0_1.0.1t-1+deb8u12_amd64.deb krankerl_0.12.3_amd64.deb
2020-11-26 10:18:41 +00:00
- krankerl package
2020-11-27 15:34:07 +00:00
- echo CI_PACKAGING_JOBID="${CI_JOB_ID}" > $CI_PROJECT_DIR/variables.env
2020-10-13 09:31:35 +00:00
artifacts:
paths:
2020-11-26 10:18:41 +00:00
- build/artifacts/radio.tar.gz
2020-11-27 15:34:46 +00:00
reports:
dotenv: variables.env
2020-11-27 15:09:24 +00:00
expire_in: never
2020-10-13 09:31:35 +00:00
signing:
stage: signing
script:
- apt update
- DEBIAN_FRONTEND="noninteractive" apt install -y wget apt-transport-https
- wget -q -O- https://packages.sury.org/php/apt.gpg | apt-key add -
- echo "deb https://packages.sury.org/php/ stretch main" | tee /etc/apt/sources.list.d/php.list
- apt-get update
- apt-get install php7.2
- wget https://download.nextcloud.com/server/releases/nextcloud-20.0.2.tar.bz2
- tar xvf nextcloud-20.0.2.tar.bz2
- php nextcloud/occ
2020-11-27 09:49:38 +00:00
publishing:
2020-10-13 09:31:35 +00:00
stage: publishing
2020-11-26 10:18:41 +00:00
image: registry.gitlab.com/gitlab-org/release-cli:latest
2020-11-27 09:59:17 +00:00
needs:
- job:
- signing
- packaging
- artifacts: true
2020-11-27 09:59:17 +00:00
rules:
- if: $CI_COMMIT_TAG
2020-10-13 09:31:35 +00:00
script:
2020-11-28 08:27:02 +00:00
- EXTRA_DESCRIPTION="$(sed '1,/^## /!d;/^## /d' CHANGELOG.md)";
2020-11-26 10:18:41 +00:00
- >
2020-11-27 10:23:13 +00:00
release-cli create --name "v$CI_COMMIT_TAG" --description "$EXTRA_DESCRIPTION"
2020-11-26 10:18:41 +00:00
--tag-name $CI_COMMIT_TAG --ref $CI_COMMIT_SHA
2020-11-27 15:48:00 +00:00
--assets-link "{\"name\":\"radio\",\"url\":\"https://git.project-insanity.org/onny/nextcloud-app-radio/-/jobs/${CI_PACKAGING_JOBID}/artifacts/raw/build/artifacts/radio.tar.gz\",\"link_type\":\"other\"}"