2020-06-23 02:24:20 +02:00
|
|
|
stages:
|
|
|
|
- build
|
|
|
|
- publish
|
2020-07-02 18:12:34 +02:00
|
|
|
- publish_docker
|
2020-06-23 02:24:20 +02:00
|
|
|
|
|
|
|
build:
|
|
|
|
image: openjdk:8
|
|
|
|
stage: build
|
2021-10-01 08:10:07 +02:00
|
|
|
|
|
|
|
before_script:
|
2021-02-21 19:19:49 +01:00
|
|
|
- export VERSION="$CI_COMMIT_REF_NAME"
|
2021-10-01 08:10:07 +02:00
|
|
|
script:
|
2020-06-23 02:24:20 +02:00
|
|
|
- ./gradlew build
|
2021-02-21 19:19:49 +01:00
|
|
|
artifacts:
|
|
|
|
name: "mangadex_at_home"
|
|
|
|
paths:
|
|
|
|
- "build/libs/mangadex_at_home-*-all.jar"
|
2020-06-23 02:24:20 +02:00
|
|
|
|
|
|
|
publish:
|
|
|
|
image: alpine
|
|
|
|
stage: publish
|
2021-10-01 08:10:07 +02:00
|
|
|
|
2020-06-23 02:24:20 +02:00
|
|
|
before_script:
|
2021-10-01 08:10:07 +02:00
|
|
|
- apk update && apk add zip
|
2021-02-21 19:19:49 +01:00
|
|
|
- export VERSION="$CI_COMMIT_REF_NAME"
|
2020-07-02 18:12:34 +02:00
|
|
|
script:
|
2020-06-23 02:24:20 +02:00
|
|
|
- cp build/libs/mangadex_at_home-${VERSION}-all.jar ./
|
2021-03-26 00:34:30 +01:00
|
|
|
- zip -r9 mangadex_at_home-${VERSION}.zip mangadex_at_home-${VERSION}-all.jar settings.sample.yaml
|
2021-02-21 19:19:49 +01:00
|
|
|
dependencies:
|
|
|
|
- build
|
2020-06-23 02:24:20 +02:00
|
|
|
artifacts:
|
2020-07-02 18:12:34 +02:00
|
|
|
name: "mangadex_at_home"
|
2020-06-23 02:24:20 +02:00
|
|
|
paths:
|
2021-02-21 19:19:49 +01:00
|
|
|
- "mangadex_at_home-*-all.jar"
|
2020-07-19 04:05:39 +02:00
|
|
|
- "mangadex_at_home-*.zip"
|
2021-02-21 19:19:49 +01:00
|
|
|
- "settings.sample.yaml"
|
2020-07-19 04:05:39 +02:00
|
|
|
|
2020-07-02 18:12:34 +02:00
|
|
|
publish_docker:
|
2021-10-01 08:10:07 +02:00
|
|
|
image: docker:20.10.8
|
|
|
|
services:
|
|
|
|
- docker:20.10.8-dind
|
2020-07-02 18:12:34 +02:00
|
|
|
stage: publish
|
|
|
|
only:
|
|
|
|
- tags
|
2021-10-01 08:10:07 +02:00
|
|
|
|
2020-07-02 18:12:34 +02:00
|
|
|
before_script:
|
|
|
|
- echo "$CI_REGISTRY_PASSWORD" | docker login -u "$CI_REGISTRY_USER" --password-stdin ${CI_REGISTRY}
|
2021-02-21 19:19:49 +01:00
|
|
|
- export VERSION="$CI_COMMIT_REF_NAME"
|
|
|
|
dependencies:
|
|
|
|
- build
|
2020-07-02 18:12:34 +02:00
|
|
|
script:
|
|
|
|
- mv build/libs/mangadex_at_home-${VERSION}-all.jar build/libs/mangadex_at_home.jar
|
2021-02-21 19:19:49 +01:00
|
|
|
- docker build . -t ${CI_REGISTRY_IMAGE}:${VERSION}
|
2020-07-02 18:12:34 +02:00
|
|
|
- docker push ${CI_REGISTRY_IMAGE}:${VERSION}
|