You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add repo options to attest and artifact commands (#708)
* Move connecting to k8s cluster later in snapshot command
This means config is validated before connecting to cluster and allows us to run config validation tests without a k8s cluster being available.
* Add repo-id, repo-url and repo-provider options to attest artifact
* Infer repo provider from provided environment variables
* Ensure repository flag can be set and overrides the repoName
This applies to all attest commands
* Ensure GitRepoInfo is only sent if repoId and repoName are present
They might be inferred from environment variables or set directly in options
* Add repo options to begin trail command
* Add tests for new attest flags in each attest command
* Kosli API needs repo id, name AND url
Ensure that all 3 pieces of information are present before adding GitRepoInfo to API call
* Update docs for snyk attestation to include repo options
* Remove circleci as a repo provider. It does not provide git repos
* Add warning if repo information is not sent
Must have repo ID, URL and Name present to send repo info
* Only validate repo-url if it is explicitly provided.
Don't want to break CI flows if repoURL is inferred from CI environment variables
goldenRegex: "found 0 pull request\\(s\\) for commit: .*\nError: Artifact with fingerprint 1234e5bda0c762d2bac7f90d758b5b2263fa01ccbc542ab5e3df163be08e6ca9 does not exist in trail \"test-123\" of flow \"attest-azure-pr\" belonging to organization \"docs-cmd-test-user\"\nError: assert failed: no pull request found for the given commit: .*\n",
121
121
},
122
+
{
123
+
wantError: true,
124
+
name: "14 fails when --repo-url is not a valid URL",
0 commit comments