1
0
Fork 1
mirror of https://gitlab.com/mangadex-pub/mangadex_at_home.git synced 2024-01-19 02:48:37 +00:00
mangadex_at_home/.gitlab-ci.yml

54 lines
1.2 KiB
YAML
Raw Normal View History

stages:
- build
- publish
- publish_docker
build:
image: openjdk:8
stage: build
2021-10-01 05:07:22 +00:00
before_script:
- export VERSION="$CI_COMMIT_REF_NAME"
2021-10-01 05:07:22 +00:00
script:
- ./gradlew build
artifacts:
name: "mangadex_at_home"
paths:
- "build/libs/mangadex_at_home-*-all.jar"
publish:
2021-10-01 05:18:30 +00:00
image: alpine
stage: publish
2021-10-01 04:58:53 +00:00
2021-10-01 05:07:22 +00:00
before_script:
2021-10-01 04:58:53 +00:00
- export VERSION="$CI_COMMIT_REF_NAME"
2021-10-01 05:07:22 +00:00
script:
- cp build/libs/mangadex_at_home-${VERSION}-all.jar ./
- zip -r9 mangadex_at_home-${VERSION}.zip mangadex_at_home-${VERSION}-all.jar settings.sample.yaml
dependencies:
- build
artifacts:
name: "mangadex_at_home"
paths:
- "mangadex_at_home-*-all.jar"
- "mangadex_at_home-*.zip"
- "settings.sample.yaml"
publish_docker:
2021-10-01 04:58:53 +00:00
image: docker:20.10.8-git
services:
- docker:20.10.8-dind
stage: publish
only:
- tags
2021-10-01 04:58:53 +00:00
before_script:
- echo "$CI_REGISTRY_PASSWORD" | docker login -u "$CI_REGISTRY_USER" --password-stdin ${CI_REGISTRY}
2021-10-01 05:07:22 +00:00
- export VERSION="$CI_COMMIT_REF_NAME"
dependencies:
- build
script:
- mv build/libs/mangadex_at_home-${VERSION}-all.jar build/libs/mangadex_at_home.jar
- docker build . -t ${CI_REGISTRY_IMAGE}:${VERSION}
- docker push ${CI_REGISTRY_IMAGE}:${VERSION}