1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-07-17 01:42:43 +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{ ResourceRef: []config.ResourceReference{
{ {
Name: "golangPrivateModulesGitTokenCredentialsId", Name: "golangPrivateModulesGitTokenCredentialsId",
Param: "password",
Type: "secret", Type: "secret",
}, },

View File

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

View File

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