Skip to content

Commit

Permalink
Merge pull request #375 from basil/mina-sshd-api
Browse files Browse the repository at this point in the history
Teach PCT about Mina SSHD API plugins
  • Loading branch information
jglick authored Jul 26, 2022
2 parents f035412 + b05220e commit bef3c43
Showing 1 changed file with 37 additions and 0 deletions.
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");
}
}

0 comments on commit bef3c43

Please sign in to comment.