-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
86 lines (80 loc) · 1.78 KB
/
.gitlab-ci.yml
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
---
stages:
- syntax
- unit
- acceptance-puppet7
- release
.in-acceptance-only-matrix:
parallel:
matrix:
- RUBY_VERSION: ['3.2.0']
PUPPET_GEM_VERSION: ['~> 7']
PUPPET_COLLECTION: ['7']
.common-matrix:
parallel:
matrix:
- RUBY_VERSION: ['3.2.0']
PUPPET_GEM_VERSION: ['~> 7']
image: ruby:${RUBY_VERSION}
cache:
paths:
- vendor/bundle
before_script:
- rm -f Gemfile.lock || true
- ruby --version
- gem --version
- bundle -v
- bundle config set --local path 'vendor/bundle'
- bundle config set --local without 'system_tests'
- bundle config set --local jobs $(nproc)
- bundle install
- bundle clean
- bundle env
syntax:
extends: .common-matrix
stage: syntax
script:
- bundle exec rake syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop
unit:
needs:
- syntax
extends: .common-matrix
stage: unit
script:
- bundle exec rake parallel_spec
acceptance-puppet7:
needs:
- unit
extends:
- .common-matrix
- .in-acceptance-only-matrix
stage: acceptance-puppet7
variables:
RBENV_VERSION: ${RUBY_VERSION}
PUPPET_INSTALL_TYPE: agent
BEAKER_IS_PE: 'no'
BEAKER_PUPPET_COLLECTION: puppet${PUPPET_COLLECTION}
BEAKER_debug: 'true'
script:
- bundle exec rake beaker
tags:
- beaker-acceptance
except:
- master
module release:
stage: release
image: ruby:3.2.0
variables:
PUPPET_GEM_VERSION: '~> 7'
BLACKSMITH_FORGE_API_KEY: '$BLACKSMITH_FORGE_API_KEY'
script:
- bundle exec puppet strings generate --format markdown --out REFERENCE.md
- bundle exec rake module:push
only:
- tags
except:
- branches
artifacts:
paths:
- pkg/
expire_in: 6 weeks