-
Notifications
You must be signed in to change notification settings - Fork 186
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add user defined properties to lockable resource (#394)
* Added UI to set properties on Lockable Resources * Document properties in the README.md * Expose the properties to environment variables * Removed unnecessary Copyright to 6WIND * Removed unnecessary Copyright to 6WIND * maintain lock ordering when reporting in environment variables Fixes #300 : The order of the locked resources in the environment variable does not match the order in the extra parameter * maintain lock ordering when reporting in environment variables Fixes #300 : The order of the locked resources in the environment variable does not match the order in the extra parameter * maintain lock ordering when reporting in environment variables Fixes #300 : The order of the locked resources in the environment variable does not match the order in the extra parameter * maintain lock ordering when reporting in environment variables Fixes #300 : The order of the locked resources in the environment variable does not match the order in the extra parameter * Revert "maintain lock ordering when reporting in environment variables" This reverts commit be88b85. * Revert "maintain lock ordering when reporting in environment variables" This reverts commit 82a7770. * Revert "maintain lock ordering when reporting in environment variables" This reverts commit 1653c7b. * Revert "maintain lock ordering when reporting in environment variables" This reverts commit dfdfc5b. * Adding properties in a colum of the lock descriptions * and now fix it after master merge * style: Remove commented out line --------- Co-authored-by: Gaspard Petit <[email protected]> Co-authored-by: Jan-Frederik Schmidt <[email protected]>
- Loading branch information
1 parent
5cbaf22
commit 9fa89cf
Showing
14 changed files
with
284 additions
and
69 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
58 changes: 58 additions & 0 deletions
58
src/main/java/org/jenkins/plugins/lockableresources/LockableResourceProperty.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
package org.jenkins.plugins.lockableresources; | ||
|
||
import edu.umd.cs.findbugs.annotations.NonNull; | ||
import hudson.Extension; | ||
import hudson.model.AbstractDescribableImpl; | ||
import hudson.model.Descriptor; | ||
import java.io.Serializable; | ||
import org.kohsuke.stapler.DataBoundConstructor; | ||
import org.kohsuke.stapler.DataBoundSetter; | ||
import org.kohsuke.stapler.export.Exported; | ||
|
||
public class LockableResourceProperty extends AbstractDescribableImpl<LockableResourceProperty> | ||
implements Serializable { | ||
|
||
private String name; | ||
private String value; | ||
|
||
@DataBoundConstructor | ||
public LockableResourceProperty() { | ||
} | ||
|
||
@DataBoundSetter | ||
public void setName(String name) { | ||
this.name = name; | ||
} | ||
|
||
@DataBoundSetter | ||
public void setValue(String value) { | ||
this.value = value; | ||
} | ||
|
||
@Exported | ||
public String getName() { | ||
return name; | ||
} | ||
|
||
@Exported | ||
public String getValue() { | ||
return value; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return name; | ||
} | ||
|
||
@Extension | ||
public static class DescriptorImpl extends Descriptor<LockableResourceProperty> { | ||
|
||
@NonNull | ||
@Override | ||
public String getDisplayName() { | ||
return "Property"; | ||
} | ||
} | ||
|
||
private static final long serialVersionUID = 1L; | ||
} |
This file contains 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
Oops, something went wrong.