1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-01-20 05:19:40 +02:00

added missing git credentials handling

Co-authored-by: Gareth Evans <g.evans@sap.com>
This commit is contained in:
Pavel Busko 2022-04-19 12:59:59 +02:00 committed by Pavel Busko
parent 4b6c6e423c
commit 2740f00134
3 changed files with 7 additions and 3 deletions

View File

@ -483,8 +483,9 @@ func golangBuildMetadata() config.StepData {
Name: "privateModulesGitToken",
ResourceRef: []config.ResourceReference{
{
Name: "golangPrivateModulesGitTokenCredentialsId",
Type: "secret",
Name: "golangPrivateModulesGitTokenCredentialsId",
Param: "password",
Type: "secret",
},
{

View File

@ -219,6 +219,7 @@ spec:
resourceRef:
- name: golangPrivateModulesGitTokenCredentialsId
type: secret
param: password
- type: vaultSecret
name: golangPrivateModulesGitTokenVaultSecret
default: golang

View File

@ -4,6 +4,8 @@ import groovy.transform.Field
@Field String METADATA_FILE = "metadata/golangBuild.yaml"
void call(Map parameters = [:]) {
List credentials = []
List credentials = [
[type: 'usernamePassword', id: 'golangPrivateModulesGitTokenCredentialsId', env: ['PIPER_privateModulesGitUsername', 'PIPER_privateModulesGitToken']]
]
piperExecuteBin(parameters, STEP_NAME, METADATA_FILE, credentials)
}