Commit 68c76b03 authored by Silke Meyer's avatar Silke Meyer

Added .gitlab-ci.yml

parent 987ac52a
Pipeline #10205 passed with stages
# 1) Every commit on master branch or tagging triggers a build
maven-build:
stage: build
script:
- mvn clean package
artifacts:
paths:
- target/*.jar
name: ${CI_PROJECT_NAME}-${CI_COMMIT_SHORT_SHA}
only:
- master
- tags
# 2) Copies SNAPSHOT builds on 'master' branch into download.dmx.systems/ci/ directory
copy-to-ci:
stage: deploy
script:
- CIDIR='/var/www/download.dmx.systems/ci'
- DESTDIR="${CIDIR}/${CI_PROJECT_NAME}"
- JARFILE="$( basename $( ls target/*.jar | tail -n1) )"
- NUNC="$( date +%F )"
- DESTJARFILE="$( basename ${JARFILE} .jar )_${NUNC}_${CI_PIPELINE_ID}.jar"
- if [ ! -d ${DESTDIR} ]; then mkdir ${DESTDIR}; fi
- cp target/${JARFILE} ${DESTDIR}/${DESTJARFILE}
- ln -sf ${DESTDIR}/${DESTJARFILE} ${DESTDIR}/${CI_PROJECT_NAME}-latest.jar
dependencies:
- maven-build
only:
- master
# 3) Copies tagged RELEASE builds into download.dmx.systems/plugins/ directory
copy-to-release:
stage: deploy
script:
- RELEASEDIR='/var/www/download.dmx.systems/plugins'
- DESTDIR="${RELEASEDIR}/${CI_PROJECT_NAME}"
- JARFILE="$( basename $( ls target/*.jar | tail -n1) )"
- if [ ! -d ${DESTDIR} ]; then mkdir ${DESTDIR}; fi
- cp target/${JARFILE} ${DESTDIR}/
dependencies:
- maven-build
only:
- tags
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment