1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-07-15 01:34:38 +02:00

Revert "fix(golangBuild): keep track of the artifactversion in binary names (#3498)" (#3499)

This reverts commit ec783b0da6.
This commit is contained in:
Oliver Nocon
2022-02-03 11:23:34 +01:00
committed by GitHub
parent 3f3f24cde6
commit 42b9c2ce48
4 changed files with 7 additions and 54 deletions

View File

@ -37,7 +37,6 @@ type golangBuildOptions struct {
TestResultFormat string `json:"testResultFormat,omitempty" validate:"possible-values=junit standard"`
PrivateModules string `json:"privateModules,omitempty"`
PrivateModulesGitToken string `json:"privateModulesGitToken,omitempty"`
ArtifactVersion string `json:"artifactVersion,omitempty"`
}
// GolangBuildCommand This step will execute a golang build.
@ -158,7 +157,6 @@ func addGolangBuildFlags(cmd *cobra.Command, stepConfig *golangBuildOptions) {
cmd.Flags().StringVar(&stepConfig.TestResultFormat, "testResultFormat", `junit`, "Defines the output format of the test results.")
cmd.Flags().StringVar(&stepConfig.PrivateModules, "privateModules", os.Getenv("PIPER_privateModules"), "Tells go which modules shall be considered to be private (by setting [GOPRIVATE](https://pkg.go.dev/cmd/go#hdr-Configuration_for_downloading_non_public_code)).")
cmd.Flags().StringVar(&stepConfig.PrivateModulesGitToken, "privateModulesGitToken", os.Getenv("PIPER_privateModulesGitToken"), "GitHub personal access token as per https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line.")
cmd.Flags().StringVar(&stepConfig.ArtifactVersion, "artifactVersion", os.Getenv("PIPER_artifactVersion"), "Version of the artifact to be built.")
cmd.MarkFlagRequired("targetArchitectures")
}
@ -392,20 +390,6 @@ func golangBuildMetadata() config.StepData {
Aliases: []config.Alias{},
Default: os.Getenv("PIPER_privateModulesGitToken"),
},
{
Name: "artifactVersion",
ResourceRef: []config.ResourceReference{
{
Name: "commonPipelineEnvironment",
Param: "artifactVersion",
},
},
Scope: []string{"GENERAL", "PARAMETERS", "STAGES", "STEPS"},
Type: "string",
Mandatory: false,
Aliases: []config.Alias{},
Default: os.Getenv("PIPER_artifactVersion"),
},
},
},
Containers: []config.Container{