Using KaaS CLI
This guide will walk you through setting up your CI to upload and download proofs using the kaas-cli
tool.
Once set up in your CI pipeline, new proofs will be uploaded automatically with each build, and the latest set of proofs will be downloaded for use in your verification jobs.
First, make sure you have kaas-cli
installed. You can find instructions here: Installation.
Obtain your Vault ID and Token
To list your vaults you will run the following command:
The output will include your Vaults
, which will be the name
value. Your vault key
will be provided separately and it is important to keep that secure.
To obtain a token use Vault ID
from previous step
Set Environment Variables
Use the following command to set the environment variables in your CI system each time you run CLI (make sure you add your vault ID
and vault token
):
To persist environment variables run the export command:
SERVER_URL - is optional and used mainly for development.
After export
you can run:
Upload Proofs
To upload proofs in CI:
This will upload all files from the current directory to your KaaS vault.
Download Proofs
To download proofs in CI:
You can also specify a subdirectory to upload/download to/from using the --directory
or -d
flag. See the example below:
Specifying a subdirectory is optional.
Authentication
To verify authentication is working before uploading/downloading you can run the following command:
Confirm the message:
You are currently authenticated.
Tips:
Keep your
vault token
secure. Set it as a secret environment variable in your CI system.Run the upload/download commands from the directory containing your
./kout
folder.Check for non-zero exit codes in CI and fail the build if needed.
Reach out to the KaaS team if you have any issues with authentication or need assistance.
Last updated