---
{% for file in JENKINS_SECRET_FILES_LIST %}
- credentialType: 'secretFile'
  scope: '{{ file.scope }}'
  name: '{{ file.name }}'
  path: 'credentials/{{ file.name }}'
  description: '{{ file.description }}'
  id: '{{ file.id }}'
{% endfor %}
{% for userPass in JENKINS_USERNAME_PASSWORD_LIST %}
- credentialType: 'usernamePassword'
  scope: '{{ userPass.scope }}'
  username: '{{ userPass.username }}'
  password: '{{ userPass.password }}'
  description: '{{ userPass.description }}'
  id: '{{ userPass.id }}'
{% endfor %}
{% for text in JENKINS_SECRET_TEXT_LIST %}
- credentialType: 'secretText'
  scope: '{{ text.scope }}'
  secretText: '{{ text.secretText }}'
  description: '{{ text.description }}'
  id: '{{ text.id }}'
{% endfor %}
{% for cert in JENKINS_CERTIFICATES_LIST %}
- credentialType: 'certificate'
  scope: '{{ cert.scope }}'
  path: '{{ cert.path }}'
  password: ''{{ cert.password }}'
  description: '{{ cert.description }}'
  id: '{{ cert.id }}'
{% endfor %}
{% for master_ssh in JENKINS_MASTER_SSH_LIST %}
- credentialType: 'ssh'
  scope: '{{ master_ssh.scope }}'
  username: '{{ master_ssh.username }}'
  isJenkinsMasterSsh: true
  passphrase: '{{ master_ssh.passphrase }}'
  description: '{{ master_ssh.description }}'
  id: '{{ master_ssh.id }}'
{% endfor %}
{% for custom_ssh in JENKINS_CUSTOM_SSH_LIST %}
- credentialType: 'ssh'
  scope: '{{ custom_ssh.scope }}'
  username: '{{ custom_ssh.username }}'
  isJenkinsMasterSsh: false
  path: 'credentials/{{ custom_ssh.name }}'
  passphrase: '{{ custom_ssh.passphrase }}'
  description: '{{ custom_ssh.description }}'
  id: '{{ custom_ssh.id }}'
{% endfor %}
