From 8253ce2bab7de66ea948cb65710a1a7e63c5f699 Mon Sep 17 00:00:00 2001
From: Andreas Fehn <andreas.fehn@tu-dresden.de>
Date: Mon, 23 Jul 2018 08:54:43 +0000
Subject: [PATCH] Update .gitlab-ci.yml

---
 .gitlab-ci.yml | 17 ++++++-----------
 1 file changed, 6 insertions(+), 11 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b95fdb5..0c0e613 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,18 +1,16 @@
 variables:
+  GIT_STRATEGY: clone
   ARTIFACT_DIR: build/repo/ecore2java
 
 build:
   stage: build
   image: nimmis/alpine-java:openjdk-8-jdk
   variables:
-    GIT_STRATEGY: clone
     GRADLE_OPTS: "-Dorg.gradle.daemon=false"
   before_script:
     - export GRADLE_USER_HOME=`pwd`/.gradle
   script:
     - ./gradlew publish
-  after_script:
-    - ls -lR build/repo
   artifacts:
     paths:
       - $ARTIFACT_DIR
@@ -21,30 +19,27 @@ build:
     paths:
       - .gradle/wrapper
       - .gradle/caches
+  only:
+    - tags
   tags:
     - dockered
 
 publish:
   stage: deploy
   image: bravissimolabs/alpine-git
-  variables:
-    GIT_STRATEGY: clone
   before_script:
     - git config user.name "$GITLAB_USER_NAME"
     - git config user.email "$GITLAB_USER_EMAIL"
     - export VERSION=${CI_COMMIT_TAG:-`git describe --tags --always`}
     - echo $VERSION
   script:
-    - git status
     - git checkout ivy-repo || git checkout --orphan ivy-repo
     - git reset
-    - git status
     - cp -r $ARTIFACT_DIR .
-    - git status
     - git add $(git ls-files -o ecore2java)
     - git commit -m "[skip ci] Automatic release of version $VERSION"
-    - git show
-#    - git push --set-upstream origin ivy-repo
-#    - git push ivy-repo
+    - git push --set-upstream origin ivy-repo
+  only:
+    - tags
   tags:
     - dockered
-- 
GitLab