Skip to content

Commit 5cd9ef8

Browse files
committed
(PE-40162)approach to CI
CI test for XL PE setup with server replica (I used .github folder based on where other files were, I can move the file elsewhere if needed)
1 parent 26c3ddf commit 5cd9ef8

File tree

1 file changed

+101
-0
lines changed

1 file changed

+101
-0
lines changed
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# PE 2023.8.0 XL with DR on alma linux cloud / alma linux 8
2+
3+
---
4+
name: Install test matrix
5+
on:
6+
pull_request:
7+
paths:
8+
- .github/workflows/**/*
9+
- spec/**/*
10+
- lib/**/*
11+
- tasks/**/*
12+
- functions/**/*
13+
- types/**/*
14+
- plans/**/*
15+
- hiera/**/*
16+
- manifests/**/*
17+
- templates/**/*
18+
- files/**/*
19+
- metadata.json
20+
- Rakefile
21+
- Gemfile
22+
- provision.yaml
23+
- .rspec
24+
- .rubocop.yml
25+
- .puppet-lint.rc
26+
- .fixtures.yml
27+
branches: [main]
28+
workflow_dispatch: {}
29+
jobs:
30+
test-install:
31+
name: PE ${{ matrix.version }} ${{ matrix.architecture }} on ${{ matrix.image }}
32+
runs-on: ubuntu-20.04
33+
env:
34+
BOLT_GEM: true
35+
BOLT_DISABLE_ANALYTICS: true
36+
LANG: en_US.UTF-8
37+
strategy:
38+
fail-fast: false
39+
matrix:
40+
architecture: [extra-large-with-dr]
41+
version: [2023.8.0] # can change to test multiple versions once this one works
42+
image: [almalinux-cloud/almalinux-8]
43+
steps:
44+
- name: Checkout Source
45+
uses: actions/checkout@v4
46+
- name: Activate Ruby 2.7
47+
uses: ruby/setup-ruby@v1
48+
with:
49+
ruby-version: '2.7'
50+
bundler-cache: true
51+
- name: Print bundle environment
52+
if: ${{ github.repository_owner == 'puppetlabs' }}
53+
run: |
54+
echo ::group::info:bundler
55+
bundle env
56+
echo ::endgroup::
57+
- name: Provision test cluster
58+
timeout-minutes: 15
59+
run: |
60+
echo ::group::prepare
61+
mkdir -p $HOME/.ssh
62+
echo 'Host *' > $HOME/.ssh/config
63+
echo ' ServerAliveInterval 150' >> $HOME/.ssh/config
64+
echo ' ServerAliveCountMax 2' >> $HOME/.ssh/config
65+
bundle exec rake spec_prep
66+
echo ::endgroup::
67+
echo ::group::provision
68+
bundle exec bolt plan run peadm_spec::provision_test_cluster \
69+
--modulepath spec/fixtures/modules \
70+
provider=provision_service \
71+
image=${{ matrix.image }} \
72+
architecture=${{ matrix.architecture }} \
73+
--log-level trace
74+
echo ::endgroup::
75+
echo ::group::info:request
76+
cat request.json || true; echo
77+
echo ::endgroup::
78+
echo ::group::info:inventory
79+
sed -e 's/password: .*/password: "[redacted]"/' < spec/fixtures/litmus_inventory.yaml || true
80+
echo ::endgroup::
81+
- name: Install PE on test cluster
82+
timeout-minutes: 120
83+
run: |
84+
bundle exec bolt plan run peadm_spec::install_test_cluster \
85+
--inventoryfile spec/fixtures/litmus_inventory.yaml \
86+
--modulepath spec/fixtures/modules \
87+
architecture=${{ matrix.architecture }} \
88+
version=${{ matrix.version }} \
89+
console_password=${{ secrets.CONSOLE_PASSWORD }}
90+
- name: Tear down test cluster
91+
if: ${{ always() }}
92+
continue-on-error: true
93+
run: |-
94+
if [ -f spec/fixtures/litmus_inventory.yaml ]; then
95+
echo ::group::tear_down
96+
bundle exec rake 'litmus:tear_down'
97+
echo ::endgroup::
98+
echo ::group::info:request
99+
cat request.json || true; echo
100+
echo ::endgroup::
101+
fi

0 commit comments

Comments
 (0)