container/client: rework tls settings

Instead of having an extra field, `TlsVerify`, on the `Client` and
then later setting the corresponding `SystemContext` options, use
the existing `SystemContext` field of `Client`. The corresponding
field is a tri-state: unset, true, false, which is represented as
a pointer to boolean in the `Client`'s new getter and setter. This
also inverts the boolean logic from verify TLS to skip TLS which
aligns very well with the corresponding fields in the upload target
struct.
In addition we properly capitalize some existing variables.
This commit is contained in:
Christian Kellner 2022-07-10 21:32:05 +02:00 committed by Ondřej Budai
parent 4b67e12958
commit 865a899f70
3 changed files with 36 additions and 10 deletions

View file

@ -751,10 +751,7 @@ func (impl *OSBuildJobImpl) Run(job worker.Job) error {
client.Auth.Username = targetOptions.Username
client.Auth.Password = targetOptions.Password
if targetOptions.TlsVerify != nil {
client.TlsVerify = *targetOptions.TlsVerify
}
client.SetTLSVerify(targetOptions.TlsVerify)
sourcePath := path.Join(outputDirectory, jobTarget.OsbuildArtifact.ExportName, jobTarget.OsbuildArtifact.ExportFilename)