.gitlab-ci.yml 1.28 KB
Newer Older
Lukas Matt's avatar
Lukas Matt committed
1
image: debian
2
stages:
Lukas Matt's avatar
Lukas Matt committed
3
- build
4 5 6
- test
- deploy

7
.job_template: &job_definition
8
  stage: test
9 10 11
  artifacts:
    reports:
      junit: report.xml
Lukas Matt's avatar
Lukas Matt committed
12 13
    paths:
    - report.*
14 15 16 17
  before_script:
  - bash scripts/install.sh
  script:
  - bash scripts/test.sh
18 19 20 21 22 23

.job_template: &no_pipeline
  except:
    variables:
    - $CI_PIPELINE_TRIGGERED

Lukas Matt's avatar
Lukas Matt committed
24 25 26 27 28 29 30 31 32 33
build docker images:
  stage: build
  before_script:
  - apt-get update && apt-get install -y curl
  - curl -L https://get.docker.com | bash -
  script:
  - bash scripts/build_docker_image.sh
  only:
  - tags

34 35 36 37 38 39 40
single project:
  <<: *job_definition
  only:
    refs:
    - master
    variables:
    - $CI_PIPELINE_TRIGGERED
41

42 43
test diaspora:
  <<: *job_definition
44
  <<: *no_pipeline
45 46
  variables:
    PROJECT: diaspora
47

48 49
test ganggo:
  <<: *job_definition
50
  <<: *no_pipeline
51 52
  variables:
    PROJECT: ganggo
53

54 55
test socialhome:
  <<: *job_definition
56
  <<: *no_pipeline
57 58
  variables:
    PROJECT: socialhome
59

Lukas Matt's avatar
Lukas Matt committed
60 61 62 63 64 65
test testproject:
  <<: *job_definition
  <<: *no_pipeline
  variables:
    PROJECT: testproject

66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
pages:
  <<: *no_pipeline
  image: ruby:2.3
  stage: deploy
  variables:
    JEKYLL_ENV: production
    LC_ALL: C.UTF-8
  before_script:
  - cd docs
  - bundle install
  script:
  - bundle exec jekyll build -d ../public
  artifacts:
    paths:
    - public
Lukas Matt's avatar
Lukas Matt committed
81 82
  only:
  - master