Skip to content
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
14 changes: 10 additions & 4 deletions src/tools/genpolicy/update_policy_samples.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,14 @@ def timeRunCmd(arg):
sys.exit(f"filepath does not exists: {filepath}")

# build tool
print("========== COMMAND: LIBC=gnu BUILD_TYPE= make")
runCmd("LIBC=gnu BUILD_TYPE= make")
next_command = "LIBC=gnu BUILD_TYPE= make"
print("========== COMMAND: " + next_command)
runCmd(next_command)

# allow all users to pull container images by using containerd
next_command = "sudo chmod a+rw /var/run/containerd/containerd.sock"
print("========== COMMAND: " + next_command)
runCmd(next_command)

# update files
genpolicy_path = "./target/x86_64-unknown-linux-gnu/debug/genpolicy"
Expand All @@ -58,11 +64,11 @@ def timeRunCmd(arg):
futures = []

for file in default_yamls + no_policy + needs_containerd_pull:
cmd = f"sudo {genpolicy_path} -d -y {os.path.join(file_base_path, file)}"
cmd = f"{genpolicy_path} -d -y {os.path.join(file_base_path, file)}"
futures.append(executor.submit(timeRunCmd, cmd))

for file in silently_ignored:
cmd = f"sudo {genpolicy_path} -d -s -y {os.path.join(file_base_path, file)}"
cmd = f"{genpolicy_path} -d -s -y {os.path.join(file_base_path, file)}"
futures.append(executor.submit(timeRunCmd, cmd))

for future in concurrent.futures.as_completed(futures):
Expand Down