-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Confcom Release 1.5.0 #9485
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
Confcom Release 1.5.0 #9485
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,46 @@ | ||||||
| # -------------------------------------------------------------------------------------------- | ||||||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||||||
| # Licensed under the MIT License. See License.txt in the project root for license information. | ||||||
| # -------------------------------------------------------------------------------------------- | ||||||
|
|
||||||
| import os | ||||||
| import subprocess | ||||||
| import tempfile | ||||||
| from typing import BinaryIO | ||||||
|
|
||||||
|
|
||||||
| def oras_attach( | ||||||
| signed_fragment: BinaryIO, | ||||||
| manifest_tag: str, | ||||||
| ) -> None: | ||||||
| subprocess.run( | ||||||
| [ | ||||||
| "oras", | ||||||
| "attach", | ||||||
| "--artifact-type", "application/x-ms-ccepolicy-frag", | ||||||
| manifest_tag, | ||||||
| os.path.relpath(signed_fragment.name, start=os.getcwd()), | ||||||
|
||||||
| os.path.relpath(signed_fragment.name, start=os.getcwd()), | |
| os.path.abspath(signed_fragment.name), |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,46 @@ | ||||||
| # -------------------------------------------------------------------------------------------- | ||||||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||||||
| # Licensed under the MIT License. See License.txt in the project root for license information. | ||||||
| # -------------------------------------------------------------------------------------------- | ||||||
|
|
||||||
| import os | ||||||
| import subprocess | ||||||
| import tempfile | ||||||
| from typing import BinaryIO | ||||||
|
|
||||||
|
|
||||||
| def oras_push( | ||||||
| signed_fragment: BinaryIO, | ||||||
| manifest_tag: str, | ||||||
| ) -> None: | ||||||
| subprocess.run( | ||||||
| [ | ||||||
| "oras", | ||||||
| "push", | ||||||
| "--artifact-type", "application/x-ms-ccepolicy-frag", | ||||||
| manifest_tag, | ||||||
| os.path.relpath(signed_fragment.name, start=os.getcwd()), | ||||||
|
||||||
| os.path.relpath(signed_fragment.name, start=os.getcwd()), | |
| os.path.abspath(signed_fragment.name), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing required flag in help examples. The examples on lines 304 and 322 show piping acifragmentgen output to fragment push/attach commands, but the acifragmentgen command is missing the --out-signed-fragment flag that causes it to output the signed fragment to stdout. Without this flag, acifragmentgen will write files to disk and print text output instead of binary fragment data. Add --out-signed-fragment to these example commands.