-
Notifications
You must be signed in to change notification settings - Fork 707
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
Generate SRP source provenance file in CI #5177
Conversation
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
✅ Deploy Preview for kubeapps-dev canceled.
|
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
sudo mv ./srp /usr/local/bin/ | ||
srp --version | ||
srp config --srp-endpoint << pipeline.parameters.SRP_ENDPOINT >> | ||
srp config auth --client-id $KUBEAPPS_SRP_CLIENT_ID --client-secret $KUBEAPPS_SRP_CLIENT_SECRET |
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.
Already set and properly stored in our corporate tool
srp config --srp-endpoint << pipeline.parameters.SRP_ENDPOINT >> | ||
srp config auth --client-id $KUBEAPPS_SRP_CLIENT_ID --client-secret $KUBEAPPS_SRP_CLIENT_SECRET | ||
# - run: | ||
# name: Install and configure the SRP observer tool |
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.
It isn't working yet, but the team is working on providing a public endpoint for it. I'll send another PR once we have it.
path: source-provenance.json | ||
# TODO(agamez): we will need to create the "network provenance" file soon. | ||
# - run: | ||
# name: Generate the "network provenance" file |
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.
We may have to ask for a reporter for Rust, I haven't been able to make it work. However, it is not a priority right now. The provenance file is enough.
- run: | ||
name: Validate and submit the provenance files to the SRP Metadata service | ||
command: | | ||
srp uid validate "uid.mtd.provenance_2_5.fragment(obj_uid=uid.obj.build.circleci(instance='circleci.com',type='<< pipeline.project.type >>',namespace='${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}',branch='${CIRCLE_BRANCH}',commit_id='${CIRCLE_SHA1}',build_id='<< pipeline.number >>/${CIRCLE_WORKFLOW_ID}/${CIRCLE_BUILD_NUM}'),revision='')" |
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.
If there is an upstream issue or the format for CircleCI happens to change, this will throw an error.
@@ -108,6 +108,12 @@ parameters: | |||
README_GENERATOR_REPO: | |||
type: "string" | |||
default: "bitnami-labs/readme-generator-for-helm" | |||
SRP_ENDPOINT: | |||
type: "string" | |||
default: "https://apigw.vmware.com/v1/s1/api/helix-beta" |
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.
Required for working outside the corporate network
Signed-off-by: Antonio Gamez Diaz <[email protected]>
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.
Great! Thanks for the effort.
One task for the future will be to move all the logic into a container, so that:
- CircleCI spec is simpler
- Migration to e.g. GitHub actions is easier
But we can consider this as something for the eventual migration to GitHub actions.
Description of the change
This PR is adding an additional step in the CI (after pushing the images) to report the provenance file to our corporate endpoint. This is solely an internal requirement, not affecting the rest of the components whatsoever.
Benefits
We will comply with the SRP checkpoint.
Possible drawbacks
N/A
Applicable issues
Additional information
It is not working as the UID must be registered in advance in our systems (which is an ongoing task pending validation), therefore, the PR is marked as a draft as the CI step is currently failing.
Remember to add the credentials to our system.