cmd

package
v1.359.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 133 Imported by: 2

Documentation

Index

Constants

View Source
const (
	StatusComplete   = "C"
	StatusError      = "E"
	StatusInProgress = "I"
	StatusScheduled  = "S"
	StatusAborted    = "X"
)
View Source
const NO_VERSION_SUFFIX = ""
View Source
const (
	PyBomFilename = "bom-pip.xml"
)

Variables

View Source
var ErrorGaugeInstall error = errors.New("error installing gauge")
View Source
var ErrorGaugeRun error = errors.New("error running gauge")
View Source
var ErrorGaugeRunnerInstall error = errors.New("error installing runner")
View Source
var GitCommit string

GitCommit ...

View Source
var GitTag string

GitTag ...

Functions

func AbapAddonAssemblyKitCheckCVsCommand added in v1.85.0

func AbapAddonAssemblyKitCheckCVsCommand() *cobra.Command

AbapAddonAssemblyKitCheckCVsCommand This step checks the validity of ABAP Software Component Versions.

func AbapAddonAssemblyKitCheckCommand added in v1.359.0

func AbapAddonAssemblyKitCheckCommand() *cobra.Command

AbapAddonAssemblyKitCheckCommand This step calls AAKaaS to check the validity of the Addon Product Modelling.

func AbapAddonAssemblyKitCheckPVCommand added in v1.85.0

func AbapAddonAssemblyKitCheckPVCommand() *cobra.Command

AbapAddonAssemblyKitCheckPVCommand This step checks the validity of a Addon Product Version.

func AbapAddonAssemblyKitCreateTargetVectorCommand added in v1.85.0

func AbapAddonAssemblyKitCreateTargetVectorCommand() *cobra.Command

AbapAddonAssemblyKitCreateTargetVectorCommand This step creates a Target Vector for software lifecycle operations

func AbapAddonAssemblyKitPublishTargetVectorCommand added in v1.85.0

func AbapAddonAssemblyKitPublishTargetVectorCommand() *cobra.Command

AbapAddonAssemblyKitPublishTargetVectorCommand This step triggers the publication of the Target Vector according to the specified scope.

func AbapAddonAssemblyKitRegisterPackagesCommand added in v1.85.0

func AbapAddonAssemblyKitRegisterPackagesCommand() *cobra.Command

AbapAddonAssemblyKitRegisterPackagesCommand This step uploads the SAR archives and creates physical Delivery Packages to AAKaaS.

func AbapAddonAssemblyKitReleasePackagesCommand added in v1.85.0

func AbapAddonAssemblyKitReleasePackagesCommand() *cobra.Command

AbapAddonAssemblyKitReleasePackagesCommand This step releases the physical Delivery Packages

func AbapAddonAssemblyKitReserveNextPackagesCommand added in v1.85.0

func AbapAddonAssemblyKitReserveNextPackagesCommand() *cobra.Command

AbapAddonAssemblyKitReserveNextPackagesCommand This step determines the ABAP delivery packages (name and type), which are needed to deliver Software Component Versions.

func AbapEnvironmentAssembleConfirmCommand added in v1.125.0

func AbapEnvironmentAssembleConfirmCommand() *cobra.Command

AbapEnvironmentAssembleConfirmCommand Confirm the Delivery of Assembly for installation, support package or patch in SAP BTP ABAP Environment system

func AbapEnvironmentAssemblePackagesCommand added in v1.77.0

func AbapEnvironmentAssemblePackagesCommand() *cobra.Command

AbapEnvironmentAssemblePackagesCommand Assembly of installation, support package or patch in SAP BTP ABAP Environment system

func AbapEnvironmentBuildCommand added in v1.184.0

func AbapEnvironmentBuildCommand() *cobra.Command

AbapEnvironmentBuildCommand Executes builds as defined with the build framework

func AbapEnvironmentCheckoutBranchCommand added in v1.65.0

func AbapEnvironmentCheckoutBranchCommand() *cobra.Command

AbapEnvironmentCheckoutBranchCommand Switches between branches of a git repository on a SAP BTP ABAP Environment system

func AbapEnvironmentCloneGitRepoCommand added in v1.74.0

func AbapEnvironmentCloneGitRepoCommand() *cobra.Command

AbapEnvironmentCloneGitRepoCommand Clones a git repository to a SAP BTP ABAP Environment system

func AbapEnvironmentCreateSystemCommand added in v1.103.0

func AbapEnvironmentCreateSystemCommand() *cobra.Command

AbapEnvironmentCreateSystemCommand Creates a SAP BTP ABAP Environment system (aka Steampunk system)

func AbapEnvironmentCreateTagCommand added in v1.223.0

func AbapEnvironmentCreateTagCommand() *cobra.Command

AbapEnvironmentCreateTagCommand Creates a tag for a git repository to a SAP BTP ABAP Environment system

func AbapEnvironmentPullGitRepoCommand added in v1.12.0

func AbapEnvironmentPullGitRepoCommand() *cobra.Command

AbapEnvironmentPullGitRepoCommand Pulls a git repository to a SAP BTP ABAP Environment system

func AbapEnvironmentPushATCSystemConfigCommand added in v1.195.0

func AbapEnvironmentPushATCSystemConfigCommand() *cobra.Command

AbapEnvironmentPushATCSystemConfigCommand Create/Update ATC System Configuration

func AbapEnvironmentRunATCCheckCommand added in v1.33.0

func AbapEnvironmentRunATCCheckCommand() *cobra.Command

AbapEnvironmentRunATCCheckCommand Runs an ATC Check

func AbapEnvironmentRunAUnitTestCommand added in v1.168.0

func AbapEnvironmentRunAUnitTestCommand() *cobra.Command

AbapEnvironmentRunAUnitTestCommand Runs an AUnit Test

func AbapLandscapePortalUpdateAddOnProductCommand added in v1.346.0

func AbapLandscapePortalUpdateAddOnProductCommand() *cobra.Command

AbapLandscapePortalUpdateAddOnProductCommand Update the AddOn product in SAP BTP ABAP Environment system of Landscape Portal

func AccessTokensFromEnvJSON added in v1.153.0

func AccessTokensFromEnvJSON(env string) []string

AccessTokensFromEnvJSON resolves access tokens when passed as JSON in an environment variable

func AnsSendEventCommand added in v1.227.0

func AnsSendEventCommand() *cobra.Command

AnsSendEventCommand Send Event to the SAP Alert Notification Service

func ApiKeyValueMapDownloadCommand added in v1.179.0

func ApiKeyValueMapDownloadCommand() *cobra.Command

ApiKeyValueMapDownloadCommand Download a specific Key Value Map from the API Portal

func ApiKeyValueMapUploadCommand added in v1.201.0

func ApiKeyValueMapUploadCommand() *cobra.Command

ApiKeyValueMapUploadCommand this steps creates an API key value map artifact in the API Portal

func ApiProviderDownloadCommand added in v1.202.0

func ApiProviderDownloadCommand() *cobra.Command

ApiProviderDownloadCommand Download a specific API Provider from the API Portal

func ApiProviderListCommand added in v1.232.0

func ApiProviderListCommand() *cobra.Command

ApiProviderListCommand Get a full List of all API providers from the API Portal

func ApiProviderUploadCommand added in v1.222.0

func ApiProviderUploadCommand() *cobra.Command

ApiProviderUploadCommand this steps creates an API provider artifact in the API Portal.

func ApiProxyDownloadCommand added in v1.177.0

func ApiProxyDownloadCommand() *cobra.Command

ApiProxyDownloadCommand Download a specific API Proxy from the API Portal

func ApiProxyListCommand added in v1.227.0

func ApiProxyListCommand() *cobra.Command

ApiProxyListCommand Get the List of an API Proxy from the API Portal

func ApiProxyUploadCommand added in v1.188.0

func ApiProxyUploadCommand() *cobra.Command

ApiProxyUploadCommand Upload an api proxy artifact in to the API Portal

func ArtifactPrepareVersionCommand added in v1.20.0

func ArtifactPrepareVersionCommand() *cobra.Command

ArtifactPrepareVersionCommand Prepares and potentially updates the artifact's version before building the artifact.

func AscAppUploadCommand added in v1.284.0

func AscAppUploadCommand() *cobra.Command

AscAppUploadCommand Upload an app to ASC

func Authenticate added in v1.287.0

func Authenticate(config checkmarxOneExecuteScanOptions, influx *checkmarxOneExecuteScanInflux) (checkmarxOneExecuteScanHelper, error)

func AwsS3UploadCommand added in v1.222.0

func AwsS3UploadCommand() *cobra.Command

AwsS3UploadCommand Uploads a specified file or directory into a given AWS S3 Bucket

func AzureBlobUploadCommand added in v1.226.0

func AzureBlobUploadCommand() *cobra.Command

AzureBlobUploadCommand Uploads a specified file or directory into a given Azure Blob Storage.

func BatsExecuteTestsCommand added in v1.139.0

func BatsExecuteTestsCommand() *cobra.Command

BatsExecuteTestsCommand This step executes tests using the [Bash Automated Testing System - bats-core](https://github.com/bats-core/bats-core).

func CheckStepActiveCommand added in v1.155.0

func CheckStepActiveCommand() *cobra.Command

CheckStepActiveCommand is the entry command for checking if a step is active in a defined stage

func CheckmarxExecuteScanCommand added in v1.11.0

func CheckmarxExecuteScanCommand() *cobra.Command

CheckmarxExecuteScanCommand Checkmarx is the recommended tool for security scans of JavaScript, iOS, Swift and Ruby code.

func CheckmarxOneExecuteScanCommand added in v1.287.0

func CheckmarxOneExecuteScanCommand() *cobra.Command

CheckmarxOneExecuteScanCommand checkmarxOne is the recommended tool for security scans of JavaScript, iOS, Swift and Ruby code.

func CloudFoundryCreateServiceCommand added in v1.74.0

func CloudFoundryCreateServiceCommand() *cobra.Command

CloudFoundryCreateServiceCommand Creates one or multiple Services in Cloud Foundry

func CloudFoundryCreateServiceKeyCommand added in v1.20.0

func CloudFoundryCreateServiceKeyCommand() *cobra.Command

CloudFoundryCreateServiceKeyCommand cloudFoundryCreateServiceKey

func CloudFoundryCreateSpaceCommand added in v1.86.0

func CloudFoundryCreateSpaceCommand() *cobra.Command

CloudFoundryCreateSpaceCommand Creates a user defined space in Cloud Foundry

func CloudFoundryDeleteServiceCommand added in v1.13.0

func CloudFoundryDeleteServiceCommand() *cobra.Command

CloudFoundryDeleteServiceCommand DeleteCloudFoundryService

func CloudFoundryDeleteSpaceCommand added in v1.86.0

func CloudFoundryDeleteSpaceCommand() *cobra.Command

CloudFoundryDeleteSpaceCommand Deletes a space in Cloud Foundry

func CloudFoundryDeployCommand added in v1.64.0

func CloudFoundryDeployCommand() *cobra.Command

CloudFoundryDeployCommand Deploys an application to Cloud Foundry

func CnbBuildCommand added in v1.162.0

func CnbBuildCommand() *cobra.Command

CnbBuildCommand Executes Cloud Native Buildpacks.

func CodeqlExecuteScanCommand added in v1.228.0

func CodeqlExecuteScanCommand() *cobra.Command

CodeqlExecuteScanCommand This step executes a codeql scan on the specified project to perform static code analysis and check the source code for security flaws.

func CommandLineCompletionCommand added in v1.83.0

func CommandLineCompletionCommand() *cobra.Command

CommandLineCompletionCommand allows to generate convenience scripts for using the piper cli in a shell. See https://github.com/spf13/cobra/blob/master/shell_completions.md for docs on the subject.

func ConfigCommand

func ConfigCommand() *cobra.Command

ConfigCommand is the entry command for loading the configuration of a pipeline step

func ContainerExecuteStructureTestsCommand added in v1.132.0

func ContainerExecuteStructureTestsCommand() *cobra.Command

ContainerExecuteStructureTestsCommand In this step [Container Structure Tests](https://github.com/GoogleContainerTools/container-structure-test) are executed.

func ContainerSaveImageCommand added in v1.34.0

func ContainerSaveImageCommand() *cobra.Command

ContainerSaveImageCommand Saves a container image as a tar file

func ContrastExecuteScanCommand added in v1.352.0

func ContrastExecuteScanCommand() *cobra.Command

ContrastExecuteScanCommand This step evaluates if the audit requirements for Contrast Assess have been fulfilled.

func CreateIntegrationArtifactTransportRequest added in v1.263.0

func CreateIntegrationArtifactTransportRequest(config *integrationArtifactTransportOptions, apistruct apim.Bundle) error

CreateIntegrationArtifactTransportRequest - Create a transport request for Integration Package

func CredentialdiggerScanCommand added in v1.282.0

func CredentialdiggerScanCommand() *cobra.Command

CredentialdiggerScanCommand Scan a repository on GitHub with Credential Digger

func DefaultsCommand added in v1.192.0

func DefaultsCommand() *cobra.Command

DefaultsCommand is the entry command for loading the configuration of a pipeline step

func DeleteIntegrationArtifactResource added in v1.160.0

func DeleteIntegrationArtifactResource(config *integrationArtifactResourceOptions, httpClient piperhttp.Sender, fileUtils piperutils.FileUtils, apiHost string) error

DeleteIntegrationArtifactResource - Delete integration artifact resource file

func DetectExecuteScanCommand added in v1.4.0

func DetectExecuteScanCommand() *cobra.Command

DetectExecuteScanCommand Executes Synopsys Detect scan

func Equal added in v1.195.0

func Equal(a, b string) bool

func Execute

func Execute()

Execute is the starting point of the piper command line tool

func FortifyExecuteScanCommand added in v1.38.0

func FortifyExecuteScanCommand() *cobra.Command

FortifyExecuteScanCommand This step executes a Fortify scan on the specified project to perform static code analysis and check the source code for security flaws.

func GaugeExecuteTestsCommand added in v1.146.0

func GaugeExecuteTestsCommand() *cobra.Command

GaugeExecuteTestsCommand Installs gauge and executes specified gauge tests.

func GctsCloneRepositoryCommand added in v1.46.0

func GctsCloneRepositoryCommand() *cobra.Command

GctsCloneRepositoryCommand Clones a Git repository

func GctsCreateRepositoryCommand added in v1.24.0

func GctsCreateRepositoryCommand() *cobra.Command

GctsCreateRepositoryCommand Creates a Git repository on an ABAP system

func GctsDeployCommand added in v1.35.0

func GctsDeployCommand() *cobra.Command

GctsDeployCommand Deploys a Git repository to a local repository and then to an ABAP system

func GctsExecuteABAPQualityChecksCommand added in v1.199.0

func GctsExecuteABAPQualityChecksCommand() *cobra.Command

GctsExecuteABAPQualityChecksCommand Runs ABAP unit tests and ATC (ABAP Test Cockpit) checks for a specified object scope.

func GctsExecuteABAPUnitTestsCommand added in v1.56.0

func GctsExecuteABAPUnitTestsCommand() *cobra.Command

GctsExecuteABAPUnitTestsCommand Runs ABAP unit tests and ATC (ABAP Test Cockpit) checks for a specified object scope.

func GctsRollbackCommand added in v1.60.0

func GctsRollbackCommand() *cobra.Command

GctsRollbackCommand Perfoms a rollback of one (default) or several commits

func GenerateConfig added in v1.313.0

func GenerateConfig(formatter func(interface{}) (string, error)) error

func GetAllStepMetadata added in v1.108.0

func GetAllStepMetadata() map[string]config.StepData

GetStepMetadata return a map with all the step metadata mapped to their stepName

func GetCPITransportReqPayload added in v1.263.0

func GetCPITransportReqPayload(config *integrationArtifactTransportOptions) (*bytes.Buffer, error)

GetJSONPayload -return http payload as byte array

func GetDockerImageValue added in v1.203.0

func GetDockerImageValue(stepName string) (string, error)

GetDockerImageValue provides Piper commands additional access to configuration of step execution image if required

func GetJSONPayload added in v1.160.0

func GetJSONPayload(config *integrationArtifactResourceOptions, mode string, fileUtils piperutils.FileUtils) (*bytes.Buffer, error)

GetJSONPayload -return http payload as byte array

func GetJSONPayloadAsByteArray added in v1.126.0

func GetJSONPayloadAsByteArray(config *integrationArtifactUploadOptions, mode string, fileUtils piperutils.FileUtils) (*bytes.Buffer, error)

GetJSONPayloadAsByteArray -return http payload as byte array

func GetResourceFileExtension added in v1.160.0

func GetResourceFileExtension(filename string) string

GetResourceFileExtension -return resource file extension

func GetStageConfig added in v1.203.0

func GetStageConfig() (config.StepConfig, error)

GetStageConfig provides Piper commands additional access to stage configuration if required. This allows steps to refer to configuration parameters which are not part of the step itself.

func GithubCheckBranchProtectionCommand added in v1.85.0

func GithubCheckBranchProtectionCommand() *cobra.Command

GithubCheckBranchProtectionCommand Check branch protection of a GitHub branch

func GithubCommentIssueCommand added in v1.116.0

func GithubCommentIssueCommand() *cobra.Command

GithubCommentIssueCommand Comment on GitHub issues and pull requests.

func GithubCreateIssueCommand added in v1.116.0

func GithubCreateIssueCommand() *cobra.Command

GithubCreateIssueCommand Create a new GitHub issue.

func GithubCreatePullRequestCommand added in v1.5.0

func GithubCreatePullRequestCommand() *cobra.Command

GithubCreatePullRequestCommand Create a pull request on GitHub

func GithubPublishReleaseCommand

func GithubPublishReleaseCommand() *cobra.Command

GithubPublishReleaseCommand Publish a release in GitHub

func GithubSetCommitStatusCommand added in v1.85.0

func GithubSetCommitStatusCommand() *cobra.Command

GithubSetCommitStatusCommand Set a status of a certain commit.

func GitopsUpdateDeploymentCommand added in v1.95.0

func GitopsUpdateDeploymentCommand() *cobra.Command

GitopsUpdateDeploymentCommand Updates Kubernetes Deployment Manifest in an Infrastructure Git Repository

func GolangBuildCommand added in v1.184.0

func GolangBuildCommand() *cobra.Command

GolangBuildCommand This step will execute a golang build.

func GradleExecuteBuildCommand added in v1.187.0

func GradleExecuteBuildCommand() *cobra.Command

GradleExecuteBuildCommand This step runs a gradle build command with parameters provided to the step.

func HadolintExecuteCommand added in v1.108.0

func HadolintExecuteCommand() *cobra.Command

HadolintExecuteCommand Executes the Haskell Dockerfile Linter which is a smarter Dockerfile linter that helps you build [best practice](https://docs.docker.com/develop/develop-images/dockerfile_best-practices/) Docker images.

func HandleHttpResponse added in v1.202.0

func HandleHttpResponse(resp *http.Response, err error, message string, connectionDetails abaputils.ConnectionDetailsHTTP) error

func HelmExecuteCommand added in v1.195.0

func HelmExecuteCommand() *cobra.Command

HelmExecuteCommand Executes helm3 functionality as the package manager for Kubernetes.

func HttpResponseHandler added in v1.160.0

func HttpResponseHandler(resp *http.Response, httpErr error, integrationArtifactResourceData *integrationArtifactResourceData) error

HttpResponseHandler - handle http response object

func ImagePushToRegistryCommand added in v1.326.0

func ImagePushToRegistryCommand() *cobra.Command

ImagePushToRegistryCommand Allows you to copy a Docker image from a source container registry to a destination container registry.

func InfluxWriteDataCommand added in v1.151.0

func InfluxWriteDataCommand() *cobra.Command

InfluxWriteDataCommand Writes metrics to influxdb

func IntegrationArtifactDeployCommand added in v1.121.0

func IntegrationArtifactDeployCommand() *cobra.Command

IntegrationArtifactDeployCommand Deploy a CPI integration flow

func IntegrationArtifactDownloadCommand added in v1.125.0

func IntegrationArtifactDownloadCommand() *cobra.Command

IntegrationArtifactDownloadCommand Download integration flow runtime artefact

func IntegrationArtifactGetMplStatusCommand added in v1.124.0

func IntegrationArtifactGetMplStatusCommand() *cobra.Command

IntegrationArtifactGetMplStatusCommand Get the MPL status of an integration flow

func IntegrationArtifactGetServiceEndpointCommand added in v1.124.0

func IntegrationArtifactGetServiceEndpointCommand() *cobra.Command

IntegrationArtifactGetServiceEndpointCommand Get an deployed CPI intgeration flow service endpoint

func IntegrationArtifactResourceCommand added in v1.160.0

func IntegrationArtifactResourceCommand() *cobra.Command

IntegrationArtifactResourceCommand Add, Delete or Update an resource file of integration flow designtime artifact

func IntegrationArtifactTransportCommand added in v1.263.0

func IntegrationArtifactTransportCommand() *cobra.Command

IntegrationArtifactTransportCommand Integration Package transport using the SAP Content Agent Service

func IntegrationArtifactTriggerIntegrationTestCommand added in v1.150.0

func IntegrationArtifactTriggerIntegrationTestCommand() *cobra.Command

IntegrationArtifactTriggerIntegrationTestCommand Test the service endpoint of your iFlow

func IntegrationArtifactUnDeployCommand added in v1.160.0

func IntegrationArtifactUnDeployCommand() *cobra.Command

IntegrationArtifactUnDeployCommand Undeploy a integration flow

func IntegrationArtifactUpdateConfigurationCommand added in v1.123.0

func IntegrationArtifactUpdateConfigurationCommand() *cobra.Command

IntegrationArtifactUpdateConfigurationCommand Update integration flow Configuration parameter

func IntegrationArtifactUploadCommand added in v1.126.0

func IntegrationArtifactUploadCommand() *cobra.Command

IntegrationArtifactUploadCommand Upload or Update an integration flow designtime artifact

func IsChangeInDevelopmentCommand added in v1.170.0

func IsChangeInDevelopmentCommand() *cobra.Command

IsChangeInDevelopmentCommand This step checks if a certain change is in status 'in development'

func JsonApplyPatchCommand added in v1.46.0

func JsonApplyPatchCommand() *cobra.Command

JsonApplyPatchCommand Patches a json with a patch file

func KanikoExecuteCommand added in v1.55.0

func KanikoExecuteCommand() *cobra.Command

KanikoExecuteCommand Executes a [Kaniko](https://github.com/GoogleContainerTools/kaniko) build for creating a Docker container.

func KarmaExecuteTestsCommand

func KarmaExecuteTestsCommand() *cobra.Command

KarmaExecuteTestsCommand Executes the Karma test runner

func KubernetesDeployCommand added in v1.10.0

func KubernetesDeployCommand() *cobra.Command

KubernetesDeployCommand Deployment to Kubernetes test or production namespace within the specified Kubernetes cluster.

func MalwareExecuteScanCommand added in v1.24.0

func MalwareExecuteScanCommand() *cobra.Command

MalwareExecuteScanCommand Performs a malware scan using the [SAP Malware Scanning Service](https://help.sap.com/viewer/b416237f818c4e2e827f6118640079f8/LATEST/en-US/b7c9b86fe724458086a502df3160f380.html).

func MavenBuildCommand added in v1.17.0

func MavenBuildCommand() *cobra.Command

MavenBuildCommand This step will install the maven project into the local maven repository.

func MavenExecuteCommand added in v1.15.0

func MavenExecuteCommand() *cobra.Command

MavenExecuteCommand This step allows to run maven commands

func MavenExecuteIntegrationCommand added in v1.62.0

func MavenExecuteIntegrationCommand() *cobra.Command

MavenExecuteIntegrationCommand This step will execute backend integration tests via the Jacoco Maven-plugin.

func MavenExecuteStaticCodeChecksCommand added in v1.17.0

func MavenExecuteStaticCodeChecksCommand() *cobra.Command

MavenExecuteStaticCodeChecksCommand Execute static code checks for Maven based projects. The plugins SpotBugs and PMD are used.

func MtaBuildCommand added in v1.15.0

func MtaBuildCommand() *cobra.Command

MtaBuildCommand Performs an mta build

func NewmanExecuteCommand added in v1.131.0

func NewmanExecuteCommand() *cobra.Command

NewmanExecuteCommand Installs newman and executes specified newman collections.

func NexusUploadCommand added in v1.18.0

func NexusUploadCommand() *cobra.Command

NexusUploadCommand Upload artifacts to Nexus Repository Manager

func NpmExecuteLintCommand added in v1.47.0

func NpmExecuteLintCommand() *cobra.Command

NpmExecuteLintCommand Execute ci-lint script on all npm packages in a project or execute default linting

func NpmExecuteScriptsCommand added in v1.24.0

func NpmExecuteScriptsCommand() *cobra.Command

NpmExecuteScriptsCommand Execute npm run scripts on all npm packages in a project

func PipelineCreateScanSummaryCommand added in v1.124.0

func PipelineCreateScanSummaryCommand() *cobra.Command

PipelineCreateScanSummaryCommand Collect scan result information anc create a summary report

func PrepareConfig

func PrepareConfig(cmd *cobra.Command, metadata *config.StepData, stepName string, options interface{}, openFile func(s string, t map[string]string) (io.ReadCloser, error)) error

PrepareConfig reads step configuration from various sources and merges it (defaults, config file, flags, ...)

func ProtecodeExecuteScanCommand added in v1.12.0

func ProtecodeExecuteScanCommand() *cobra.Command

ProtecodeExecuteScanCommand Black Duck Binary Analysis (BDBA), previously known as Protecode is an Open Source Vulnerability Scanner that is capable of scanning binaries. It can be used to scan docker images but is supports many other programming languages especially those of the C family.

func PutFile added in v1.222.0

PutFile uploads a file to an AWS S3 bucket The function needs a context (including the AWS Region) and a PutObjectInput for the service call The return value is a PutObjectOutput with the result of the upload

func PythonBuildCommand added in v1.210.0

func PythonBuildCommand() *cobra.Command

PythonBuildCommand Step builds a python project

func ReadPipelineEnv added in v1.147.0

func ReadPipelineEnv() *cobra.Command

ReadPipelineEnv reads the commonPipelineEnvironment from disk and outputs it as JSON

func ResolveAccessTokens added in v1.152.0

func ResolveAccessTokens(tokenList []string) map[string]string

ResolveAccessTokens reads a list of tokens in format host:token passed via command line and transfers this into a map as a more consumable format.

func SetConfigOptions added in v1.313.0

func SetConfigOptions(c ConfigCommandOptions)

func ShellExecuteCommand added in v1.180.0

func ShellExecuteCommand() *cobra.Command

ShellExecuteCommand Step executes defined script

func SonarExecuteScanCommand added in v1.19.0

func SonarExecuteScanCommand() *cobra.Command

SonarExecuteScanCommand Executes the Sonar scanner

func TerraformExecuteCommand added in v1.133.0

func TerraformExecuteCommand() *cobra.Command

TerraformExecuteCommand Executes Terraform

func TmsExportCommand added in v1.280.0

func TmsExportCommand() *cobra.Command

TmsExportCommand This step allows you to export an MTA file (multi-target application archive) and multiple MTA extension descriptors into a TMS (SAP Cloud Transport Management service) landscape for further TMS-controlled distribution through a TMS-configured landscape.

func TmsUploadCommand added in v1.242.0

func TmsUploadCommand() *cobra.Command

TmsUploadCommand This step allows you to upload an MTA file (multi-target application archive) and multiple MTA extension descriptors into a TMS (SAP Cloud Transport Management service) landscape for further TMS-controlled distribution through a TMS-configured landscape.

func TransportRequestDocIDFromGitCommand added in v1.144.0

func TransportRequestDocIDFromGitCommand() *cobra.Command

TransportRequestDocIDFromGitCommand Retrieves change document ID from Git repository

func TransportRequestReqIDFromGitCommand added in v1.144.0

func TransportRequestReqIDFromGitCommand() *cobra.Command

TransportRequestReqIDFromGitCommand Retrieves the transport request ID from Git repository

func TransportRequestUploadCTSCommand added in v1.119.0

func TransportRequestUploadCTSCommand() *cobra.Command

TransportRequestUploadCTSCommand This step uploads an UI5 application to the SAPUI5 ABAP repository.

func TransportRequestUploadRFCCommand added in v1.147.0

func TransportRequestUploadRFCCommand() *cobra.Command

TransportRequestUploadRFCCommand This step uploads a UI5 application as ZIP file to the ABAP system via RFC connections.

func TransportRequestUploadSOLMANCommand added in v1.126.0

func TransportRequestUploadSOLMANCommand() *cobra.Command

TransportRequestUploadSOLMANCommand Uploads a specified file into a given transport via Solution Manager

func UiVeri5ExecuteTestsCommand added in v1.122.0

func UiVeri5ExecuteTestsCommand() *cobra.Command

UiVeri5ExecuteTestsCommand Executes UI5 e2e tests using uiVeri5

func Unequal added in v1.195.0

func Unequal(a, b string) bool

func UpdateIntegrationArtifact added in v1.126.0

func UpdateIntegrationArtifact(config *integrationArtifactUploadOptions, httpClient piperhttp.Sender, fileUtils piperutils.FileUtils, apiHost string) error

UpdateIntegrationArtifact - Update existing integration artifact

func UpdateIntegrationArtifactResource added in v1.160.0

func UpdateIntegrationArtifactResource(config *integrationArtifactResourceOptions, httpClient piperhttp.Sender, fileUtils piperutils.FileUtils, apiHost string) error

UpdateIntegrationArtifactResource - Update integration artifact resource file

func UploadIntegrationArtifact added in v1.126.0

func UploadIntegrationArtifact(config *integrationArtifactUploadOptions, httpClient piperhttp.Sender, fileUtils piperutils.FileUtils, apiHost string) error

UploadIntegrationArtifact - Upload new integration artifact

func UploadIntegrationArtifactResource added in v1.160.0

func UploadIntegrationArtifactResource(config *integrationArtifactResourceOptions, httpClient piperhttp.Sender, fileUtils piperutils.FileUtils, apiHost string) error

UploadIntegrationArtifactResource - Upload new resource file to existing integration flow design time artefact

func VaultRotateSecretIdCommand added in v1.108.0

func VaultRotateSecretIdCommand() *cobra.Command

VaultRotateSecretIdCommand Rotate Vault AppRole Secret ID

func VersionCommand

func VersionCommand() *cobra.Command

VersionCommand Returns the version of the piper binary

func WhitesourceExecuteScanCommand added in v1.51.0

func WhitesourceExecuteScanCommand() *cobra.Command

WhitesourceExecuteScanCommand Execute a Mend (formerly known as WhiteSource) scan

func WritePipelineEnv added in v1.147.0

func WritePipelineEnv() *cobra.Command

WritePipelineEnv Serializes the commonPipelineEnvironment JSON to disk

func XsDeployCommand added in v1.3.0

func XsDeployCommand() *cobra.Command

XsDeployCommand Performs xs deployment

Types

type ATCConfiguration added in v1.190.0

type ATCConfiguration struct {
	CheckVariant  string              `json:"checkvariant,omitempty"`
	Configuration string              `json:"configuration,omitempty"`
	Objects       ATCObjects          `json:"atcobjects"`
	ObjectSet     abaputils.ObjectSet `json:"objectset,omitempty"`
}

ATCConfiguration object for parsing yaml config of software components and packages

type ATCError added in v1.33.0

type ATCError struct {
	Text     string `xml:",chardata"`
	Message  string `xml:"message,attr"`
	Source   string `xml:"source,attr"`
	Line     string `xml:"line,attr"`
	Severity string `xml:"severity,attr"`
}

ATCError with message

type ATCObjects added in v1.33.0

type ATCObjects struct {
	Package           []Package           `json:"package"`
	SoftwareComponent []SoftwareComponent `json:"softwarecomponent"`
}

ATCObjects in form of packages and software components to be checked

type AUnitConfig added in v1.168.0

type AUnitConfig struct {
	Title     string              `json:"title,omitempty"`
	Context   string              `json:"context,omitempty"`
	Options   AUnitOptions        `json:"options,omitempty"`
	ObjectSet abaputils.ObjectSet `json:"objectset,omitempty"`
}

AUnitConfig object for parsing yaml config of software components and packages

type AUnitLink struct {
	Href string `xml:"href,attr"`
	Rel  string `xml:"rel,attr"`
	Type string `xml:"type,attr"`
}

AUnitLink containing result locations

type AUnitOptions added in v1.168.0

type AUnitOptions struct {
	Measurements string    `json:"measurements,omitempty"`
	Scope        Scope     `json:"scope,omitempty"`
	RiskLevel    RiskLevel `json:"risklevel,omitempty"`
	Duration     Duration  `json:"duration,omitempty"`
}

AUnitOptions in form of packages and software components to be checked

type AUnitResult added in v1.168.0

type AUnitResult struct {
	XMLName    xml.Name `xml:"testsuites"`
	Title      string   `xml:"title,attr"`
	System     string   `xml:"system,attr"`
	Client     string   `xml:"client,attr"`
	ExecutedBy string   `xml:"executedBy,attr"`
	Time       string   `xml:"time,attr"`
	Timestamp  string   `xml:"timestamp,attr"`
	Failures   string   `xml:"failures,attr"`
	Errors     string   `xml:"errors,attr"`
	Skipped    string   `xml:"skipped,attr"`
	Asserts    string   `xml:"asserts,attr"`
	Tests      string   `xml:"tests,attr"`
	Testsuite  struct {
		Tests     string `xml:"tests,attr"`
		Asserts   string `xml:"asserts,attr"`
		Skipped   string `xml:"skipped,attr"`
		Errors    string `xml:"errors,attr"`
		Failures  string `xml:"failures,attr"`
		Timestamp string `xml:"timestamp,attr"`
		Time      string `xml:"time,attr"`
		Hostname  string `xml:"hostname,attr"`
		Package   string `xml:"package,attr"`
		Name      string `xml:"name,attr"`
		Testcase  []struct {
			Asserts   string `xml:"asserts,attr"`
			Time      string `xml:"time,attr"`
			Name      string `xml:"name,attr"`
			Classname string `xml:"classname,attr"`
			Error     []struct {
				Text    string `xml:",chardata"`
				Type    string `xml:"type,attr"`
				Message string `xml:"message,attr"`
			} `xml:"error"`
			Failure []struct {
				Text    string `xml:",chardata"`
				Type    string `xml:"type,attr"`
				Message string `xml:"message,attr"`
			} `xml:"failure"`
			Skipped []struct {
				Text    string `xml:",chardata"`
				Message string `xml:"message,attr"`
			} `xml:"skipped"`
		} `xml:"testcase"`
	} `xml:"testsuite"`
}

type AUnitRun added in v1.168.0

type AUnitRun struct {
	XMLName    xml.Name   `xml:"run"`
	Title      string     `xml:"title,attr"`
	Context    string     `xml:"context,attr"`
	Progress   Progress   `xml:"progress"`
	ExecutedBy ExecutedBy `xml:"executedBy"`
	Time       Time       `xml:"time"`
	Link       AUnitLink  `xml:"link"`
}

AUnitRun Object for parsing XML

type AbapError added in v1.202.0

type AbapError struct {
	Code    string           `json:"code"`
	Message AbapErrorMessage `json:"message"`
}

AbapError contains the error code and the error message for ABAP errors

type AbapErrorMessage added in v1.202.0

type AbapErrorMessage struct {
	Lang  string `json:"lang"`
	Value string `json:"value"`
}

AbapErrorMessage contains the lanuage and value fields for ABAP errors

type Action added in v1.3.0

type Action int

Action ...

const (
	//None ...
	None Action = iota
	//Resume ...
	Resume Action = iota
	//Abort ...
	Abort Action = iota
	//Retry ...
	Retry Action = iota
)

func ValueOfAction added in v1.3.0

func ValueOfAction(str string) (Action, error)

ValueOfAction ...

func (Action) GetAction added in v1.3.0

func (a Action) GetAction() (string, error)

GetAction ...

func (Action) String added in v1.3.0

func (a Action) String() string

String ...

type Artifact added in v1.250.0

type Artifact struct {
	Name string `json:"name,omitempty"`
}

type Component added in v1.258.0

type Component struct {
	Module string `json:"module,omitempty"`
}

type ConfigCommandOptions added in v1.313.0

type ConfigCommandOptions struct {
	Output                        string // output format, so far only JSON, YAML
	OutputFile                    string // if set: path to file where the output should be written to
	ParametersJSON                string // parameters to be considered in JSON format
	StageConfig                   bool
	StageConfigAcceptedParameters []string
	StepMetadata                  string // metadata to be considered, can be filePath or ENV containing JSON in format 'ENV:MY_ENV_VAR'
	StepName                      string
	ContextConfig                 bool
	OpenFile                      func(s string, t map[string]string) (io.ReadCloser, error)
}

type DeployMode added in v1.3.0

type DeployMode int

DeployMode ...

const (
	// NoDeploy ...
	NoDeploy DeployMode = iota
	//Deploy ...
	Deploy DeployMode = iota
	//BGDeploy ...
	BGDeploy DeployMode = iota
)

func ValueOfMode added in v1.3.0

func ValueOfMode(str string) (DeployMode, error)

ValueOfMode ...

func (DeployMode) GetDeployCommand added in v1.3.0

func (m DeployMode) GetDeployCommand() (string, error)

GetDeployCommand ...

func (DeployMode) String added in v1.3.0

func (m DeployMode) String() string

String ...

type Duration added in v1.168.0

type Duration struct {
	Short  *bool `json:"short,omitempty"`
	Medium *bool `json:"medium,omitempty"`
	Long   *bool `json:"long,omitempty"`
}

Duration in form of packages and software components to be checked

type Element added in v1.250.0

type Element struct {
	Name      string     `json:"name,omitempty"`
	Artifacts []Artifact `json:"files,omitempty"`
}

type ExecutedBy added in v1.168.0

type ExecutedBy struct {
	User string `xml:"user,attr"`
}

ExecutedBy User

type File added in v1.33.0

type File struct {
	Key       string     `xml:"name,attr"`
	Value     string     `xml:",chardata"`
	ATCErrors []ATCError `xml:"error"`
}

File that contains ATC check with error for checked file

type Filepath added in v1.258.0

type Filepath interface {
	WalkDir(root string, fn fs.WalkDirFunc) error
}

type GeneralConfigOptions

type GeneralConfigOptions struct {
	GitHubAccessTokens   map[string]string // map of tokens with url as key in order to maintain url-specific tokens
	CorrelationID        string
	CustomConfig         string
	GitHubTokens         []string // list of entries in form of <server>:<token> to allow token authentication for downloading config / defaults
	DefaultConfig        []string //ordered list of Piper default configurations. Can be filePath or ENV containing JSON in format 'ENV:MY_ENV_VAR'
	IgnoreCustomDefaults bool
	ParametersJSON       string
	EnvRootPath          string
	NoTelemetry          bool
	StageName            string
	StepConfigJSON       string
	StepMetadata         string //metadata to be considered, can be filePath or ENV containing JSON in format 'ENV:MY_ENV_VAR'
	StepName             string
	Verbose              bool
	LogFormat            string
	VaultRoleID          string
	VaultRoleSecretID    string
	VaultToken           string
	VaultServerURL       string
	VaultNamespace       string
	VaultPath            string
	HookConfig           HookConfiguration
	MetaDataResolver     func() map[string]config.StepData
	GCPJsonKeyFilePath   string
	GCSFolderPath        string
	GCSBucketId          string
	GCSSubFolder         string
}

GeneralConfigOptions contains all global configuration options for piper binary

var GeneralConfig GeneralConfigOptions

GeneralConfig contains global configuration flags for piper binary

type GithubRepoClient added in v1.214.0

type GithubRepoClient interface {
	CreateRelease(ctx context.Context, owner string, repo string, release *github.RepositoryRelease) (*github.RepositoryRelease, *github.Response, error)
	DeleteReleaseAsset(ctx context.Context, owner string, repo string, id int64) (*github.Response, error)
	GetLatestRelease(ctx context.Context, owner string, repo string) (*github.RepositoryRelease, *github.Response, error)
	ListReleaseAssets(ctx context.Context, owner string, repo string, id int64, opt *github.ListOptions) ([]*github.ReleaseAsset, *github.Response, error)
	UploadReleaseAsset(ctx context.Context, owner string, repo string, id int64, opt *github.UploadOptions, file *os.File) (*github.ReleaseAsset, *github.Response, error)
}

mock generated with: mockery --name GithubRepoClient --dir cmd --output cmd/mocks

type HadolintClient added in v1.108.0

type HadolintClient interface {
	SetOptions(options piperhttp.ClientOptions)
	DownloadFile(url, filename string, header http.Header, cookies []*http.Cookie) error
}

HadolintClient abstracts http.Client mock generated with: mockery --name hadolintClient --dir cmd --output pkg/hadolint/mocks

type HadolintPiperFileUtils added in v1.108.0

type HadolintPiperFileUtils interface {
	FileExists(filename string) (bool, error)
	FileWrite(filename string, data []byte, perm os.FileMode) error
	WriteFile(filename string, data []byte, perm os.FileMode) error
}

HadolintPiperFileUtils abstracts piperutils.Files mock generated with: mockery --name HadolintPiperFileUtils --dir cmd --output pkg/hadolint/mocks

type HookConfiguration added in v1.28.0

type HookConfiguration struct {
	SentryConfig SentryConfiguration `json:"sentry,omitempty"`
	SplunkConfig SplunkConfiguration `json:"splunk,omitempty"`
	PendoConfig  PendoConfiguration  `json:"pendo,omitempty"`
}

HookConfiguration contains the configuration for supported hooks, so far Sentry and Splunk are supported.

type Link struct {
	Key   string `xml:"href,attr"`
	Value string `xml:",chardata"`
}

Link of XML object

type MTABuildTarget added in v1.15.0

type MTABuildTarget int

MTABuildTarget ...

const (
	// NEO ...
	NEO MTABuildTarget = iota
	// CF ...
	CF MTABuildTarget = iota
	//XSA ...
	XSA MTABuildTarget = iota
)

func ValueOfBuildTarget added in v1.15.0

func ValueOfBuildTarget(str string) (MTABuildTarget, error)

ValueOfBuildTarget ...

func (MTABuildTarget) String added in v1.15.0

func (m MTABuildTarget) String() string

String ...

type OperatorCallback added in v1.195.0

type OperatorCallback map[string]func(string, string) bool

type Package added in v1.33.0

type Package struct {
	Name               string `json:"name"`
	IncludeSubpackages bool   `json:"includesubpackage"`
}

Package for ATC run to be checked

type PendoConfiguration added in v1.344.0

type PendoConfiguration struct {
	Token string `json:"token,omitempty"`
}

type Progress added in v1.168.0

type Progress struct {
	Status     string `xml:"status,attr"`
	Percentage string `xml:"percentage,attr"`
}

Progress of AUnit run

type PublishedArtifacts added in v1.250.0

type PublishedArtifacts struct {
	Info     Component `json:"component,omitempty"`
	Elements []Element `json:"variants,omitempty"`
}

PublishedArtifacts contains information about published artifacts

type Result added in v1.33.0

type Result struct {
	XMLName xml.Name `xml:"checkstyle"`
	Files   []File   `xml:"file"`
}

Result from ATC check for all files that were checked

type RiskLevel added in v1.168.0

type RiskLevel struct {
	Harmless  *bool `json:"harmless,omitempty"`
	Dangerous *bool `json:"dangerous,omitempty"`
	Critical  *bool `json:"critical,omitempty"`
}

RiskLevel in form of packages and software components to be checked

type Run added in v1.33.0

type Run struct {
	XMLName xml.Name `xml:"run"`
	Status  string   `xml:"status,attr"`
	Link    []Link   `xml:"link"`
}

Run Object for parsing XML

type S3PutObjectAPI added in v1.222.0

type S3PutObjectAPI interface {
	PutObject(ctx context.Context,
		params *s3.PutObjectInput,
		optFns ...func(*s3.Options)) (*s3.PutObjectOutput, error)
}

S3PutObjectAPI defines the interface for the PutObject function. We use this interface to test the function using a mocked service.

type ScanOptions added in v1.51.0

type ScanOptions = whitesourceExecuteScanOptions

ScanOptions is just used to make the lines less long

type Scope added in v1.168.0

type Scope struct {
	OwnTests     *bool `json:"owntests,omitempty"`
	ForeignTests *bool `json:"foreigntests,omitempty"`
}

Scope in form of packages and software components to be checked

type SentryConfiguration added in v1.28.0

type SentryConfiguration struct {
	Dsn string `json:"dsn,omitempty"`
}

SentryConfiguration defines the configuration options for the Sentry logging system

type Service added in v1.103.0

type Service struct {
	Name       string `json:"name"`
	Broker     string `json:"broker"`
	Plan       string `json:"plan"`
	Parameters string `json:"parameters,omitempty"`
}

Service struct for creating a cloud foundry service

type SoftwareComponent added in v1.33.0

type SoftwareComponent struct {
	Name string `json:"name"`
}

SoftwareComponent for ATC run to be checked

type SplunkConfiguration added in v1.142.0

type SplunkConfiguration struct {
	Dsn               string `json:"dsn,omitempty"`
	Token             string `json:"token,omitempty"`
	Index             string `json:"index,omitempty"`
	SendLogs          bool   `json:"sendLogs"`
	ProdCriblEndpoint string `json:"prodCriblEndpoint,omitempty"`
	ProdCriblToken    string `json:"prodCriblToken,omitempty"`
	ProdCriblIndex    string `json:"prodCriblIndex,omitempty"`
}

SplunkConfiguration defines the configuration options for the Splunk logging system

type Time added in v1.168.0

type Time struct {
	Started string `xml:"started,attr"`
	Ended   string `xml:"ended,attr"`
}

Time run was started and finished

type UploadAction added in v1.121.0

type UploadAction interface {
	Perform(command.ShellRunner) error
	WithConnection(cts.Connection)
	WithApplication(cts.Application)
	WithNodeProperties(cts.Node)
	WithTransportRequestID(string)
	WithConfigFile(string)
	WithDeployUser(string)
}

UploadAction ...

type WalkDir added in v1.258.0

type WalkDir func(root string, fn fs.WalkDirFunc) error

type WalkDirFunc added in v1.258.0

type WalkDirFunc func(root string, fn fs.WalkDirFunc) error

func (WalkDirFunc) WalkDir added in v1.258.0

func (f WalkDirFunc) WalkDir(root string, fn fs.WalkDirFunc) error

Source Files

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL