Skip to content

Commit b9d6adb

Browse files
asraalaurentsimon
andauthored
docs: update release.md for generating verifier e2e tests (#1108)
* docs: update release.md for generating verifier e2e tests Signed-off-by: Asra Ali <[email protected]> * Update RELEASE.md Signed-off-by: Asra Ali <[email protected]> Co-authored-by: laurentsimon <[email protected]>
1 parent 628f3bb commit b9d6adb

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

RELEASE.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -207,15 +207,24 @@ End-to-end tests run daily in [github.com/slsa-framework/example-package/.github
207207

208208
## Update verifier
209209

210-
The next step is to update the verifier's e2e tests. For this, you need to:
210+
The next step is to update the verifier's GitHub Actions e2e tests. There are GitHub actions Go and generic actions.
211211

212-
1. Generate binaries and provenance for a project, using the [example-package](https://github.com/slsa-framework/example-package) builder. You will need to create provenance via a `workflow_dispatch` from this [workflow](https://github.com/slsa-framework/example-package/blob/main/.github/workflows/e2e.go.workflow_dispatch.main.config-noldflags.slsa3.yml) of the e2e test repository, and push a tag of the form vX and vX.Y to trigger this [workflow](https://github.com/slsa-framework/example-package/blob/main/.github/workflows/e2e.go.tag.main.config-ldflags-assets.major.slsa3.yml).
212+
<!-- TODO(https://github.com/slsa-framework/slsa-github-generator/issues/1110): Describe GHA generic container e2e tests. -->
213213

214-
1. Place the files in a new directory `slsa-framework/slsa-verifier/tree/main/testdata/$BUILDER_TAG`.
214+
For each of the GHA builders, you will need to:
215215

216-
1. Add the new release to the list defined in [slsa-framework/slsa-verifier/blob/main/main_test.go](https://github.com/slsa-framework/slsa-verifier/blob/main/main_test.go).
216+
1. Generate binaries and provenance in [example-package](https://github.com/slsa-framework/example-package) using the GHA action builder. These require using the updated builders, so validate that the workflows you use below are pinned at `$BUILDER_TAG`.
217217

218-
Send a pull request to merge the changes into the verifier's repository. The pre-submits will validate that the verifier is able to verify provenance from the `$BUILDER_TAG` builder.
218+
You will need the following trigger types:
219+
* A workflow dispatch event.
220+
* A tag of the form `vX.Y.Z`.
221+
* Tags of the form `vX` and `vX.Y`.
222+
223+
To do this, trigger the [Go workflow dispatch](https://github.com/slsa-framework/example-package/blob/main/.github/workflows/verifier-e2e.go.workflow_dispatch.main.all.slsa3.yml) and [Generic workflow dispatch](https://github.com/slsa-framework/example-package/blob/main/.github/workflows/verifier-e2e.generic.workflow_dispatch.main.all.slsa3.yml). These will dispatch the workflow and create provenance for the workflow dispatch event, and then trigger subsequent runs on fixed tags.
224+
225+
Download the uploaded artifacts of each of these, labelling the workflow dispatch artifacts by `binary-linux-amd64-workflow_dispatch(.intoto.jsonl)` and the tags by `binary-linux-amd64-push-v$TAG(.intoto.jsonl)`.
226+
227+
2. Move these files to `./cli/slsa-verifier/testdata/gha_$BUILDER_TYPE/$BUILDER_TAG/`. Send a pull request to merge the changes into the verifier's repository. The pre-submits will validate that the verifier is able to verify provenance from the `$BUILDER_TAG` builder.
219228

220229
## Finalize release
221230

0 commit comments

Comments
 (0)