-
Fabien Combernous authoredFabien Combernous authored
.gitlab-ci.yml 2.17 KiB
---
stages:
- syntax
- unit
- acceptance
- release
default:
cache:
paths:
- vendor/bundle
before_script: &before_script
- bundle -v
- rm Gemfile.lock || true
- "# Update system gems if requested. This is useful to temporarily workaround troubles in the test runner"
- "# Set `rubygems_version` in the .sync.yml to set a value"
- "# Ignore exit code of SIGPIPE'd yes to not fail with shell's pipefail set"
- '[ -z "$RUBYGEMS_VERSION" ] || (yes || true) | gem update --system $RUBYGEMS_VERSION'
- gem --version
- bundle -v
- bundle install --without system_tests --path vendor/bundle --jobs $(nproc)
validate lint check rubocop-Ruby 2.7.5-Puppet ~> 7:
stage: syntax
image: ruby:2.7.5
script:
- bundle exec rake validate lint check rubocop
variables:
PUPPET_GEM_VERSION: "~> 7"
parallel_spec-Ruby 2.7.5-Puppet ~> 7:
stage: unit
image: ruby:2.7.5
script:
- bundle exec rake parallel_spec
variables:
PUPPET_GEM_VERSION: "~> 7"
acceptance with puppet7 ubuntu2004:
needs:
- parallel_spec-Ruby 2.7.5-Puppet ~> 7
stage: acceptance
variables:
RBENV_VERSION: 2.7.5
PUPPET_INSTALL_TYPE: agent
BEAKER_IS_PE: 'no'
BEAKER_PUPPET_COLLECTION: puppet7
BEAKER_debug: 'true'
BEAKER_setfile: ubuntu2004-64
BEAKER_HYPERVISOR: docker
script:
- bundle exec rake beaker
tags:
- puppet-tests
acceptance with puppet7 ubuntu2204:
needs:
- parallel_spec-Ruby 2.7.5-Puppet ~> 7
stage: acceptance
variables:
RBENV_VERSION: 2.7.5
PUPPET_INSTALL_TYPE: agent
BEAKER_IS_PE: 'no'
BEAKER_PUPPET_COLLECTION: puppet7
BEAKER_debug: 'true'
BEAKER_setfile: ubuntu2204-64
BEAKER_HYPERVISOR: docker
script:
- bundle exec rake beaker
tags:
- puppet-tests
module release:
stage: release
image: ruby:2.7.5
variables:
PUPPET_GEM_VERSION: "~> 7.14"
BLACKSMITH_FORGE_USERNAME: "$BLACKSMITH_FORGE_USERNAME"
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