stages: - test - build - synchronization services: - mysql:latest variables: # Configure mysql environment variables (https://hub.docker.com/r/_/mysql/) MYSQL_DATABASE: arsnova3 MYSQL_ROOT_PASSWORD: arsnova3_prototype WAR_FILE: target/scala-2.11/arsnova-3-backend*.jar MIRROR_REPO: git@github.com:thm-projects/arsnova-3-backend.git REPORT_DIR: target/gatling-it/stresstest* stylecheck: stage: test tags: - sbt dependencies: [] script: - sbt scalastyle - sbt test:scalastyle test: stage: test tags: - sbt dependencies: [] script: # Execute your project's tests - sbt clean test sync_mirror: stage: synchronization when: always allow_failure: true script: - git clone --bare "$CI_BUILD_REPO" mirror.git - mkdir ~/.ssh && echo "$GITHUB_HOST_KEY" > ~/.ssh/known_hosts - eval $(ssh-agent -s) && ssh-add <(echo "$GITHUB_DEPLOY_KEY") - cd mirror.git - git update-ref -d refs/tags/production - git update-ref -d refs/tags/staging - git push --mirror "$MIRROR_REPO" # stresstest: # stage: test # only: # - master # - /^v[0-9]+/ # tags: # - sbt # dependencies: [] # script: # - sbt clean gatling-it:test # artifacts: # paths: # - $REPORT_DIR package: stage: build only: - master - /^v[0-9]+/ tags: - sbt dependencies: [] script: - sbt assembly artifacts: paths: - $WAR_FILE