Skip to content

Commit

Permalink
gitlab: run generator scripts with PYTHONUNBUFFERED
Browse files Browse the repository at this point in the history
Set PYTHONUNBUFFERED so that script output is printed to the CI log
without buffering/batching.
Drop unneeded print flushing.
  • Loading branch information
achilleas-k committed Jul 31, 2023
1 parent e7b5279 commit 028b1ee
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ generate-build-config:
variables:
RUNNER: aws/fedora-38-x86_64
INTERNAL_NETWORK: "true"
PYTHONUNBUFFERED: 1
script:
- sudo dnf -y install go python3 gpgme-devel s3cmd
osbuild osbuild-luks2 osbuild-lvm2 osbuild-ostree osbuild-selinux
Expand All @@ -67,6 +68,7 @@ generate-ostree-build-config-x86_64:
variables:
RUNNER: aws/fedora-38-x86_64
INTERNAL_NETWORK: "true"
PYTHONUNBUFFERED: 1
script:
- sudo dnf -y install go python3 gpgme-devel s3cmd
osbuild osbuild-luks2 osbuild-lvm2 osbuild-ostree osbuild-selinux podman
Expand Down
2 changes: 1 addition & 1 deletion test/generate-build-config
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def generate_manifests(outputdir):
"-workers", "100",
"-images", "qcow2",
"-arches", arches_arg]
print(f"Running: {' '.join(cmd)}", flush=True)
print(f"Running: {' '.join(cmd)}")
out, err = testlib.runcmd(cmd)

# print stderr in case there were errors or warnings about skipped configurations
Expand Down
2 changes: 1 addition & 1 deletion test/generate-ostree-build-config
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def gen_dependency_manifests(config_map, outputdir):
"-images", ",".join(gen_image_types),
"-config", tmpfile.name,
"-arches", arches_arg]
print(" ".join(cmd), flush=True)
print(" ".join(cmd))
out, err = testlib.runcmd(cmd)

# print stderr in case there were errors or warnings about skipped configurations
Expand Down

0 comments on commit 028b1ee

Please sign in to comment.