Skip to content
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

ci(.github): publish slsa artifacts to cloudsmith #10215

Merged
merged 6 commits into from
May 23, 2024

Conversation

saisatishkarra
Copy link
Collaborator

@saisatishkarra saisatishkarra commented May 11, 2024

Summary

  • Source JIRA: https://konghq.atlassian.net/browse/SEC-1106
  • Downloads SLSA workflow run assets from various jobs in CI using glob pattern on file extensions
  • Upload the below cloudsmith packages in RAW package format:
  • SBOMs: <repo>-sbom - Aggregated ZIP file with all SBOMs for image artifacts and Source Code from which binary was built
  • Binary Provenance: <repo>-binary-provenance - ZIP file containing provenance for binary verification

Checklist prior to review

  • Link to relevant issue as well as docs and UI issues --
  • This will not break child repos: it doesn't hardcode values (.e.g "kumahq" as a image registry) and it will work on Windows, system specific functions like syscall.Mkfifo have equivalent implementation on the other OS --
  • Tests (Unit test, E2E tests, manual test on universal and k8s) --
    • Don't forget ci/ labels to run additional/fewer tests
  • Do you need to update UPGRADE.md? --
  • Does it need to be backported according to the backporting policy? (this GH action will add "backport" label based on these file globs, if you want to prevent it from adding the "backport" label use no-backport-autolabel label) --

@saisatishkarra saisatishkarra requested a review from a team as a code owner May 11, 2024 00:26
@saisatishkarra saisatishkarra requested review from michaelbeaumont, slonka and Automaat and removed request for a team May 11, 2024 00:26
@saisatishkarra saisatishkarra added ci/skip-test PR: Don't run unit and e2e tests (maybe this is just a doc change) ci/skip-e2e-test PR: Don't run e2e tests ci/force-publish PR: push artifacts even if we're on a PR (use very carefully) ci/run-full-matrix PR: Runs all possible e2e test combination (expensive use carefully) and removed ci/force-publish PR: push artifacts even if we're on a PR (use very carefully) labels May 11, 2024
@saisatishkarra saisatishkarra force-pushed the feat/slsa-cloudsmith-publishing branch 4 times, most recently from 3b1fd22 to e5c68bd Compare May 11, 2024 04:29
mk/docker.mk Outdated Show resolved Hide resolved
mk/docker.mk Outdated Show resolved Hide resolved
@saisatishkarra
Copy link
Collaborator Author

saisatishkarra commented May 13, 2024

@lahabana Currently i tried working with actions/download-artifact@v4 and gh run download {run_id} -p <pattern> doesn't support downloading artifacts in a same workflow uploaded by other jobs until the workflow is completed. This is due to an issue in the upstream anchore/sbom-action that uses an older actions/upload-artifact@{v1,v2,v3}. There is an open PR but not merged.

i am looking to use workflow_run(doesn't support to only run on specific filtered tags) event to trigger a separate downstream workflow to push to cloudsmith and download assets after the caller (build-test-distribute.yml) is complete. I will refactor the PR and address your other suggestions.

LMK your thoughts if you have a way to approach this to solve for running a separate workflow to download assets filtered for specific tags / branches.

@lahabana
Copy link
Contributor

lahabana commented May 17, 2024

i am looking to use workflow_run(actions/starter-workflows#1137) event to trigger a separate downstream workflow to push to cloudsmith and download assets after the caller (build-test-distribute.yml) is complete. I will refactor the PR and address your other suggestions.

Honestly I'm not super fan of workflow_run the event driven base of the execution just makes it hard to follow.
Calling it with workflow_call achieves the same (and it's what's done for other workflows in build-test-distribute or inline like it is here is fine too.

@saisatishkarra saisatishkarra force-pushed the feat/slsa-cloudsmith-publishing branch 4 times, most recently from a42f833 to 61b50ef Compare May 20, 2024 20:45
mk/distribution.mk Outdated Show resolved Hide resolved
@saisatishkarra saisatishkarra force-pushed the feat/slsa-cloudsmith-publishing branch from f2ad5bd to d9d44b8 Compare May 20, 2024 22:51
@saisatishkarra saisatishkarra force-pushed the feat/slsa-cloudsmith-publishing branch 2 times, most recently from afae823 to 1d7a871 Compare May 22, 2024 14:42
Signed-off-by: saisatishkarra <saisatish.karra@konghq.com>
Signed-off-by: saisatishkarra <saisatish.karra@konghq.com>
Signed-off-by: saisatishkarra <saisatish.karra@konghq.com>
@saisatishkarra saisatishkarra force-pushed the feat/slsa-cloudsmith-publishing branch from 1d7a871 to 8a844dc Compare May 22, 2024 14:43
Signed-off-by: saisatishkarra <saisatish.karra@konghq.com>
@saisatishkarra saisatishkarra force-pushed the feat/slsa-cloudsmith-publishing branch from 8a844dc to 4984a9c Compare May 22, 2024 14:45
@saisatishkarra
Copy link
Collaborator Author

Waiting on @curiositycasualty to merge release-script PR and update the new version in this PR ⤴️

Signed-off-by: saisatishkarra <saisatish.karra@konghq.com>
@saisatishkarra saisatishkarra force-pushed the feat/slsa-cloudsmith-publishing branch from f1bf04d to c41b4a5 Compare May 23, 2024 16:22
@saisatishkarra
Copy link
Collaborator Author

The PR is ready for review/merge with the updated release scripts that use the version passed by kuma / mesh. All review comments have been addressed.

@lahabana Looking for review/merge and port to KM and have a release tag until further review comments.

@lahabana lahabana merged commit cf9b78d into master May 23, 2024
18 checks passed
@lahabana lahabana deleted the feat/slsa-cloudsmith-publishing branch May 23, 2024 17:54
Copy link
Contributor

github-actions bot commented Jun 11, 2024

backporting to release-2.5 with action

backporting to release-2.4 with action
backporting to release-2.7 with action

kumahq bot pushed a commit that referenced this pull request Jun 11, 2024
Signed-off-by: saisatishkarra <saisatish.karra@konghq.com>
kumahq bot pushed a commit that referenced this pull request Jun 11, 2024
Signed-off-by: saisatishkarra <saisatish.karra@konghq.com>
kumahq bot pushed a commit that referenced this pull request Jun 11, 2024
Signed-off-by: saisatishkarra <saisatish.karra@konghq.com>
kumahq bot pushed a commit that referenced this pull request Jun 11, 2024
Signed-off-by: saisatishkarra <saisatish.karra@konghq.com>
kumahq bot pushed a commit that referenced this pull request Jun 11, 2024
Signed-off-by: saisatishkarra <saisatish.karra@konghq.com>
lahabana pushed a commit that referenced this pull request Jun 11, 2024
#10439)

* ci(.github): publish slsa artifacts to cloudsmith (#10215)

Signed-off-by: saisatishkarra <saisatish.karra@konghq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport ci/force-publish PR: push artifacts even if we're on a PR (use very carefully) ci/run-full-matrix PR: Runs all possible e2e test combination (expensive use carefully) ci/skip-e2e-test PR: Don't run e2e tests ci/skip-test PR: Don't run unit and e2e tests (maybe this is just a doc change)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants