diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..a538727404186993ce782176f765d29863cf2cde --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,54 @@ +image: kemixkoo/debian-maven + +variables: + ARTIFACT_DIR: build/repo/ecore2java + +build: + stage: build + variables: + 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 + expire_in: 10min + cache: + paths: + - .gradle/wrapper + - .gradle/caches + tags: + - dockered + +publish: + stage: deploy + before_script: +# - mkdir -p ~/.ssh +# - echo "$SSH_SECRET_DEPLOY_KEY" | tr -d '\r' > ~/.ssh/id_rsa +# - chmod 600 ~/.ssh/id_rsa +# - ssh-keyscan -H "git-st.inf.tu-dresden.de" >> ~/.ssh/known_hosts + - export VERSION=${CI_COMMIT_TAG:-`git describe --tags --always`} + - echo $VERSION + script: + - git checkout ivy-repo || git checkout --orphan ivy-repo + - git reset + - cp -r $ARTIFACT_DIR . + - git add $(git ls-files -o ecore2java) + - git commit -m "[skip ci] Automatic release of version $VERSION" + - git push +# - git clone git@git-st.inf.tu-dresden.de:ecore2java/gradle-plugin-ivy-repository.git repo +# - cp -r $ARTIFACT_DIR repo +# - cd repo +# - git config user.name "$GITLAB_USER_NAME" +# - git config user.email "$GITLAB_USER_EMAIL" +# - git add . +# - git reset ecore2java +# - git add $(git ls-files -o ecore2java) +# - git commit -m "Automatic publishing of version $VERSION" || true +# - git push + tags: + - dockered