Skip to content

Commit f73fd3b

Browse files
committed
(MAINT): Add SERVICE_URL environment variable to CI and nightly workflows
1 parent d79d4ea commit f73fd3b

File tree

3 files changed

+88
-4
lines changed

3 files changed

+88
-4
lines changed

.github/workflows/ci.yml

Lines changed: 82 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,92 @@ on:
55
branches:
66
- "main"
77
workflow_dispatch:
8+
9+
env:
10+
SERVICE_URL: https://facade-maint-config-windows-use-ssh-6f3kfepqcq-ew.a.run.app/v1/provision
811

912
jobs:
1013
Spec:
1114
uses: "puppetlabs/cat-github-actions/.github/workflows/module_ci.yml@main"
1215
secrets: "inherit"
1316

17+
setup_matrix:
18+
name: "Setup Test Matrix"
19+
needs: "Spec"
20+
runs-on: ubuntu-latest
21+
outputs:
22+
matrix: ${{ steps.get-matrix.outputs.matrix }}
23+
24+
steps:
25+
- name: "Checkout"
26+
uses: "actions/checkout@v4"
27+
28+
- name: "Setup ruby"
29+
uses: "ruby/setup-ruby@v1"
30+
with:
31+
ruby-version: "3.1"
32+
bundler-cache: true
33+
34+
- name: "Bundle environment"
35+
run: |
36+
echo ::group::bundler environment
37+
bundle env
38+
echo ::endgroup::
39+
40+
- name: Setup Acceptance Test Matrix
41+
id: get-matrix
42+
run: |
43+
bundle exec matrix_from_metadata_v2
44+
1445
Acceptance:
15-
needs: Spec
16-
uses: "puppetlabs/cat-github-actions/.github/workflows/module_acceptance.yml@main"
17-
secrets: "inherit"
46+
name: "${{matrix.platforms.label}}, ${{matrix.collection}}"
47+
needs:
48+
- setup_matrix
49+
if: ${{ needs.setup_matrix.outputs.matrix != '{}' }}
50+
51+
runs-on: ubuntu-latest
52+
strategy:
53+
fail-fast: false
54+
matrix: ${{fromJson(needs.setup_matrix.outputs.matrix)}}
55+
steps:
56+
- name: "Checkout"
57+
uses: "actions/checkout@v4"
58+
59+
- name: "Setup ruby"
60+
uses: "ruby/setup-ruby@v1"
61+
with:
62+
ruby-version: "3.1"
63+
bundler-cache: true
64+
65+
- name: Print bundle environment
66+
run: |
67+
echo ::group::bundler environment
68+
bundle env
69+
echo ::endgroup::
70+
71+
- name: Provision test environment
72+
run: |
73+
bundle exec rake "litmus:provision[${{matrix.platforms.provider}},${{ matrix.platforms.image }}]"
74+
# Redact password
75+
FILE='spec/fixtures/litmus_inventory.yaml'
76+
sed -e 's/password: .*/password: "[redacted]"/' < $FILE || true
77+
78+
- name: "Install Puppet agent"
79+
run: |
80+
bundle exec rake 'litmus:install_agent[${{ matrix.collection }}]'
81+
82+
- name: "Install module"
83+
run: |
84+
bundle exec rake 'litmus:install_module'
85+
86+
- name: "Run acceptance tests"
87+
run: |
88+
bundle exec rake 'litmus:acceptance:parallel'
89+
90+
- name: "Remove test environment"
91+
if: ${{ always() }}
92+
continue-on-error: true
93+
run: |
94+
if [[ -f spec/fixtures/litmus_inventory.yaml ]]; then
95+
bundle exec rake 'litmus:tear_down'
96+
fi

.github/workflows/nightly.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
- cron: "0 0 * * *"
66
workflow_dispatch:
77

8+
env:
9+
SERVICE_URL: https://facade-maint-config-windows-use-ssh-6f3kfepqcq-ew.a.run.app/v1/provision
10+
811
jobs:
912
Spec:
1013
uses: "puppetlabs/cat-github-actions/.github/workflows/module_ci.yml@main"
@@ -14,4 +17,3 @@ jobs:
1417
needs: Spec
1518
uses: "puppetlabs/cat-github-actions/.github/workflows/module_acceptance.yml@main"
1619
secrets: "inherit"
17-

.sync.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
---
2+
common:
3+
service_url: https://facade-maint-config-windows-use-ssh-6f3kfepqcq-ew.a.run.app/v1/provision
4+
25
".gitlab-ci.yml":
36
delete: true
47
".rubocop.yml":

0 commit comments

Comments
 (0)