1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-07-15 01:34:38 +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

@ -484,6 +484,7 @@ func golangBuildMetadata() config.StepData {
ResourceRef: []config.ResourceReference{
{
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)
}