.gitlab-ci.yml 812 Bytes
Newer Older
Vít Kabele's avatar
Vít Kabele committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
image: gitlab.ow2.org:4567/disl/disl/disl-ci

# Setup cache to prevent downloading deps and compiling sources in each stage
cache: &cache
  # Cache is branch-local
  key: "${CI_COMMIT_REF_SLUG}"
  # Cache deps and compiled classes
  paths:
  - 'output/'
  - 'lib/'
  - 'src-disl-agent/linux-x86_64' # Specific architecture of used container

# Adjust modification date to prevent recompiling sources in different stages.
before_script:
- find . -exec touch -t 200001010000 {} \;

stages:
- build
- test

# Jobs definitions
# The YAML Anchors are used because of Gitlab Issue#2838

# Check whether the build task succeeded
build:
  stage: build
  cache:
    <<: *cache
    policy:
      push
  script:
  - ant build

# Run tests
test:
  stage: test
  cache:
    <<: *cache
    policy: pull
  script:
  - ant test