Skip to content

Commit 767cfdc

Browse files
committed
Update attestation docs to new cli commands
1 parent 0ea858a commit 767cfdc

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

docs/user/guides/_SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
* [Upload and Manage Content](upload.md)
44
* [Publish and Host Python Content](publish.md)
55
* [Vulnerability Report](vulnerability_report.md)
6+
* [Attestation Hosting](attestation.md)

docs/user/guides/attestation.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,12 @@ repositories. The provenance objects will be available through the Simple API an
1010
Attestations can be uploaded to Pulp with its package as a JSON list under the field `attestations`.
1111

1212
```bash
13-
att=$(jq '[.]' twine-6.2.0.tar.gz.publish.attestation)
14-
# multiple attestation files can be combined using --slurp and '.', jq --slurp '.' att1 att2 ...
15-
http POST $PULP_API/pulp/api/v3/content/python/packages/ \
16-
repository="$PYTHON_REPO_HREF" \
17-
relative_path=twine-6.2.0.tar.gz \
18-
artifact=$PACKAGE_ARTIFACT_PRN \
19-
attestations:="$att"
13+
pulp python content create \
14+
--relative-path twine-6.2.0.tar.gz \
15+
--file twine-6.2.0.tar.gz \
16+
--repository $REPO_PRN \
17+
--attestation @twine-6.2.0.tar.gz.publish.attestation
18+
# --attestation can be specified multiple times to attach many attestations with a package
2019
```
2120

2221
The uploaded attestations can be found in the created Provenance object attached to the content in
@@ -61,10 +60,11 @@ twine upload --repository-url $PULP_API/pypi/foo/simple/ --attestations dist/*
6160
Provenance content can be directly uploaded to Pulp through its content endpoint.
6261

6362
```bash
64-
http POST $PULP_API/pulp/api/v3/content/python/provenance/ --form \
65-
file@twine.provenance \
66-
package="$PACKAGE_PRN" \
67-
repository="$REPO_PRN"
63+
pulp python content -t provenance create \
64+
--file twine.provenance \
65+
--package $TWINE_PRN \
66+
--repository $REPO_PRN
67+
# you can also specify a package through its sha256
6868
```
6969

7070
Provenance objects are artifactless content, their data is stored in a json field and are unique by
@@ -75,7 +75,7 @@ one. Since provenance objects are content they can be added, removed, and synced
7575
To sync provenance objects from an upstream repository set the `provenance` field on the remote.
7676

7777
```bash
78-
http PATCH $PULP_API/$FOO_REMOTE_HREF provenance=true
78+
pulp python remote update --name foo --provenance
7979
pulp python repository sync --repository foo --remote foo
8080
```
8181

0 commit comments

Comments
 (0)