Documentation
¶
Index ¶
- Constants
- Variables
- func CastTo[T any](jenkinsParamInterface interface{}) (T, bool)
- func ConvertAllureReport(node Node) *harness.Step
- func ConvertAllureSteps(node Node) []*harness.Step
- func ConvertAnchore(node Node, variables map[string]string) *harness.Step
- func ConvertAnsibleAdhoc(node Node, arguments map[string]interface{}) *harness.Step
- func ConvertAnsiblePlaybook(node Node, arguments map[string]interface{}) *harness.Step
- func ConvertAnsibleVault(node Node, arguments map[string]interface{}) *harness.Step
- func ConvertArchive(node Node) []*harness.Step
- func ConvertArtifactUploadJfrog(node Node, variables map[string]string, timeout string) *harness.Step
- func ConvertBat(node Node, variables map[string]string, timeout string, dockerImage string) *harness.Step
- func ConvertCheckout(node Node, variables map[string]string) *harness.Step
- func ConvertClone(node Node) (*harness.CloneStage, *harness.Repository)
- func ConvertCobertura(node Node, variables map[string]string) *harness.Step
- func ConvertCucumber(node Node, parameterMap map[string]interface{}) *harness.Step
- func ConvertDeleteDir(node Node, variables map[string]string) *harness.Step
- func ConvertDir(node Node, variables map[string]string) (*harness.Step, bool)
- func ConvertDockerPushStep(node Node, variables map[string]string, timeout string) *harness.Step
- func ConvertEmailext(node Node, variables map[string]string, timeout string) *harness.Step
- func ConvertFileCopy(node Node, operation map[string]interface{}) *harness.Step
- func ConvertFileCreate(node Node, operation map[string]interface{}) *harness.Step
- func ConvertFileDelete(node Node, operation map[string]interface{}) *harness.Step
- func ConvertFileDownload(node Node, operation map[string]interface{}) *harness.Step
- func ConvertFileJoin(node Node, operation map[string]interface{}) *harness.Step
- func ConvertFileJson(node Node, operation map[string]interface{}) *harness.Step
- func ConvertFileRename(node Node, operation map[string]interface{}) *harness.Step
- func ConvertFileTranform(node Node, operation map[string]interface{}) *harness.Step
- func ConvertFileUntar(node Node, operation map[string]interface{}) *harness.Step
- func ConvertFileUnzip(node Node, operation map[string]interface{}) *harness.Step
- func ConvertFileZip(node Node, operation map[string]interface{}) *harness.Step
- func ConvertFindFiles(node Node) *harness.Step
- func ConvertFlywayRunner(node Node, variables map[string]string) *harness.Step
- func ConvertFolderCopy(node Node, operation map[string]interface{}) *harness.Step
- func ConvertFolderCreate(node Node, operation map[string]interface{}) *harness.Step
- func ConvertFolderDelete(node Node, operation map[string]interface{}) *harness.Step
- func ConvertFolderRename(node Node, operation map[string]interface{}) *harness.Step
- func ConvertGatling(node Node) *harness.Step
- func ConvertHttpRequest(node Node, variables map[string]string) *harness.Step
- func ConvertJacoco(node Node, variables map[string]string) *harness.Step
- func ConvertJavadoc(node Node, variables map[string]string) *harness.Step
- func ConvertJiraBuildInfo(node Node, variables map[string]string) *harness.Step
- func ConvertJiraDeploymentInfo(node Node, variables map[string]string) *harness.Step
- func ConvertJunit(node Node, variables map[string]string) *harness.Step
- func ConvertKubeCtl(node Node, paramMap map[string]interface{}) *harness.Step
- func ConvertMailer(node Node, arguments map[string]interface{}) *harness.Step
- func ConvertNexusArtifactUploader(node Node, variables map[string]string) *harness.Step
- func ConvertNodejs(node Node) *harness.Step
- func ConvertNotification(node Node, parameterMap map[string]interface{}) *harness.Step
- func ConvertNunit(node Node, arguments map[string]interface{}) *harness.Step
- func ConvertPagerDuty(node Node, arguments map[string]interface{}) *harness.Step
- func ConvertPagerDutyChangeEvent(node Node, arguments map[string]interface{}) *harness.Step
- func ConvertPowerShell(node Node, variables map[string]string, timeout string, dockerImage string) *harness.Step
- func ConvertPublishHtml(node Node, variables map[string]string) *harness.Step
- func ConvertPwsh(node Node, variables map[string]string, timeout string, dockerImage string) *harness.Step
- func ConvertReadCsv(node Node, variables map[string]string) *harness.Step
- func ConvertReadFile(node Node, variables map[string]string) *harness.Step
- func ConvertReadJson(node Node, variables map[string]string) *harness.Step
- func ConvertReadMavenPom(node Node) *harness.Step
- func ConvertReadYaml(node Node, variables map[string]string) *harness.Step
- func ConvertSHA1(node Node, variables map[string]string, dockerImage string) *harness.Step
- func ConvertSHA256(node Node, variables map[string]string, dockerImage string) *harness.Step
- func ConvertSh(node Node, variables map[string]string, timeout string, dockerImage string, ...) *harness.Step
- func ConvertSlackSend(node Node, variables map[string]string) *harness.Step
- func ConvertSlackUploadFile(node Node, variables map[string]string) *harness.Step
- func ConvertSlackUserIdFromEmail(node Node, variables map[string]string) *harness.Step
- func ConvertSlackUserIdsFromCommitters(node Node, variables map[string]string) *harness.Step
- func ConvertSleep(node Node, variables map[string]string) *harness.Step
- func ConvertSonarQualityGate(node Node) *harness.Step
- func ConvertSynopsysDetect(node Node, variables map[string]string) *harness.Step
- func ConvertTar(node Node, variables map[string]string) *harness.Step
- func ConvertTestng(node Node, parameterMap map[string]interface{}) *harness.Step
- func ConvertToStepUsingParameterMapDelegate(node *Node, variables map[string]string, ...) *harness.Step
- func ConvertToStepWithProperties(node *Node, variables map[string]string, ...) *harness.Step
- func ConvertUnarchive(node Node, paramMap map[string]interface{}) *harness.Step
- func ConvertUntar(node Node, variables map[string]string) *harness.Step
- func ConvertUnzip(node Node, variables map[string]string) *harness.Step
- func ConvertVerifySha1(node Node, variables map[string]string, dockerImage string) *harness.Step
- func ConvertVerifySha256(node Node, variables map[string]string, dockerImage string) *harness.Step
- func ConvertWithCredentials(node Node) map[string]string
- func ConvertWriteFile(node Node, variables map[string]string) *harness.Step
- func ConvertWriteJSON(node Node, variables map[string]string) *harness.Step
- func ConvertWriteYaml(node Node, variables map[string]string) *harness.Step
- func ConvertZip(node Node, variables map[string]string) *harness.Step
- func Converts3Archive(node Node, entryMap map[string]interface{}, index int) *harness.Step
- func Converts3Upload(node Node, entryMap map[string]interface{}, index int) *harness.Step
- func Converts3UploadStep(node Node) *harness.Step
- func ExtractEntries(node Node) []map[string]interface{}
- func FloatStringToFloat64Val(s string) (float64, bool)
- func GetArtifactsListString(node Node) (string, error)
- func GetCoberturaThreshold(attrKey string, attrMap map[string]interface{}) (interface{}, []string, error)
- func GetStepUsingParameterMapDelegate(node *Node, tmpJenkinsToDroneParamMapperList []JenkinsToDroneParamMapper, ...) *harness.Step
- func GetStepWithProperties(node *Node, tmpJenkinsToDroneParamMapperList []JenkinsToDroneParamMapper, ...) *harness.Step
- func HandleExtraVars(arguments map[string]interface{}) string
- func HandleForks(arguments map[string]interface{}) int
- func HeaderToStrCsv(node *Node, attrMap map[string]interface{}, jenkinsKey string) (interface{}, error)
- func MakeThresholdGetter(attrName string) ...
- func SafeAssignWithPropertiesTyped(node *Node, withProperties *map[string]interface{}, ...)
- func SanitizeForId(spanName string, spanId string) string
- func SanitizeForName(spanName string) string
- func SetCoberturaTool(node *Node, attrMap map[string]interface{}, jenkinsKey string) (interface{}, error)
- func SetJacocoTool(node *Node, attrMap map[string]interface{}, jenkinsKey string) (interface{}, error)
- func ToFloat64FromString(s string) (float64, error)
- func ToJsonStringFromMap[T any](m T) (string, error)
- func ToJsonStringFromStruct[T any](v T) (string, error)
- func ToMapFromJsonString[T any](jsonString string) (T, error)
- func ToStringArrayFromCsvString(csv string) ([]string, error)
- func ToStructFromJsonString[T any](jsonStr string) (T, error)
- type FileSpec
- type JenkinsToDroneParamMapper
- type Node
- type ParamTransform
- type PublishHtmlParameterMap
- type Spec
Constants ¶
const ( Float64Type = "float64" StringToFloat64Type = "stringToFloat64" StringType = "string" BoolType = "bool" InterfaceListType = "InterfaceList" DontCare = "DontCare" HarnessAttribute = "harness-attribute" )
const (
ArtifactUploaderImage = "plugins/nexus-publish:latest"
)
const (
CoberturaToolName = "cobertura"
)
const (
CoverageReportImage = "plugins/coverage-report"
)
const DroneS3UploadPublish = "harnesscommunity/drone-s3-upload-publish"
const (
FlywayRunnerPluginImage = "plugins/flyway"
)
const (
HttpRequestPluginImage = "plugins/httpRequest"
)
const (
Root_Id = "0000000000000000"
)
const (
SlackPluginImage = "plugins/slack"
)
Variables ¶
var CorberturaJenkinsToDroneParamMapperList = []JenkinsToDroneParamMapper{ {"coberturaReportFile", "reports_path_pattern", StringType, nil}, {"failUnstable", "fail_on_threshold", BoolType, nil}, {"failUnhealthy", "fail_on_threshold", BoolType, nil}, {"conditionalCoverageTargets", "threshold_branch", Float64Type, MakeThresholdGetter("conditionalCoverageTargets")}, {"classCoverageTargets", "threshold_class", Float64Type, MakeThresholdGetter("classCoverageTargets")}, {"fileCoverageTargets", "threshold_file", Float64Type, MakeThresholdGetter("fileCoverageTargets")}, {"packageCoverageTargets", "threshold_package", Float64Type, MakeThresholdGetter("packageCoverageTargets")}, {"lineCoverageTargets", "threshold_line", Float64Type, MakeThresholdGetter("lineCoverageTargets")}, {"methodCoverageTargets", "threshold_method", Float64Type, MakeThresholdGetter("methodCoverageTargets")}, {"tool", "tool", StringType, SetCoberturaTool}, }
var JacocoJenkinsToDroneParamMapperList = []JenkinsToDroneParamMapper{ {"changeBuildStatus", "fail_on_threshold", BoolType, nil}, {"classPattern", "class_directories", StringType, nil}, {"exclusionPattern", "class_exclusion_pattern", StringType, nil}, {"inclusionPattern", "class_inclusion_pattern", StringType, nil}, {"execPattern", "reports_path_pattern", StringType, nil}, {"skipCopyOfSrcFiles", "skip_source_copy", BoolType, nil}, {"sourcePattern", "source_directories", StringType, nil}, {"sourceExclusionPattern", "source_exclusion_pattern", StringType, nil}, {"sourceInclusionPattern", "source_inclusion_pattern", StringType, nil}, {"minimumBranchCoverage", "threshold_branch", StringToFloat64Type, nil}, {"minimumClassCoverage", "threshold_class", StringToFloat64Type, nil}, {"minimumComplexityCoverage", "threshold_complexity", StringToFloat64Type, nil}, {"minimumInstructionCoverage", "threshold_instruction", StringToFloat64Type, nil}, {"minimumLineCoverage", "threshold_line", StringToFloat64Type, nil}, {"minimumMethodCoverage", "threshold_method", StringToFloat64Type, nil}, {"tool", "tool", StringType, SetJacocoTool}, }
var JenkinsToDroneParamMapperList = []JenkinsToDroneParamMapper{ {"url", "url", StringType, nil}, {"httpMode", "http_method", StringType, nil}, {"validResponseCodes", "valid_response_codes", StringType, nil}, {"timeout", "timeout", Float64Type, nil}, {"validResponseContent", "valid_response_body", StringType, nil}, {"wrapAsMultipart", "wrap_as_multipart", BoolType, nil}, {"outputFile", "output_file", StringType, nil}, {"ignoreSslErrors", "ignore_ssl", BoolType, nil}, {"requestBody", "request_body", StringType, nil}, {"consoleLogResponseBody", "log_response", BoolType, nil}, {"quiet", "quiet", BoolType, nil}, {"contentType", "content_type", StringType, nil}, {"customHeaders", "headers", DontCare, HeaderToStrCsv}, {"authentication", "auth_basic", StringType, nil}, {"acceptType", "accept_type", StringType, nil}, {"uploadFile", "upload_file", StringType, nil}, {"multipartName", "multipart_name", StringType, nil}, }
var JenkinsToDroneSlackSendParamMapperList = []JenkinsToDroneParamMapper{ {"channel", "channel", StringType, nil}, {"tokenCredentialId", "access_token", StringType, nil}, {"username", "username", StringType, nil}, {"color", "color", StringType, nil}, {"message", "message", StringType, nil}, {"iconEmoji", "icon_emoji", StringType, nil}, {"notifyCommitters", "committers_slack_id", BoolType, nil}, }
var JenkinsToDroneSlackUploadParamMapperList = []JenkinsToDroneParamMapper{ {"filePath", "file_path", StringType, nil}, {"channel", "channel", StringType, nil}, {"credentialId", "access_token", StringType, nil}, {"initialComment", "initial_comment", StringType, nil}, {"failOnError", "fail_on_error", BoolType, nil}, }
var JenkinsToDroneSlackUserIdFromEmailParamMapperList = []JenkinsToDroneParamMapper{ {"email", "slack_user_email_id", StringType, nil}, }
var JenkinsToDroneSlackUserIdsFromCommittersParamMapperList = []JenkinsToDroneParamMapper{ {"email", "slack_user_email_id", StringType, nil}, }
var JenkinsToFlywayRunnerParamMapperList = []JenkinsToDroneParamMapper{ {"url", "url", StringType, nil}, {"commandLineArgs", "command_line_args", StringType, nil}, {"flywayCommand", "flyway_command", StringType, nil}, {"locations", "locations", StringType, nil}, {"commandLineArgs", "command_line_args", StringType, nil}, }
var JenkinsToNexusArtifactUploaderParamMapperList = []JenkinsToDroneParamMapper{ {"nexusVersion", "nexus_version", StringType, nil}, {"nexusUrl", "server_url", StringType, nil}, {"protocol", "protocol", StringType, nil}, {"groupId", "group_id", StringType, nil}, {"repository", "repository", StringType, nil}, }
Functions ¶
func ConvertAllureReport ¶
func ConvertAllureSteps ¶
ConvertAllureSteps combines both Allure report generation and S3 upload into one function
func ConvertAnsibleAdhoc ¶
ConvertAnsibleAdhoc creates a Harness step for Ansible Ad-Hoc plugin with dynamic parameters.
func ConvertAnsiblePlaybook ¶
ConvertAnsiblePlaybook creates a Harness step for Ansible Playbook plugin with conditional parameters.
func ConvertAnsibleVault ¶
ConvertAnsibleVault creates a Harness step for Ansible Vault plugin with dynamic parameters.
func ConvertArchive ¶
func ConvertBat ¶
func ConvertClone ¶
func ConvertClone(node Node) (*harness.CloneStage, *harness.Repository)
func ConvertCucumber ¶
ConvertCucumber creates a Harness step for the Cucumber plugin.
func ConvertDockerPushStep ¶
func ConvertEmailext ¶
func ConvertFileCopy ¶
createFileCopyStep creates a Harness step for file copy operations.
func ConvertFileCreate ¶
createFileCreateStep creates a Harness step for file Create operations.
func ConvertFileDelete ¶
createFileDeleteStep creates a Harness step for file Delete operations.
func ConvertFileDownload ¶
createFileDownloadStep creates a Harness step for file Download operations.
func ConvertFileJoin ¶
createFileJoinStep creates a Harness step for file Join operations.
func ConvertFileJson ¶
createFileJsonStep creates a Harness step for file file to json operations.
func ConvertFileRename ¶
createFileRenameStep creates a Harness step for file Rename operations.
func ConvertFileTranform ¶
ConvertFileTranform creates a Harness step for file transform operations.
func ConvertFileUntar ¶
ConvertFileUntar creates a Harness step for file untar operations.
func ConvertFileUnzip ¶
ConvertFileUnzip creates a Harness step for file unzip operations.
func ConvertFileZip ¶
ConvertFileZip creates a Harness step for file zip operations.
func ConvertFindFiles ¶
func ConvertFlywayRunner ¶
func ConvertFolderCopy ¶
ConvertFolderCopy creates a Harness step for Folder Copy operations.
func ConvertFolderCreate ¶
ConvertFolderCreate creates a Harness step for Folder Create operations.
func ConvertFolderDelete ¶
ConvertFolderDelete creates a Harness step for folder delete operations.
func ConvertFolderRename ¶
ConvertFolderRename creates a Harness step for folder rename operations.
func ConvertGatling ¶
ConvertGatling creates a Harness step for Gatling plugin.
func ConvertHttpRequest ¶
func ConvertJavadoc ¶
ConvertJavadoc converts a Jenkins Node to a Harness Step with the Javadoc plugin spec.
func ConvertJiraBuildInfo ¶
func ConvertKubeCtl ¶
ConvertNunit creates a Harness step for nunit plugin.
func ConvertMailer ¶
ConvertMailer creates a Harness step for nunit plugin.
func ConvertNodejs ¶
ConvertNodejs creates a Harness step for nunit plugin.
func ConvertNotification ¶
ConvertNotification creates a Harness step for Notification plugin.
func ConvertNunit ¶
ConvertNunit creates a Harness step for nunit plugin.
func ConvertPagerDuty ¶
ConvertPagerduty creates a Harness step for nunit plugin.
func ConvertPagerDutyChangeEvent ¶
ConvertPagerDutyChangeEvent creates a Harness step for nunit plugin.
func ConvertPowerShell ¶
func ConvertPublishHtml ¶
func ConvertPwsh ¶
func ConvertReadMavenPom ¶
func ConvertSHA1 ¶
func ConvertSHA256 ¶
func ConvertSlackUploadFile ¶
func ConvertSonarQualityGate ¶
ConvertSonarQualityGate creates a Harness step for nunit plugin.
func ConvertSynopsysDetect ¶
func ConvertTestng ¶
ConvertTestng creates a Harness step for TestNG plugin.
func ConvertUnarchive ¶
ConvertUnarchive creates a Harness step for plugin step to handle unarchiving.
func ConvertVerifySha1 ¶
func ConvertVerifySha256 ¶
func ConvertWithCredentials ¶
func Converts3Archive ¶
Converts3Archive creates a Harness plugin step for archiving files and uploading them to S3. It uses data from the provided node and entryMap to configure the step, and generates a unique ID for each step.
Parameters:
- node: The Node containing context for the step.
- entryMap: A map containing key-value pairs used to customize the step, such as excluded files.
- index: An incremental value used to ensure each step has a unique ID.
Returns:
- harness.Step representing the configured S3 archive plugin step.
func Converts3Upload ¶
Converts3Upload creates a Harness plugin step for uploading files to S3. It uses data from the provided node and entryMap to configure the step and generates a unique ID for each step.
Parameters:
- node: The Node containing context for the step.
- entryMap: A map containing key-value pairs used to customize the step.
- index: An incremental value used to ensure each step has a unique ID.
Returns:
- harness.Step representing the configured S3 upload plugin step.
func Converts3UploadStep ¶
func ExtractEntries ¶
func FloatStringToFloat64Val ¶
func GetArtifactsListString ¶
func GetCoberturaThreshold ¶
func GetStepUsingParameterMapDelegate ¶
func GetStepUsingParameterMapDelegate(node *Node, tmpJenkinsToDroneParamMapperList []JenkinsToDroneParamMapper, imageName string) *harness.Step
func GetStepWithProperties ¶
func GetStepWithProperties(node *Node, tmpJenkinsToDroneParamMapperList []JenkinsToDroneParamMapper, imageName string) *harness.Step
func HandleExtraVars ¶
HandleExtraVars converts extraVars into a comma-separated string of key-value pairs.
func HandleForks ¶
HandleForks converts the forks parameter into an integer.
func HeaderToStrCsv ¶
func MakeThresholdGetter ¶
func SanitizeForId ¶
func SanitizeForName ¶
func SetCoberturaTool ¶
func SetJacocoTool ¶
func ToFloat64FromString ¶
func ToJsonStringFromMap ¶
func ToJsonStringFromStruct ¶
func ToMapFromJsonString ¶
func ToStructFromJsonString ¶
Types ¶
type FileSpec ¶
func ParseHarnessAttribute ¶
type JenkinsToDroneParamMapper ¶
type JenkinsToDroneParamMapper struct { JenkinsParam string DroneParam string JenkinsParamType string TransformFunc ParamTransform }
type ParamTransform ¶
type PublishHtmlParameterMap ¶
Source Files
¶
- allure.go
- anchore.go
- ansible.go
- archive.go
- artifactUploadJfrog.go
- bat.go
- checkout.go
- cobertura.go
- convertStepUtil.go
- cucumber.go
- deletedir.go
- dockerPushStep.go
- emailExt.go
- fileOperations.go
- findFiles.go
- flywayRunner.go
- gatling.go
- git.go
- httpRequest.go
- jacoco.go
- javadoc.go
- jira.go
- junit.go
- kubeCtl.go
- mailer.go
- nexusArtifactUploader.go
- node.go
- nodejs.go
- notification.go
- nunit.go
- pager_duty.go
- powershell.go
- publishHTML.go
- pwsh.go
- readMavenPom.go
- readcsv.go
- readfile.go
- readjson.go
- readyaml.go
- s3upload.go
- sh.go
- sha1.go
- sha256.go
- slackSend.go
- slackUploadFile.go
- slackUserIdFromEmail.go
- slackUserIdsFromCommitters.go
- sleep.go
- sonarQualityGate.go
- synopsysDetect.go
- tar.go
- testng.go
- unarchive.go
- untar.go
- unzip.go
- util.go
- verifySha1.go
- verifySha256.go
- withCredentials.go
- writeJSON.go
- writeYaml.go
- writefile.go
- zip.go