From 534ba6c4c3e780f96de2aeceaec43a21dd9b5b43 Mon Sep 17 00:00:00 2001 From: Zandor Smith <info@zsinfo.nl> Date: Tue, 3 Oct 2017 18:05:41 +0000 Subject: [PATCH] Create seperate stage for deploying to maven repository. --- .gitlab-ci.yml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3905004..f06414a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,7 +13,11 @@ variables: before_script: - export GRADLE_USER_HOME=`pwd`/.gradle - + +stages: + - build + - deploy + #setup: # stage: build # script: gradlew -i setupDecompWorkspace @@ -24,9 +28,9 @@ before_script: # - build # - .gradle -build: +build-jar: stage: build - script: ./gradlew -i setupDecompWorkspace && ./gradlew -i build + script: ./gradlew -i setupDecompWorkspace && ./gradlew -i build -Pmaven_pass=$MAVEN_PASS cache: key: "$CI_COMMIT_REF_NAME" policy: push @@ -34,6 +38,15 @@ build: - build - .gradle +deploy-to-maven: + stage: deploy + script: ./gradlew uploadArchives -Pmaven_pass=$MAVEN_PASS + cache: + key: "$CI_COMMIT_REF_NAME" + policy: push + paths: + - build + - .gradle #test: # stage: test -- GitLab