Skip to content

Commit aeb0bb3

Browse files
committed
Remove hardcoder version of ruby and puppet and replaced with values
generated by matrix_from_metadata_v2
1 parent e06018d commit aeb0bb3

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

.github/workflows/module_acceptance.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ jobs:
3030
runs-on: ${{ inputs.runs_on }}
3131
outputs:
3232
acceptance_matrix: ${{ steps.get-matrix.outputs.matrix }}
33+
ruby_version: ${{ steps.get-puppet_ruby_version.outputs.ruby_version }}
34+
puppet_version: ${{ steps.get-puppet_ruby_version.outputs.puppet_version }}
3335

3436
env:
3537
BUNDLE_WITHOUT: release_prep
@@ -56,8 +58,13 @@ jobs:
5658
run: |
5759
bundle exec matrix_from_metadata_v2 ${{ inputs.flags }}
5860
61+
- name: Setup Ruby Version and Setup Puppet Version
62+
id: get-puppet_ruby_version
63+
run: |
64+
echo ${{ toJSON(steps.get-matrix.outputs.spec_matrix ) }} | jq -r '.include | .[0] | to_entries[] | "\(.key)=\(.value)"' >> $GITHUB_OUTPUT
65+
5966
acceptance:
60-
name: "Acceptance tests (${{matrix.platforms.label}}, ${{matrix.collection}})"
67+
name: "Acceptance tests (${{matrix.platforms.label}}, ${{matrix.collection}}) - ruby: ${{needs.setup_matrix.outputs.ruby_version}} puppet: ${{needs.setup_matrix.outputs.puppet_version}} "
6168
needs: "setup_matrix"
6269
runs-on: ${{ inputs.runs_on }}
6370
timeout-minutes: 180
@@ -67,7 +74,7 @@ jobs:
6774

6875
env:
6976
BUNDLE_WITHOUT: release_prep
70-
PUPPET_GEM_VERSION: '~> 7.24'
77+
PUPPET_GEM_VERSION: ${{needs.setup_matrix.outputs.puppet_version}}
7178
FACTER_GEM_VERSION: 'https://github.com/puppetlabs/facter#main' # why is this set?
7279

7380
steps:
@@ -88,7 +95,7 @@ jobs:
8895
- name: "Setup ruby"
8996
uses: "ruby/setup-ruby@v1"
9097
with:
91-
ruby-version: "2.7"
98+
ruby-version: ${{needs.setup_matrix.outputs.ruby_version}}
9299
bundler-cache: true
93100

94101
- name: "Bundle environment"

0 commit comments

Comments
 (0)