2020-06-23 00:24:20 +00:00
|
|
|
stages:
|
|
|
|
- build
|
|
|
|
- publish
|
2020-07-19 02:05:39 +00:00
|
|
|
- publish_latest
|
2020-07-02 16:12:34 +00:00
|
|
|
- publish_docker
|
2020-06-23 00:24:20 +00:00
|
|
|
|
|
|
|
cache:
|
|
|
|
paths:
|
|
|
|
- build/libs/
|
|
|
|
|
|
|
|
build:
|
|
|
|
image: openjdk:8
|
|
|
|
stage: build
|
|
|
|
script:
|
|
|
|
- ./gradlew build
|
|
|
|
|
|
|
|
publish:
|
|
|
|
image: alpine
|
|
|
|
stage: publish
|
|
|
|
before_script:
|
2020-07-02 16:12:34 +00:00
|
|
|
- apk update && apk add git zip
|
2020-06-23 00:24:20 +00:00
|
|
|
- export VERSION=`git describe --tags --dirty`
|
2020-07-02 16:12:34 +00:00
|
|
|
script:
|
2020-06-23 00:24:20 +00:00
|
|
|
- cp build/libs/mangadex_at_home-${VERSION}-all.jar ./
|
|
|
|
- zip -r9 mangadex_at_home-${VERSION}.zip mangadex_at_home-${VERSION}-all.jar settings.sample.json
|
|
|
|
artifacts:
|
2020-07-02 16:12:34 +00:00
|
|
|
name: "mangadex_at_home"
|
2020-06-23 00:24:20 +00:00
|
|
|
paths:
|
|
|
|
- "*.jar"
|
2020-07-19 02:05:39 +00:00
|
|
|
- "mangadex_at_home-*.zip"
|
2021-01-24 04:55:11 +00:00
|
|
|
- settings.sample.yaml
|
2020-07-19 02:05:39 +00:00
|
|
|
|
2020-07-02 16:12:34 +00:00
|
|
|
publish_docker:
|
|
|
|
image: docker:git
|
|
|
|
stage: publish
|
|
|
|
only:
|
|
|
|
- tags
|
|
|
|
services:
|
|
|
|
- docker:dind
|
|
|
|
before_script:
|
|
|
|
- echo "$CI_REGISTRY_PASSWORD" | docker login -u "$CI_REGISTRY_USER" --password-stdin ${CI_REGISTRY}
|
|
|
|
- export VERSION=`git describe --tags --dirty`
|
|
|
|
script:
|
|
|
|
- mv build/libs/mangadex_at_home-${VERSION}-all.jar build/libs/mangadex_at_home.jar
|
|
|
|
- docker build -t ${CI_REGISTRY_IMAGE}:${VERSION} -t ${CI_REGISTRY_IMAGE}:latest .
|
|
|
|
- docker push ${CI_REGISTRY_IMAGE}:${VERSION}
|
2021-01-24 04:55:11 +00:00
|
|
|
- docker push ${CI_REGISTRY_IMAGE}:latest
|