Skip to content

Commit ab4cbef

Browse files
Merge pull request #173 from MirandaStreeter/catalog_ci
Add a basic catalog for CI to compile as a smoke test
2 parents 25828de + d1dc7d4 commit ab4cbef

2 files changed

Lines changed: 21 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,13 @@ jobs:
5555
RUBYGEM_R10K=${{ matrix.rubygem_r10k }}
5656
RUBYGEM_RUGGED=${{ matrix.rubygem_rugged }}
5757
JDK_VERSION=${{ matrix.jdk_version }}
58+
- name: Test catalog
59+
run: |
60+
docker run --rm -v "$PWD/tests:/tests:ro,Z" --entrypoint puppet \
61+
ci/openvoxserver:${{ matrix.server_version }}-${{ matrix.os }}-${{ matrix.platform }} \
62+
catalog compile --manifest /tests/simple_catalog.pp --render-as json > catalog.json
63+
grep -q '"type":"Host"' catalog.json
64+
grep -q '"type":"Cron"' catalog.json
5865
5966
tests:
6067
needs:

tests/simple_catalog.pp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Example catalog for CI testing
2+
3+
host { 'test.example.com':
4+
ensure => present,
5+
ip => '10.0.0.1',
6+
}
7+
8+
cron { 'nightly-job':
9+
ensure => present,
10+
command => '/bin/true',
11+
user => 'root',
12+
hour => '2',
13+
minute => '0',
14+
}

0 commit comments

Comments
 (0)