Launcher/.gitlab-ci.yml

49 lines
1.2 KiB
YAML
Raw Normal View History

2019-09-19 23:30:43 +03:00
image: docker:latest
services:
2019-10-19 19:46:04 +03:00
- docker:dind
2019-05-14 15:11:55 +03:00
2019-09-19 23:30:43 +03:00
variables:
DOCKER_DRIVER: overlay2
CI_VERSION: '6.6.$CI_PIPELINE_IID'
2019-05-14 15:11:55 +03:00
2019-09-19 23:30:43 +03:00
stages:
2019-10-19 19:46:04 +03:00
- build
- test
2019-05-14 15:11:55 +03:00
build:
image: gradle:jdk11
2019-05-14 15:11:55 +03:00
stage: build
2019-09-19 23:30:43 +03:00
before_script:
2019-10-19 19:46:04 +03:00
- apt-get -y update
- apt-get -y install zip git
- export GRADLE_USER_HOME=`pwd`/.gradle
- chmod +x gradlew
- sed -i 's/git@github.com:/https:\/\/github.com\//' .gitmodules
- git submodule sync
- git submodule update --init --recursive
2019-05-14 15:11:55 +03:00
script:
2019-10-19 19:46:04 +03:00
- ./gradlew assemble
2019-09-19 23:30:43 +03:00
after_script:
2019-10-19 19:46:04 +03:00
- mkdir -p artifacts/modules
- cd LaunchServer/build/libs/
- zip -r -9 ../../../artifacts/libraries.zip * -x "LaunchServer.jar" -x "LaunchServer-clean.jar"
- mv LaunchServer.jar ../../../artifacts/LaunchServer.jar
- cd ../../../ServerWrapper/build/libs
- mv ServerWrapper.jar ../../../artifacts/ServerWrapper.jar
- cd ../../../
- mv modules/*_module/build/libs/*.jar artifacts/modules
- mv modules/*_swmodule/build/libs/*.jar artifacts/modules
- mv modules/*_lmodule/build/libs/*.jar artifacts/modules
2019-09-19 23:30:43 +03:00
cache:
paths:
2019-10-19 19:46:04 +03:00
- .gradle
2019-05-14 15:11:55 +03:00
artifacts:
2019-09-19 23:30:43 +03:00
expire_in: 6 week
2019-05-14 15:11:55 +03:00
paths:
2019-10-19 19:46:04 +03:00
- artifacts
test:
image: gradle:jdk11
stage: test
script:
2019-09-19 23:30:43 +03:00
- ./gradlew check