-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #375 from basil/mina-sshd-api
Teach PCT about Mina SSHD API plugins
- Loading branch information
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
plugins-compat-tester/src/main/java/org/jenkins/tools/test/hook/MinaSshdApi.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,37 @@ | ||
package org.jenkins.tools.test.hook; | ||
|
||
import hudson.model.UpdateSite; | ||
import java.util.Map; | ||
import org.jenkins.tools.test.model.PomData; | ||
|
||
public class MinaSshdApi extends AbstractMultiParentHook { | ||
|
||
@Override | ||
protected String getParentFolder() { | ||
return "mina-sshd-api-plugin"; | ||
} | ||
|
||
@Override | ||
protected String getParentProjectName() { | ||
return "mina-sshd-api-parent"; | ||
} | ||
|
||
@Override | ||
protected String getPluginFolderName(UpdateSite.Plugin currentPlugin){ | ||
return currentPlugin.getDisplayName(); | ||
} | ||
|
||
@Override | ||
public boolean check(Map<String, Object> info) { | ||
return isMinaSshdApiPlugin(info); | ||
} | ||
|
||
private boolean isMinaSshdApiPlugin(Map<String, Object> moreInfo) { | ||
PomData data = (PomData) moreInfo.get("pomData"); | ||
return isMinaSshdApiPlugin(data); | ||
} | ||
|
||
private boolean isMinaSshdApiPlugin(PomData data) { | ||
return data.groupId.equals("io.jenkins.plugins.mina-sshd-api"); | ||
} | ||
} |