@@ -3,17 +3,17 @@ name: "PE Nightly Acceptance Testing"
33on :
44 workflow_dispatch :
55 workflow_call :
6+ schedule :
7+ - cron : ' 25 5 * * *'
68
79jobs :
810 setup_matrix :
911 name : " Setup Test Matrix"
1012 runs-on : ubuntu-20.04
11- outputs :
12- matrix : ${{ steps.get-matrix.outputs.matrix }}
1313
1414 steps :
1515 - name : Checkout Source
16- uses : actions/checkout@v2
16+ uses : actions/checkout@v3
1717 if : ${{ github.repository_owner == 'puppetlabs' }}
1818
1919 - name : Activate Ruby 2.7
@@ -30,40 +30,32 @@ jobs:
3030 bundle env
3131 echo ::endgroup::
3232
33- - name : ' Activate twingate to obtain unreleased build'
34- uses : twingate/github-action@v1
35- with :
36- service-key : ${{ secrets.TWINGATE_PUBLIC_REPO_KEY }}
37-
38- - name : ' Get latest build name'
39- id : latest
40- run : |
41- echo "::set-output name=ver::$(curl -q https://artifactory.delivery.puppetlabs.net/artifactory/generic_enterprise__local/main/ci-ready/LATEST)"
42-
43- - name : Setup Acceptance Test Matrix
44- id : get-matrix
45- run : |
46- if [[ -e spec/fixtures/matrix/nightly.json ]]; then
47- out=$(jq -c '. + ($matrix | .[])' --slurpfile matrix spec/fixtures/matrix/nightly.json <<<'${{ steps.latest_release.outputs.latest }}')
48- echo "::set-output name=matrix::$out"
49- else
50- echo "::set-output name=matris::{}"
51- fi
52-
5333 Acceptance :
54- name : " ${{matrix.platforms.label}}, ${{matrix.collection}}"
55- needs :
56- - setup_matrix
57- if : ${{ needs.setup_matrix.outputs.matrix != '{}' }}
58-
34+ name : " Nightly"
5935 runs-on : ubuntu-20.04
6036 strategy :
6137 fail-fast : false
62- matrix : ${{fromJson(needs.setup_matrix.outputs.matrix)}}
38+ matrix :
39+ architecture : [standard]
40+ image : [centos-7, sles-12, sles-15, rhel-7, rhel-8]
41+ include :
42+ - image : centos-7
43+ os : el-7-x86_64
44+ - image : sles-12
45+ os : sles-12-x86_64
46+ - image : rhel-7
47+ os : el-7-x86_64
48+ - image : sles-15
49+ os : sles-15-x86_64
50+ - image : rhel-8
51+ os : el-8-x86_64
52+
53+ env :
54+ PUPPET_GEM_VERSION : ' ~> 7.24'
6355
6456 steps :
6557 - name : Checkout Source
66- uses : actions/checkout@v2
58+ uses : actions/checkout@v3
6759
6860 - name : Activate Ruby 2.7
6961 uses : ruby/setup-ruby@v1
@@ -76,34 +68,52 @@ jobs:
7668 bundle env
7769 echo ::endgroup::
7870
79- - name : Provision test environment
71+ - name : ' Provision test environment'
72+ timeout-minutes : 15
8073 run : |
81- bundle exec rake 'litmus:provision[${{matrix.platforms.provider}},${{ matrix.platforms.image }}]'
82- echo ::group::=== REQUEST ===
83- cat request.json || true
84- echo
85- echo ::endgroup::
86- echo ::group::=== INVENTORY ===
87- if [ -f 'spec/fixtures/litmus_inventory.yaml' ];
88- then
89- FILE='spec/fixtures/litmus_inventory.yaml'
90- elif [ -f 'inventory.yaml' ];
91- then
92- FILE='inventory.yaml'
93- fi
94- sed -e 's/password: .*/password: "[redacted]"/' < $FILE || true
95- echo ::endgroup::
96- echo INVENTORY_PATH=$FILE >> $GITHUB_ENV
74+ echo ::group::prepare
75+ mkdir -p $HOME/.ssh
76+ echo 'Host *' > $HOME/.ssh/config
77+ echo ' ServerAliveInterval 150' >> $HOME/.ssh/config
78+ echo ' ServerAliveCountMax 2' >> $HOME/.ssh/config
79+ bundle exec rake spec_prep
80+ echo ::endgroup::
81+ echo ::group::provision
82+ bundle exec bolt plan run peadm_spec::provision_test_cluster \
83+ --modulepath spec/fixtures/modules \
84+ provider=provision_service \
85+ image=${{ matrix.image }} \
86+ architecture=${{ matrix.architecture }}
87+ echo ::endgroup::
88+ echo ::group::info:request
89+ cat request.json || true; echo
90+ echo ::endgroup::
91+ echo ::group::info:inventory
92+ sed -e 's/password: .*/password: "[redacted]"/' < spec/fixtures/litmus_inventory.yaml || true
93+ echo ::endgroup::
9794
98- - name : ' Activate twingate '
95+ - name : ' Activate'
9996 uses : twingate/github-action@v1
10097 with :
10198 service-key : ${{ secrets.TWINGATE_PUBLIC_REPO_KEY }}
10299
103- - name : Install PE
100+ - name : ' Get latest build name'
101+ id : latest
104102 run : |
105- bundle exec bolt --tmpdir /tmp --log-level debug --modulepath spec/fixtures/modules -i ./$INVENTORY_PATH plan run deploy_pe::provision_master --params '{"download_url":" https://artifactory.delivery.puppetlabs.net/artifactory/generic_enterprise__local/main/ci-ready/puppet-enterprise-${{ steps.latest.outputs.ver }}-${{matrix.platforms.os-family}}.tar","pe_settings":{"password":"puppetlabs", "configure_tuning": false}}' --targets all --stream
103+ echo "ver=$(curl -q https://artifactory.delivery.puppetlabs.net/artifactory/generic_enterprise__local/main/ci-ready/LATEST)" >> $GITHUB_OUTPUT
106104
105+ - name : ' Install PE on test cluster'
106+ timeout-minutes : 120
107+ run : |
108+ bundle exec bolt plan run peadm_spec::install_test_cluster \
109+ --inventoryfile spec/fixtures/litmus_inventory.yaml \
110+ --modulepath spec/fixtures/modules \
111+ permit_unsafe_versions=true \
112+ code_manager_auto_configure=false \
113+ download_mode="bolthost" \
114+ --log-level debug \
115+ architecture=${{ matrix.architecture }} \
116+ pe_installer_source="https://artifactory.delivery.puppetlabs.net/artifactory/generic_enterprise__local/main/ci-ready/puppet-enterprise-${{ steps.latest.outputs.ver }}-${{ matrix.os }}.tar"
107117 - name : Install module
108118 run : |
109119 bundle exec rake 'litmus:install_module'
@@ -121,3 +131,13 @@ jobs:
121131 echo
122132 echo ::endgroup::
123133 fi
134+
135+ - name : Notify slack fail
136+ if : failure()
137+ env :
138+ SLACK_BOT_TOKEN : ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }}
139+ uses : voxmedia/github-action-slack-notify-build@v1
140+ with :
141+ channel_id : C049PL6EF9S
142+ status : FAILED
143+ color : danger
0 commit comments