Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd: extra env logging for osbuild worker #4495

Merged
merged 1 commit into from
Nov 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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: %q", extraEnv)
opts := &osbuildexecutor.OsbuildOpts{
StoreDir: impl.Store,
OutputDir: outputDirectory,
Expand Down
Loading