CLI
The VDC CLI is a command-line tool designed to interact with the VDC API, enabling users to submit and download ingredients. While primarily intended for automation, it can also be used locally.
Installation
Windows
To install the VDC CLI on Windows, run the following command in PowerShell:
$ProgressPreference = "SilentlyContinue"; (Invoke-WebRequest -Uri 'https://af01p-fm.devtools.intel.com/artifactory/vdc-client-fm-local/vdc/cli/prod/win-x64/vdc.exe' -OutFile '.\vdc.exe') | Out-Null; .\vdc.exe install; rm .\vdc.exe
Linux
To install the VDC CLI on Linux, use the following command:
wget https://af01p-fm.devtools.intel.com/artifactory/vdc-client-fm-local/vdc/cli/prod/linux-x64/vdc && chmod +x vdc && sudo ./vdc install && rm vdc
After installation, the CLI binary is added to the PATH
system environment variable, allowing it to be used directly in a terminal by typing:
Authorization
Currently, authorization is supported only on Windows. Support for Linux is in progress.
Usage
To display help information, run the following command:
$ vdc --help
Description:
Validation DevOps Center CLI 1.0.0
Usage:
vdc [command] [options]
Options:
--verbose Enable CLI to print additional logs for debugging. [default: False]
--version Show version information
-?, -h, --help Show help and usage information
Commands:
download Downloads ingredient release.
submit Submits ingredient release.
install Installs the VDC Client.
update Updates the VDC Client.
Each command supports the --verbose
parameter. It makes the CLI print additional logs that may help with debugging.
Submission
To submit an ingredient and wait for it to complete, run:
$ vdc submit --project <PROJECT_NAME> --name <INGREDIENT_NAME> --wait --version <INGREDIENT_VERSION> --verbose --source <PATH_TO_ZIP_OR_BINARY> --metadata <PATH_TO_METADATA_JSON_FILE>
The metadata file should follow the format below:
{
"Description": "Initial release candidate",
"ReleaseBaseLine": {
"ProjectName": "12345",
"FeedName": "12345",
"Name": "12345",
"Version": "12345"
},
"ReleaseDate": "2023-10-01T12:00:00Z",
"Dependencies": [
{
"ProjectName": "ProjectA",
"FeedName": "FeedA",
"Name": "DependencyA",
"Version": "1.0.0"
},
{
"ProjectName": "ProjectB",
"FeedName": "FeedB",
"Name": "DependencyB",
"Version": "2.0.0"
}
],
"Milestones" : ["A", "B"]
}
You can skip the --wait
parameter. In this case, the CLI uploads the ingredient but does not wait for the processing result.
Download
To download an ingredient with a specific version, run:
To download the latest ingredient, skip the --version
parameter.
Update
The VDC API does not guarantee compatibility with older versions of the CLI, so it is important to use the latest version. To ensure you have the latest version installed, run:
The command checks if a newer version is available and replaces the installed VDC binary with the updated one if found.