You've already forked sap-jenkins-library
mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-09-16 09:26:22 +02:00
Add possible values and default (#5030)
This commit is contained in:
@@ -20,7 +20,7 @@ type abapEnvironmentCloneGitRepoOptions struct {
|
||||
Password string `json:"password,omitempty"`
|
||||
ByogUsername string `json:"byogUsername,omitempty"`
|
||||
ByogPassword string `json:"byogPassword,omitempty"`
|
||||
ByogAuthMethod string `json:"byogAuthMethod,omitempty"`
|
||||
ByogAuthMethod string `json:"byogAuthMethod,omitempty" validate:"possible-values=TOKEN BASIC"`
|
||||
Repositories string `json:"repositories,omitempty"`
|
||||
RepositoryName string `json:"repositoryName,omitempty"`
|
||||
BranchName string `json:"branchName,omitempty"`
|
||||
@@ -145,7 +145,7 @@ func addAbapEnvironmentCloneGitRepoFlags(cmd *cobra.Command, stepConfig *abapEnv
|
||||
cmd.Flags().StringVar(&stepConfig.Password, "password", os.Getenv("PIPER_password"), "Password for either the Cloud Foundry API or the Communication Arrangement for SAP_COM_0948")
|
||||
cmd.Flags().StringVar(&stepConfig.ByogUsername, "byogUsername", os.Getenv("PIPER_byogUsername"), "Username for bring your own git (BYOG) authentication")
|
||||
cmd.Flags().StringVar(&stepConfig.ByogPassword, "byogPassword", os.Getenv("PIPER_byogPassword"), "Password for bring your own git (BYOG) authentication")
|
||||
cmd.Flags().StringVar(&stepConfig.ByogAuthMethod, "byogAuthMethod", os.Getenv("PIPER_byogAuthMethod"), "Specifies which authentication method is used for bring your own git (BYOG) repositories")
|
||||
cmd.Flags().StringVar(&stepConfig.ByogAuthMethod, "byogAuthMethod", `TOKEN`, "Specifies which authentication method is used for bring your own git (BYOG) repositories")
|
||||
cmd.Flags().StringVar(&stepConfig.Repositories, "repositories", os.Getenv("PIPER_repositories"), "Specifies a YAML file containing the repositories configuration")
|
||||
cmd.Flags().StringVar(&stepConfig.RepositoryName, "repositoryName", os.Getenv("PIPER_repositoryName"), "Specifies a repository (Software Components) on the SAP BTP ABAP Environment system")
|
||||
cmd.Flags().StringVar(&stepConfig.BranchName, "branchName", os.Getenv("PIPER_branchName"), "Specifies a branch of a repository (Software Components) on the SAP BTP ABAP Environment system")
|
||||
@@ -245,7 +245,7 @@ func abapEnvironmentCloneGitRepoMetadata() config.StepData {
|
||||
Type: "string",
|
||||
Mandatory: false,
|
||||
Aliases: []config.Alias{},
|
||||
Default: os.Getenv("PIPER_byogAuthMethod"),
|
||||
Default: `TOKEN`,
|
||||
},
|
||||
{
|
||||
Name: "repositories",
|
||||
|
@@ -84,6 +84,10 @@ spec:
|
||||
- STAGES
|
||||
- STEPS
|
||||
- GENERAL
|
||||
possibleValues:
|
||||
- TOKEN
|
||||
- BASIC
|
||||
default: TOKEN
|
||||
- name: repositories
|
||||
type: string
|
||||
description: Specifies a YAML file containing the repositories configuration
|
||||
|
Reference in New Issue
Block a user