Fixed credentials enforcing, updated readme
Change-Id: Ibc90ed7611fbe70f343abb297d1cc8fb6a947021
diff --git a/README.rst b/README.rst
index c74a3a1..82555d0 100644
--- a/README.rst
+++ b/README.rst
@@ -675,6 +675,18 @@
url: https://path-to-my-library
credential_id: github
+ Jenkins Global env properties enforcing
+
+ .. code-block:: yaml
+
+ jenkins:
+ client:
+ globalenvprop:
+ OFFLINE_DEPLOYMENT:
+ enabled: true
+ name: "OFFLINE_DEPLOYMENT" # optional, default using dict key
+ value: "true"
+
Usage
=====
diff --git a/_states/jenkins_credential.py b/_states/jenkins_credential.py
index 22d3e72..67be9a0 100644
--- a/_states/jenkins_credential.py
+++ b/_states/jenkins_credential.py
@@ -52,7 +52,7 @@
}
// remove credentails with same if before created new one, if exists
def existingCreds = com.cloudbees.plugins.credentials.CredentialsProvider.lookupCredentials(
- com.cloudbees.plugins.credentials.common.StandardUsernameCredentials.class,
+ com.cloudbees.plugins.credentials.common.StandardCredentials.class,
Jenkins.instance).find{it -> it.id.equals("${name}")}
if(existingCreds){
store.removeCredentials(domain, existingCreds)