Skip to content

Commit 1499ab9

Browse files
committed
(maint) Use null value with Puppet 7
Previously, in using the unit test workflows with Puppet modules, we set Puppet 7's PUPPET_FORGE_TOKEN environment variable to '' and in module Gemfiles evaluated `!ENV['PUPPET_FORGE_TOKEN'].to_s.empty?`. However, the latest PDK template's (3.5.1) Gemfile evaluates the PUPPET_FORGE_TOKEN environment variable slightly differently, opting instead to check whether it exists at all: https://github.com/puppetlabs/pdk-templates/blob/3.5.1.2/moduleroot/Gemfile.erb#L63 Ruby confusingly evaluates everything besides false and nil as "truthy," so an empty string (like the one we set for PUPPET_FORGE_TOKEN) is evaluated as true. This commit updates Puppet 7's environment variable to be set to null instead of an empty string to allow the workflow to be used with PDK template 3.5.1
1 parent 5ce8fcd commit 1499ab9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/unit_tests_with_released_puppet_gem.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
include:
1818
- puppet_version: '7'
1919
ruby: '2.7'
20-
puppet_forge_token: ''
20+
puppet_forge_token: ${{ null }}
2121
- puppet_version: '8'
2222
ruby: '3.1'
2323
puppet_forge_token: 'YES'

0 commit comments

Comments
 (0)