diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b95fdb506ba13dfdd5efa508dfd5637fbb5d9860..0c0e6136c8465a3da22f50c937e5ec60a7f9fb41 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