.gitlab-ci.yml 850 Bytes
Newer Older
Choon Ming Goh's avatar
Choon Ming Goh committed
1
---
2 3
image: ruby:2.2

4 5 6 7
stages:
  - build
  - test
  - deploy
8

9 10
job:build:artifacts:
  stage: build
11
  script:
12 13 14 15
  - bundle install --deployment
  - bundle config
  environment: test
  artifacts:
Choon Ming Goh's avatar
Choon Ming Goh committed
16
    expire_in: 1 hours
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 42 43
    paths:
    - vendor/

job:test:syntax:
  stage: test
  script:
  - bundle install --deployment
  - bundle config
  - bundle exec rake syntax
  dependencies:
  - job:build:artifacts

job:test:lint:
  stage: test
  script:
  - bundle install --deployment
  - bundle config
  - bundle exec rake lint
  dependencies:
  - job:build:artifacts

job:test:r10k:
  stage: test
  script:
  - bundle install --deployment
  - bundle config
  - bundle exec r10k puppetfile check
44
  - bundle exec r10k puppetfile install
45 46 47 48 49 50
  dependencies:
  - job:build:artifacts

job:deploy:r10k:
  stage: deploy
  script:
Choon Ming Goh's avatar
Choon Ming Goh committed
51
  - echo "deploy"
52 53

  environment: production