Package: ortelius-cli
The Ortelius Command Line InterfaceThe Ortelius Command Line Interface supports integration with DevOps tools and CI/CD pipelines.The CLI Python script interacts with the Ortelius REST APIs to perform:Approve theApplication VersionMove the _Application Version- using the supplied taskCreate/replace theComponent Versionfor theApplication VersionAssign aComponent Versionto anApplication versionAssign the key/values pairs to theComponent versionCreate a bash file from theComponent.toml fileExport aDomainincluding all objects to stdoutImports the export file into the newDomainDeploy theApplication VersionUpload Swagger and SBOM files toComponent VersionCLI PrerequisitesInstall Python 3.8 or newerInstall Ortelius CLIpip install --upgrade ortelius-cliGet Started with a POCRefer to theOrtelius sample POCto get started. This POC provides you the steps to incorporate Ortelius into your Pipeline, with SBOM generation.Ortelius' CLI using the dhapi moduleArguments:ACTION - one of the followingdeploy- deploy theApplicationto theEnvironmentUsage:
--dhurl
--dhuser
--dhpass
--appname
--appversion (optional)
--deployenvapprove- approve theApplication VersionUsage:
--dhurl
--dhuser
--dhpass
--appname
--appversion (optional)move- move theApplication Versionusing the supplied task
Usage:
--dhurl
--dhuser
--dhpass
--appname
--appversion (optional)
--from_domain
--taskupdatecomp- create/replace theComponent Versionfor theApplication Versionwith SBOM (CycloneDX or SPDX formats).
Usage:
--dhurl
--dhuser
--dhpass
--rsp 
--autoappinc (optional)
--compautoinc (optional)
--consumes (optional)
--provides (optional)
--deppkg cyclonedx@ (optional)
--deppkg spdx@ (optional)Component TOML Definition for --rsp parameter# Application Name and Version to create an associate the Component Version to# NOTE: Only needed if you need to assoicate the Component Version to the Application VersionApplication=""# Name of the Applcation including the full Domain NameApplication_Version=""# The semantic version for the Application Version# Component Name, Variant and VersionName=""Variant="${GIT_BRANCH}"Version="v1.0.0.${BUILD_NUM}-g${GIT_COMMIT}"# 1.0.0 should be replace with your starting version string# Export the derived IMAGE_TAG, DOCKERREPO values to the CI/CD Tool via a shell script when using the `envscript` command line action[Export]IMAGE_TAG="${Variant}-${Version}"DOCKERREPO="${DockerRepo}"# Key/Values to associate to the Component Version.  Custom key/values can be added under this section.[Attributes]BuildId="${BUILDID}"# Identifier for the CI job (DERIVED IF NOT SPECIFIED)BuildNumber="${BUILD_NUM}"# Build number for the CI job (DERIVED IF NOT SPECIFIED)BuildUrl="${BUILD_URL}"# Build url for the CI job (DERIVED IF NOT SPECIFIED)Chart=""# Helm Chart for the ComponentChartNamespace=""# Name space for the Component to be deployed toChartRepo=""# Helm Chart Repo NameChartRepoUrl=""# Helm Chart Repo UrlChartVersion=""# Helm Chart versionCustomAction=""# Custom Action to assign to the ComponentDeployAlways=""# Set the Always Deploy option Y/N, default is NDockerBuildDate=""# Timestamp when the image was created (DERIVED IF NOT SPECIFIED)DockerRepo="${DOCKERREPO}"# Registry which the image was pushed toDockerSha="${DIGEST}"# Digest for the image (DERIVED IF NOT SPECIFIED)DockerTag="${DOCKERTAG}"# Tag for the imageGitBranch="${GIT_BRANCH}"# Git branch in the git repo (DERIVED IF NOT SPECIFIED)GitBranchCreateCommit="${GIT_BRANCH_CREATE_COMMIT}"# Git commit that the branch was created from (DERIVED IF NOT SPECIFIED)GitBranchCreateTimestamp="${GIT_BRANCH_CREATE_TIMESTAMP}"# Timestamp of when the branch was created (DERIVED IF NOT SPECIFIED)GitBranchParent="${GIT_BRANCH_PARENT}"# The parent branch for the current branch (DERIVED IF NOT SPECIFIED)GitCommit="${GIT_COMMIT}"# Git commit that triggered the CI job (DERIVED IF NOT SPECIFIED)GitCommitAuthors="${GIT_COMMIT_AUTHORS}"# List of committers for the repo (DERIVED IF NOT SPECIFIED)GitCommittersCnt="${GIT_COMMITTERS_CNT}"# Count of GitCommitAuthors (DERIVED IF NOT SPECIFIED)GitCommitTimestamp="${GIT_COMMIT_TIMESTAMP}"# Timestamp of the current commit (DERIVED IF NOT SPECIFIED)GitContribPercentage="${GIT_CONTRIB_PERCENTAGE}"# GitCommittersCnt / GitTotalCommittersCnt * 100 (DERIVED IF NOT SPECIFIED)GitLinesAdded="${GIT_LINES_ADDED}"# Lines added since the previous commit (DERIVED IF NOT SPECIFIED)GitLinesDeleted="${GIT_LINES_DELETED}"# Lines deleted since the previous commit (DERIVED IF NOT SPECIFIED)GitLinesTotal="${GIT_LINES_TOTAL}"# Total line count for the branch (DERIVED IF NOT SPECIFIED)GitOrg="${GIT_ORG}"# Orgranization for the repo (DERIVED IF NOT SPECIFIED)GitRepo="${GIT_REPO}"# Git repo that triggered the CI job (DERIVED IF NOT SPECIFIED)GitRepoProject="${GIT_REPO_PROJECT}"# Project name part of the repository url (DERIVED IF NOT SPECIFIED)GitTag="${GIT_TAG)"# Git tag in the git repo (DERIVED IF NOT SPECIFIED)GitTotalCommittersCnt="${GIT_TOTAL_COMMITTERS_CNT}"# Total committers working on this repoGitUrl="${GIT_URL}"# Full url to the git repo (DERIVED IF NOT SPECIFIED)License=""# License file location in the Git Repo (DERIVED IF NOT SPECIFIED)operator=""# Operator nameReadme=""# Readme file location in the Git Repo (DERIVED IF NOT SPECIFIED)ServiceOwner=""# Owner of the ServiceServiceOwnerEmail=""# Email for the Owner of the ServiceServiceOwnerPhone=""# Phone number for the Owner of the ServiceSwagger=""# Swagger/OpenApi file location in the Git Repo (DERIVED IF NOT SPECIFIED)assign- assigns aComponent Versionto anApplication VersionUsage:
--dhurl
--dhuser
--dhpass
--compname
--compvariant (optional)
--compversion (optional)
--appname
--appversion (optional)kv- assigns the key/values pairs to theComponent VersionUsage:
--dhurl
--dhuser
--dhpass
--compname
--compvariant (optional)
--compversion (optional)
--kvconfigenvscript- creates a bash file from theComponenttoml file
Usage:
--envvars
--envvars_shexport- exports aDomainincluding all objects to stdout
Usage:
--dhurl
--dhuser
--dhpass
--from_domimport- imports the export file into the newDomainUsage:
--dhurl
--dhuser
--dhpass
--from_dom
--to_domParameter UsageParameterDescriptionsappautoincApplicationAuto Increment VersionappnameApplicationNameappversionApplication VersioncertCustomer SSL Certificate FilechangerequestChange Request forComponent, use multiple time for each Change Request Idcluster_jsonjson from kubectl get deploy -n default -o jsoncompattrComponentattributes, use multiple time for each attrcompautoincComponentauto increment versioncompnameComponentNamecompvariantComponentVariantcompversionComponent Versionconsumesjson file that lists the endpoints theComponentconsumes.  [ {"verb", "get", "path": "/weather"}]crdatasourceChange Request Data Source for theComponentdeploydataThe json file that contains theApplication,Environmentand log detailsdeploydatasaveName of the json file to save the newComponentandApplication Versionsnames todeployenvDeploymentEnvironmentdeppkgFile name for the Safety, CycloneDx, SPDX json scan data, use multiple time for each file.  Parameter format is: @ where type=safety, cyclonedx, spdxdhpassOrtelius PassworddhurlOrtelius UrldhuserOrtleius Userdockerdocker Kind of theComponentitemenvsEnvironmentsto AssociateApplication Versionto, use multiple time for each envenvvars_shEnvironment Variables Output shell fileenvvarsComponentTOML filefilefile Kind of theComponentitemfrom_domainMove fromDomainfromdomFromDomainimportfileFile to ImportkvconfigDirectory containing the json and properties filelogdeploymentRecords a deployment by a external programmsbranchNew microservice branch being added to the clustermsnameNew microservice being added to the clusterprovidesjson file that lists theEndpointstheComponentprovides.  [ {"verb", "get", "path": "/checkout"}]rspResponse File for Parameters, ie component.tomltaskTask to use for movetodomToDomain