mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-23 09:01:08 +03:00
Merge branch 'dev' into 'dev'
GitLab CI See merge request gravitlauncherteam/Launcher!284
This commit is contained in:
commit
f61cf67606
1 changed files with 39 additions and 31 deletions
|
@ -1,41 +1,49 @@
|
||||||
image: frekele/java
|
image: docker:latest
|
||||||
|
services:
|
||||||
|
- docker:dind
|
||||||
|
|
||||||
|
variables:
|
||||||
|
DOCKER_DRIVER: overlay2
|
||||||
|
CI_VERSION: '6.6.$CI_PIPELINE_IID'
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- build
|
- build
|
||||||
- test
|
- test
|
||||||
- deploy
|
|
||||||
|
|
||||||
before_script:
|
|
||||||
# - echo `pwd` # debug
|
|
||||||
# - echo "$CI_BUILD_NAME, $CI_BUILD_REF_NAME $CI_BUILD_STAGE" # debug
|
|
||||||
- export GRADLE_USER_HOME=`pwd`/.gradle
|
|
||||||
- apt-get update -qq && apt-get install -y -qq git git-core
|
|
||||||
|
|
||||||
cache:
|
|
||||||
key: ${CI_COMMIT_REF_NAME}
|
|
||||||
paths:
|
|
||||||
- .gradle/wrapper
|
|
||||||
- .gradle/caches
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
|
image: frekele/java
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
before_script:
|
||||||
|
- 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
|
- sed -i 's/git@github.com:/https:\/\/github.com\//' .gitmodules
|
||||||
- git submodule sync
|
- git submodule sync
|
||||||
- git submodule update --init --recursive
|
- git submodule update --init --recursive
|
||||||
|
script:
|
||||||
- ./gradlew assemble
|
- ./gradlew assemble
|
||||||
- mv LaunchServer/build/libs/*.jar LaunchServer
|
after_script:
|
||||||
- mv ServerWrapper/build/libs/*.jar ServerWrapper
|
- mkdir -p artifacts/modules
|
||||||
- mv modules/*_module/build/libs/*.jar modules
|
- cd LaunchServer/build/libs/
|
||||||
artifacts:
|
- 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
|
||||||
|
cache:
|
||||||
paths:
|
paths:
|
||||||
- LaunchServer/*.jar
|
- .gradle
|
||||||
- ServerWrapper/*.jar
|
artifacts:
|
||||||
- modules/*.jar
|
expire_in: 6 week
|
||||||
|
paths:
|
||||||
|
- artifacts
|
||||||
|
|
||||||
test:
|
test:
|
||||||
|
image: frekele/java
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- ./gradlew check
|
- ./gradlew check
|
||||||
|
|
||||||
after_script:
|
|
||||||
- echo "End CI"
|
|
||||||
|
|
Loading…
Reference in a new issue