Skip to content

Commit

Permalink
cmd: extra env logging for osbuild worker
Browse files Browse the repository at this point in the history
  • Loading branch information
lzap committed Nov 26, 2024
1 parent 54ffc08 commit a4ac502
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/osbuild-worker/jobimpl-osbuild.go
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,9 @@ func (impl *OSBuildJobImpl) Run(job worker.Job) error {

// Both curl and ostree input share the same MTLS config
if impl.RepositoryMTLSConfig != nil {
// Setting a CA cert with hosted Pulp with break the build since Pulp redirects HTTPS requests to AWS S3 which has
// a different CA which is part of OS cert bundle. Both curl and ostree commands only support either explicit CA file
// or OS cert bundle, but not both. To verify hosted Pulp CA, enroll its CA into the OS cert bundle instead.
if impl.RepositoryMTLSConfig.CA != "" {
extraEnv = append(extraEnv, fmt.Sprintf("OSBUILD_SOURCES_CURL_SSL_CA_CERT=%s", impl.RepositoryMTLSConfig.CA))
extraEnv = append(extraEnv, fmt.Sprintf("OSBUILD_SOURCES_OSTREE_SSL_CA_CERT=%s", impl.RepositoryMTLSConfig.CA))
Expand Down Expand Up @@ -560,6 +563,7 @@ func (impl *OSBuildJobImpl) Run(job worker.Job) error {
exportPaths = append(exportPaths, path.Join(jobTarget.OsbuildArtifact.ExportName, jobTarget.OsbuildArtifact.ExportFilename))
}

logWithId.Infof("Extra env: %s", strings.Join(extraEnv, " "))
opts := &osbuildexecutor.OsbuildOpts{
StoreDir: impl.Store,
OutputDir: outputDirectory,
Expand Down

0 comments on commit a4ac502

Please sign in to comment.