66 - " main"
77 workflow_dispatch :
88
9- env :
10- HONEYCOMB_WRITEKEY : 7f3c63a70eecc61d635917de46bea4e6
11- HONEYCOMB_DATASET : litmus tests
12-
139jobs :
1410 Spec :
1511 uses : " puppetlabs/cat-github-actions/.github/workflows/module_ci.yml@main"
1612 secrets : " inherit"
1713
1814 Integration :
1915 needs : " Spec"
20- if : ${{ needs.setup_matrix.outputs.matrix != '{}' }}
21-
2216 runs-on : ubuntu-20.04
2317 strategy :
2418 fail-fast : false
2519 matrix : {'platform':['centos-7'],'collection':['puppet6-nightly', 'puppet7-nightly']}
2620
27- env :
28- BUILDEVENT_FILE : ' ../buildevents.txt'
29-
3021 steps :
31- - run : |
32- echo 'platform=${{ matrix.platform }}' >> $BUILDEVENT_FILE
33- echo 'collection=${{ matrix.collection }}' >> $BUILDEVENT_FILE
34- - name : " Honeycomb: Start recording"
35- uses : puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
36- with :
37- apikey : ${{ env.HONEYCOMB_WRITEKEY }}
38- dataset : ${{ env.HONEYCOMB_DATASET }}
39- job-status : ${{ job.status }}
40- matrix-key : ${{ matrix.platform }}-${{ matrix.collection }}
41-
42- - name : " Honeycomb: start first step"
43- run : |
44- echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-1 >> $GITHUB_ENV
45- echo STEP_START=$(date +%s) >> $GITHUB_ENV
4622 - name : Checkout Source
4723 uses : actions/checkout@v2
4824
@@ -55,81 +31,40 @@ jobs:
5531 - name : Print bundle environment
5632 run : |
5733 echo ::group::bundler environment
58- buildevents cmd $TRACE_ID $STEP_ID 'bundle env' -- bundle env
34+ bundle env
5935 echo ::endgroup::
36+
6037 - name : Create the fixtures directory
6138 run : |
6239 echo ::group::Create the fixtures directory
63- buildevents cmd $TRACE_ID $STEP_ID 'bundle exec rake spec_prep' -- bundle exec rake spec_prep
40+ bundle exec rake spec_prep
6441 echo ::endgroup::
65- - name : " Honeycomb: Record Setup Environment time"
66- if : ${{ always() }}
67- run : |
68- buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Environment'
69- echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-2 >> $GITHUB_ENV
70- echo STEP_START=$(date +%s) >> $GITHUB_ENV
42+
7143 - name : Provision test environment
7244 run : |
73- buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:provision' -- bundle exec bolt --modulepath spec/fixtures/modules plan run kubernetes::provision_cluster image_type=${{ matrix.platform }}
74- echo ::group::=== REQUEST ===
75- cat request.json || true
76- echo
77- echo ::endgroup::
78- echo ::group::=== INVENTORY ===
79- if [ -f 'spec/fixtures/litmus_inventory.yaml' ]; then
80- FILE='spec/fixtures/litmus_inventory.yaml'
81- elif [ -f 'inventory.yaml' ]; then
82- FILE='inventory.yaml'
83- fi
45+ bundle exec bolt --modulepath spec/fixtures/modules plan run kubernetes::provision_cluster image_type=${{ matrix.platform }}
46+ FILE='spec/fixtures/litmus_inventory.yaml'
8447 sed -e 's/password: .*/password: "[redacted]"/' < $FILE || true
85- echo ::endgroup::
8648 echo INVENTORY_PATH=$FILE >> $GITHUB_ENV
8749
8850 - name : Puppet server setup
8951 run : |
90- buildevents cmd $TRACE_ID $STEP_ID 'rake kubernetes::puppetserver_setup' -- bundle exec bolt --modulepath spec/fixtures/modules plan run kubernetes::puppetserver_setup collection='${{ matrix.collection }}' -i ./$INVENTORY_PATH
52+ bundle exec bolt --modulepath spec/fixtures/modules plan run kubernetes::puppetserver_setup collection='${{ matrix.collection }}' -i ./$INVENTORY_PATH
9153
9254 - name : Install agent
9355 run : |
94- buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:install_agent ${{ matrix.collection }}' -- bundle exec rake 'litmus:install_agent[${{ matrix.collection }}]'
56+ bundle exec rake 'litmus:install_agent[${{ matrix.collection }}]'
9557
9658 - name : Install module
9759 run : |
98- buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:install_module' -- bundle exec rake 'litmus:install_module'
99-
100- - name : " Honeycomb: Record deployment times"
101- if : ${{ always() }}
102- run : |
103- echo ::group::honeycomb step
104- buildevents step $TRACE_ID $STEP_ID $STEP_START 'Deploy test system'
105- echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-3 >> $GITHUB_ENV
106- echo STEP_START=$(date +%s) >> $GITHUB_ENV
107- echo ::endgroup::
60+ bundle exec rake 'litmus:install_module'
10861
10962 - name : Run integration tests
11063 run : |
111- buildevents cmd $TRACE_ID $STEP_ID 'rake kubernetes:integration' -- bundle exec rake kubernetes:integration
112-
113- - name : " Honeycomb: Record integration testing times"
114- if : ${{ always() }}
115- run : |
116- buildevents step $TRACE_ID $STEP_ID $STEP_START 'Run integration tests'
117- echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-4 >> $GITHUB_ENV
118- echo STEP_START=$(date +%s) >> $GITHUB_ENV
64+ bundle exec rake kubernetes:integration
11965
12066 - name : Remove test environment
12167 if : ${{ always() }}
12268 continue-on-error : true
12369 run : |
124- if [ -f inventory.yaml || -f spec/fixtures/litmus_inventory.yaml ]; then
125- buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:tear_down' -- bundle exec rake 'litmus:tear_down'
126- echo ::group::=== REQUEST ===
127- cat request.json || true
128- echo
129- echo ::endgroup::
130- fi
131-
132- - name : " Honeycomb: Record removal times"
133- if : ${{ always() }}
134- run : |
135- buildevents step $TRACE_ID $STEP_ID $STEP_START 'Remove test environment'
70+ bundle exec rake 'litmus:tear_down'
0 commit comments