@@ -3,17 +3,17 @@ name: "PE Nightly Acceptance Testing"
3
3
on :
4
4
workflow_dispatch :
5
5
workflow_call :
6
+ schedule :
7
+ - cron : ' 25 5 * * *'
6
8
7
9
jobs :
8
10
setup_matrix :
9
11
name : " Setup Test Matrix"
10
12
runs-on : ubuntu-20.04
11
- outputs :
12
- matrix : ${{ steps.get-matrix.outputs.matrix }}
13
13
14
14
steps :
15
15
- name : Checkout Source
16
- uses : actions/checkout@v2
16
+ uses : actions/checkout@v3
17
17
if : ${{ github.repository_owner == 'puppetlabs' }}
18
18
19
19
- name : Activate Ruby 2.7
@@ -30,40 +30,32 @@ jobs:
30
30
bundle env
31
31
echo ::endgroup::
32
32
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
-
53
33
Acceptance :
54
- name : " ${{matrix.platforms.label}}, ${{matrix.collection}}"
55
- needs :
56
- - setup_matrix
57
- if : ${{ needs.setup_matrix.outputs.matrix != '{}' }}
58
-
34
+ name : " Nightly"
59
35
runs-on : ubuntu-20.04
60
36
strategy :
61
37
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'
63
55
64
56
steps :
65
57
- name : Checkout Source
66
- uses : actions/checkout@v2
58
+ uses : actions/checkout@v3
67
59
68
60
- name : Activate Ruby 2.7
69
61
uses : ruby/setup-ruby@v1
@@ -76,34 +68,52 @@ jobs:
76
68
bundle env
77
69
echo ::endgroup::
78
70
79
- - name : Provision test environment
71
+ - name : ' Provision test environment'
72
+ timeout-minutes : 15
80
73
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::
97
94
98
- - name : ' Activate twingate '
95
+ - name : ' Activate'
99
96
uses : twingate/github-action@v1
100
97
with :
101
98
service-key : ${{ secrets.TWINGATE_PUBLIC_REPO_KEY }}
102
99
103
- - name : Install PE
100
+ - name : ' Get latest build name'
101
+ id : latest
104
102
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
106
104
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"
107
117
- name : Install module
108
118
run : |
109
119
bundle exec rake 'litmus:install_module'
@@ -121,3 +131,13 @@ jobs:
121
131
echo
122
132
echo ::endgroup::
123
133
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