blob: 4451ad494e9a523beb7a99d44a8f98ec1cfcda9d [file] [log] [blame]
{%- from "jenkins/map.jinja" import master with context %}
<?xml version='1.0' encoding='UTF-8'?>
<com.cloudbees.plugins.credentials.SystemCredentialsProvider plugin="credentials@2.1.4">
<domainCredentialsMap class="hudson.util.CopyOnWriteMap$Hash">
<entry>
<com.cloudbees.plugins.credentials.domains.Domain>
<specifications/>
</com.cloudbees.plugins.credentials.domains.Domain>
<java.util.concurrent.CopyOnWriteArrayList>
{%- for credential in master.credentials %}
{%- if credential.type == "username_password" %}
<com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl>
<scope>{{ credential.scope }}</scope>
<id>{{ credential.id }}</id>
<description>{{ credential.desc }}</description>
<username>{{ credential.username }}</username>
<password>{{ credential.password_hash }}</password>
</com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl>
{%- elif credential.type == "ssh_key" %}
<com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey plugin="ssh-credentials@1.12">
<scope>{{ credential.scope }}</scope>
<id>{{ credential.id }}</id>
<description>{{ credential.desc }}</description>
<username>{{ credential.username }}</username>
<passphrase>{{ credential.password_hash }}</passphrase>
<privateKeySource class="com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey$DirectEntryPrivateKeySource">
<privateKey> {{ credential.key }}</privateKey>
</privateKeySource>
</com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey>
{%- endif %}
{%- endfor %}
</java.util.concurrent.CopyOnWriteArrayList>
</entry>
</domainCredentialsMap>
</com.cloudbees.plugins.credentials.SystemCredentialsProvider>