.gitlab-ci.yml 1.29 KB
Newer Older
1 2
---
stages:
3 4 5
  - syntax
  - unit
  - acceptance
Fabien Combernous's avatar
Fabien Combernous committed
6
  - release
7 8 9 10

cache:
  paths:
    - vendor/bundle
11

12
before_script:
13 14 15 16 17 18
  - bundle -v
  - rm Gemfile.lock || true
  - gem update --system
  - gem --version
  - bundle -v
  - bundle install --without system_tests --path vendor/bundle --jobs $(nproc)
19

20
syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop-Ruby 2.5.1-Puppet ~> 5.5:
21
  stage: syntax
22
  image: ruby:2.5.1
23
  script:
24 25 26
    - bundle exec rake syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop
  variables:
    PUPPET_GEM_VERSION: '~> 5.5'
27

28
parallel_spec-Ruby 2.5.1-Puppet ~> 5.5:
29
  stage: unit
30
  image: ruby:2.5.1
31 32 33 34
  script:
    - bundle exec rake parallel_spec
  variables:
    PUPPET_GEM_VERSION: '~> 5.5'
35

36 37
acceptance with puppet5:
  stage: acceptance
38
  variables:
39 40
    PUPPET_INSTALL_TYPE: 'agent'
    BEAKER_IS_PE: 'no'
41
    BEAKER_PUPPET_COLLECTION: 'puppet5'
42 43
    BEAKER_debug: 'true '
    RBENV_VERSION: '2.5.1'
44
  script:
45
    - bundle exec rake beaker:default
46 47
  tags:
    - puppet-tests
Fabien Combernous's avatar
Fabien Combernous committed
48 49
  except:
    - master
Fabien Combernous's avatar
Fabien Combernous committed
50 51 52

module release:
  stage: release
53 54
  variables:
    RBENV_VERSION: '2.5.1'
Fabien Combernous's avatar
Fabien Combernous committed
55 56
  script: 
    - pdk build
57 58
  tags:
    - puppet-tests
Fabien Combernous's avatar
Fabien Combernous committed
59
  only:
60
    - master
Fabien Combernous's avatar
Fabien Combernous committed
61 62
  artifacts:
    paths:
63
      - pkg/
Fabien Combernous's avatar
Fabien Combernous committed
64
    expire_in: 6 weeks