Sha256: db633ca7f749b8e30dabfdbeb18e259413ef8078717e626177a6eb45904ee320

Contents?: true

Size: 502 Bytes

Versions: 20

Compression:

Stored size: 502 Bytes

Contents

<% credentials.each do |cred| %>
sh "git config --global credential.<%= cred.protocol %>://<%= cred.host %>.helper cache"
withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: '<%= cred.jenkins_id %>',
                  usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD']]) {
    def credentials = "protocol=<%= cred.protocol %>\nhost=<%= cred.host %>\nusername=${env.USERNAME}\npassword=${env.PASSWORD}\n"
    sh "echo '${credentials}' | git credential approve"
}
<% end %>

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
autoproj-jenkins-0.3.15 lib/autoproj/jenkins/templates/setup-git-credentials.pipeline.erb
autoproj-jenkins-0.3.14 lib/autoproj/jenkins/templates/setup-git-credentials.pipeline.erb
autoproj-jenkins-0.3.13 lib/autoproj/jenkins/templates/setup-git-credentials.pipeline.erb
autoproj-jenkins-0.3.12 lib/autoproj/jenkins/templates/setup-git-credentials.pipeline.erb
autoproj-jenkins-0.3.11 lib/autoproj/jenkins/templates/setup-git-credentials.pipeline.erb
autoproj-jenkins-0.3.10 lib/autoproj/jenkins/templates/setup-git-credentials.pipeline.erb
autoproj-jenkins-0.3.9 lib/autoproj/jenkins/templates/setup-git-credentials.pipeline.erb
autoproj-jenkins-0.3.8 lib/autoproj/jenkins/templates/setup-git-credentials.pipeline.erb
autoproj-jenkins-0.3.7 lib/autoproj/jenkins/templates/setup-git-credentials.pipeline.erb
autoproj-jenkins-0.3.6 lib/autoproj/jenkins/templates/setup-git-credentials.pipeline.erb
autoproj-jenkins-0.3.5 lib/autoproj/jenkins/templates/setup-git-credentials.pipeline.erb
autoproj-jenkins-0.3.4 lib/autoproj/jenkins/templates/setup-git-credentials.pipeline.erb
autoproj-jenkins-0.3.3 lib/autoproj/jenkins/templates/setup-git-credentials.pipeline.erb
autoproj-jenkins-0.3.2 lib/autoproj/jenkins/templates/setup-git-credentials.pipeline.erb
autoproj-jenkins-0.3.1 lib/autoproj/jenkins/templates/setup-git-credentials.pipeline.erb
autoproj-jenkins-0.3.0 lib/autoproj/jenkins/templates/setup-git-credentials.pipeline.erb
autoproj-jenkins-0.2.2 lib/autoproj/jenkins/templates/setup-git-credentials.pipeline.erb
autoproj-jenkins-0.2.1 lib/autoproj/jenkins/templates/setup-git-credentials.pipeline.erb
autoproj-jenkins-0.2.0 lib/autoproj/jenkins/templates/setup-git-credentials.pipeline.erb
autoproj-jenkins-0.1.0 lib/autoproj/jenkins/templates/setup-git-credentials.pipeline.erb