1. diff --git a/tests/jenkins-define-credentials.py b/tests/jenkins-define-credentials.py
  2. deleted file mode 100644
  3. index 66a79f2..0000000
  4. --- a/tests/jenkins-define-credentials.py
  5. +++ /dev/null
  6. @@ -1,46 +0,0 @@
  7. -import requests
  8. -import sys
  9. -
  10. -cred_template = """
  11. -{
  12. - "domainCredentials": {
  13. - "domain": {
  14. - "name": "",
  15. - "description": ""
  16. - },
  17. - "credentials": [
  18. - {
  19. - "scope": "GLOBAL",
  20. - "id": "",
  21. - "username": "{USERNAME}",
  22. - "description": "{DESCRIPTION}",
  23. - "privateKeySource": {
  24. - "value": "1",
  25. - "privateKeyFile": "{KEY_FILE}",
  26. - "stapler-class": "com.cloudbees.jenkins.plugins\
  27. -.sshcredentials.impl.BasicSSHUserPrivateKey$FileOnMasterPrivateKeySource"
  28. - },
  29. - "passphrase": "",
  30. - "stapler-class": "com.cloudbees.jenkins.plugins\
  31. -.sshcredentials.impl.BasicSSHUserPrivateKey",
  32. - "kind": "com.cloudbees.jenkins.plugins\
  33. -.sshcredentials.impl.BasicSSHUserPrivateKey"
  34. - }
  35. - ]
  36. - }
  37. -}
  38. -"""
  39. -
  40. -
  41. -def init(url):
  42. - cred = (cred_template.
  43. - replace('{KEY_FILE}', '/var/jenkins_home/.ssh/id_rsa').
  44. - replace('{USERNAME}', 'ubuntu').
  45. - replace('{DESCRIPTION}', 'for jenkins slaves'))
  46. - r = requests.post(url + '/credentials/configSubmit',
  47. - data={'description': 'GLOBAL DESCRIPTION',
  48. - 'name': 'GLOBAL NAME',
  49. - 'json': cred})
  50. - r.raise_for_status()
  51. -
  52. -init(*sys.argv[1:])