Created
June 6, 2018 10:56
-
-
Save chromko/6f7738db4aac2ef0eb3f3eb73d5cb49a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
credentials { | |
{% for credential_name, credential_value in jenkins_system_credentials %} | |
{{credential_name | replace("-","_")}}: { | |
type = "{{credential_value.type}}" | |
credentialsId = "{{credential_value.credentialsid}}" | |
description = "{{credential_value.description}}" | |
userId = "{{credential_value.userid}}" | |
{% if credential_value.value is defined %} | |
value = "credential_value.value" | |
{% endif %} | |
{% if credential_value.passphrase is defined %} | |
passphrase = "{{credential_value.passphrase}}" | |
{% endif %} | |
{% if credential_value.path is defined %} | |
path = "{{credential_value.passphrase}}" | |
{% endif %} | |
} | |
{% endfor %} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
slaves { | |
{% for slave_name, slave_value in jenkins_slaves %} | |
{{slave_name | replace("-","_") }} { | |
name = "{{slave_value.name}}" | |
type = "slave_value.type" | |
{% if slave_value.type == "ssh" %} | |
host = "{{slave_value.host}}" | |
port = "{{slave_value.port}}" | |
credentialsId = "slave_value.credentialsid" | |
{% endif %} | |
description = "{{slave_value.description}}" | |
executors = "{{slave_value.executors}}" | |
remoteFS = "{{slave_value.remotefs}}" | |
labels = "{{slave_value.labels}}" | |
retention = "{{slave_value.retention}}" | |
mode = "{{slave_value.mode}}" | |
} | |
{% endofr %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment