Skip to content
Permalink
Browse files

JENKINS-31139 Output plugin version in console

  • Loading branch information
praqma-thi committed Oct 28, 2015
1 parent b91ba9b commit 90f5feba186c9d316fd9466c73560cb705f33ee0
@@ -13,6 +13,7 @@
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import jenkins.model.Jenkins;
import org.jenkinsci.plugins.pretestedintegration.exceptions.EstablishingWorkspaceFailedException;
import org.jenkinsci.plugins.pretestedintegration.exceptions.IntegrationFailedException;
import org.jenkinsci.plugins.pretestedintegration.exceptions.NothingToDoException;
@@ -58,6 +59,7 @@ public PretestedIntegrationBuildWrapper(final AbstractSCMBridge scmBridge) {
*/
@Override
public BuildWrapper.Environment setUp(AbstractBuild build, Launcher launcher, BuildListener listener) {
listener.getLogger().println(String.format("%s Pretested Integration Plugin v%s", LOG_PREFIX, getVersion()));
boolean proceedToBuildStep = true;
try {
scmBridge.validateConfiguration(build.getProject());
@@ -97,6 +99,13 @@ public DescriptorImpl getDescriptor() {
return (DescriptorImpl) super.getDescriptor();
}

/**
* @return the plugin version
*/
public String getVersion(){
return Jenkins.getInstance().getPlugin("pretested-integration").getWrapper().getVersion();
}

/**
* A singleton Descriptor for every concrete BuildWrapper implementation.
*/

0 comments on commit 90f5feb

Please sign in to comment.
You can’t perform that action at this time.