Revision a500834d
Added by dosas please_edit_me about 1 month ago
.gitignore | ||
---|---|---|
spec/fixtures/katello-certs-check/certs/*.csr
|
||
spec/fixtures/katello-certs-check/ca.key
|
||
spec/fixtures/katello-certs-check/certs/*.srl
|
||
|
||
.xml
|
.gitlab-ci.yml | ||
---|---|---|
---
|
||
stages:
|
||
- lint
|
||
- test
|
||
- installation-tests
|
||
|
||
variables:
|
||
RUBY_VERSION: "2.7"
|
||
RUBY_IMAGE: "ruby:${RUBY_VERSION}"
|
||
|
||
.common:
|
||
image: ${RUBY_IMAGE}
|
||
cache:
|
||
key: $CI_COMMIT_REF_SLUG
|
||
paths:
|
||
- vendor/ruby
|
||
before_script:
|
||
- bundle config set --local path 'vendor/ruby'
|
||
- bundle install -j $(nproc)
|
||
|
||
lint:
|
||
extends: .common
|
||
stage: lint
|
||
script:
|
||
- bundle exec rubocop --format junit --out rubocop.xml --display-only-failed
|
||
artifacts:
|
||
when: always
|
||
paths:
|
||
- rubocop.xml
|
||
reports:
|
||
junit: rubocop.xml
|
||
|
||
test:
|
||
extends: .common
|
||
stage: test
|
||
script:
|
||
- bundle exec rspec --format RspecJunitFormatter --out rspec.xml
|
||
artifacts:
|
||
when: always
|
||
paths:
|
||
- rspec.xml
|
||
reports:
|
||
junit: rspec.xml
|
||
|
||
installation-tests:
|
||
extends: .common
|
||
stage: installation-tests
|
||
variables:
|
||
PREFIX: "${RUBY_VERSION}"
|
||
script:
|
||
- apt update && apt install -y asciidoc-base docbook-xsl --no-install-recommends
|
||
- bundle exec rake install --trace
|
||
- bundle exec rake installation_tests --trace
|
||
...
|
Gemfile | ||
---|---|---|
|
||
group :test do
|
||
gem 'rspec'
|
||
gem 'rspec_junit_formatter'
|
||
gem 'rubocop', '~> 0.80.0'
|
||
end
|
||
|
Rakefile | ||
---|---|---|
PKGDIR,
|
||
]
|
||
|
||
task :installation_tests do
|
||
sh "bundle exec #{PREFIX}/sbin/foreman-installer --help --scenario foreman --trace"
|
||
sh "bundle exec #{PREFIX}/sbin/foreman-installer --help --scenario foreman-proxy-content --trace"
|
||
sh "bundle exec #{PREFIX}/sbin/foreman-installer --help --scenario katello --trace"
|
||
sh "bundle exec #{PREFIX}/sbin/foreman-proxy-certs-generate --help --trace"
|
||
sh "bundle exec #{PREFIX}/sbin/foreman-proxy-certs-generate --help | grep -q certs-update-server"
|
||
end
|
||
|
||
namespace :pkg do
|
||
desc 'Generate package source tar.bz2'
|
||
task :generate_source => [PKGDIR, "#{BUILDDIR}/modules"] do
|
Also available in: Unified diff
Fixes #37261 - Add gitlab ci configuration