Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update README.md to highlight build_versions.json and add .gitlab-ci.yaml example #5

Merged
merged 1 commit into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 96 additions & 0 deletions .gitlab-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
---
# Example of a CI/CD pipeline for a Puppet module
stages:
- QA🚦
- Test🚥

variables:
RAKE: rake -f /Rakefile

default:
image:
name: ghcr.io/voxpupuli/vobox:7.29.1-main
entrypoint: [""]

### QA🚦
.qa:
stage: QA🚦

qa-check:
extends: .qa
script:
- $RAKE check

qa-lint:
extends: .qa
script:
- $RAKE lint

qa-metadata_lint:
extends: .qa
script:
- $RAKE metadata_lint

qa-puppet-strings:
extends: .qa
script:
- $RAKE strings:validate:reference

qa-rubocop:
extends: .qa
script:
- $RAKE rubocop

qa-syntax:
extends: .qa
script:
- $RAKE syntax

qa-gateway:
stage: QA🚦
image: alpine:latest
script:
- echo "QA Gateway"
variables:
GIT_STRATEGY: none
needs:
- qa-check
- qa-lint
- qa-metadata_lint
- qa-puppet-strings
- qa-rubocop
- qa-syntax

### Test🚥
.test:
stage: Test🚥
needs:
- qa-gateway

test-unit:
extends: .test
script:
- $RAKE spec
artifacts:
expire_in: "30 days"
when: always
paths:
- "rspec.xml"
reports:
junit: "rspec.xml"

test-acceptance:
extends: .test
script:
- $RAKE beaker

test-gateway:
stage: Test🚥
image: alpine:latest
script:
- echo "Test Gateway"
variables:
GIT_STRATEGY: none
needs:
- test-unit
- test-acceptance
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@

This container should be used to test voxpupuli puppet modules. It has the voxpupuli-test, -acceptance, -release gems and all dependencies installed.

### Versions

Too see which gems and versions are included in the container, see:

[build_versions.json](build_versions.json)

## Example usage

```shell
Expand All @@ -17,6 +23,10 @@ docker run -it --rm -v $(pwd):/repo voxpupuli/voxbox spec # rake spec
docker run -it --rm -v $(pwd):/repo --entrypoint bash voxpupuli/voxbox # get shell
```

## Example Gitlab CI configuration

see [.gitlab-ci.yml](.gitlab-ci.yml)

## Version Schema

The version schema has the following layout:
Expand Down