theforeman / puppet-pulpcore

Puppet module for setting up Pulp 3 as part of Katello installation
GNU General Public License v3.0
2 stars 28 forks source link

Use gha-puppet again #310

Closed ekohl closed 11 months ago

ekohl commented 11 months ago

This is to test out some new workflows where we again rely on the common workflows but while also adding the option to test multiple versions.

Right now it's unknown if this concept works.

ekohl commented 11 months ago

For complete context, there are now PRs up: https://github.com/voxpupuli/puppet_metadata/pull/108 & https://github.com/voxpupuli/gha-puppet/pull/42

ekohl commented 11 months ago

Note to self: also support beaker_facter in .sync.yml so the file can be managed again.

ekohl commented 11 months ago

Something is different with curl: curl: unknown --write-out variable: 'stderr.

When I run it manually on EL8:

# curl --silent --write-out '%{stderr}Response-Code: %{response_code}\n' https://ekohl.nl
<html>
<head><title>301 Moved Permanently</title></head>
<body>
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx</center>
</body>
</html>
curl: unknown --write-out variable: 'stderr'
Response-Code: 301
# curl --silent --write-out '%{stderr}Response-Code: %{response_code}\n' https://ekohl.nl > /dev/null 
curl: unknown --write-out variable: 'stderr'
# curl --silent --write-out '%{stderr}Response-Code: %{response_code}\n' https://ekohl.nl 2> /dev/null 
<html>
<head><title>301 Moved Permanently</title></head>
<body>
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx</center>
</body>
</html>
Response-Code: 301

So now I wonder how this ever worked. https://github.com/theforeman/puppet-pulpcore/pull/311 is passing, but now I can't explain why.

Edit: the only thing I can imagine is that the previous helpers somehow mixed stdout and stderr together where now it's split.

ekohl commented 11 months ago

Integrated in https://github.com/theforeman/puppet-pulpcore/pull/309 now that all the bits are in.

ekohl commented 11 months ago

Following up: beaker-puppet hacked $PATH to include /opt/puppetlabs/puppet/bin so it used /opt/puppetlabs/puppet/bin/curl instead of /usr/bin/curl. beaker_puppet_helpers doesn't do that (because on a real system it's not in $PATH either.

evgeni commented 11 months ago

Great detective work!