Skip to content
Permalink
Browse files

Added Symbols for Jenkins Pipeline support

[JENKINS-29922] $class must die
  • Loading branch information...
pskumar448 committed Mar 4, 2017
1 parent 7a22eac commit e0b44fcd8484372deef5a22e4daa048b4b5e8f46
11 pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>2.6</version>
<version>2.11</version>
<relativePath />
</parent>
<groupId>sp.sd</groupId>
@@ -14,9 +14,8 @@
<packaging>hpi</packaging>

<properties>
<jenkins.version>1.625.3</jenkins.version>
<jenkins.version>1.651.3</jenkins.version>
<java.level>7</java.level>
<jenkins-test-harness.version>2.1</jenkins-test-harness.version>
</properties>

<name>File Operations Plugin</name>
@@ -76,6 +75,12 @@
<optional>true</optional>
</dependency>

<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>structs</artifactId>
<version>1.6</version>
</dependency>

<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
@@ -9,6 +9,7 @@
import hudson.model.AbstractBuild;
import hudson.model.Run;

import org.jenkinsci.Symbol;
import org.kohsuke.stapler.DataBoundConstructor;

import java.io.File;
@@ -128,6 +129,7 @@ public void checkRoles(RoleChecker checker) throws SecurityException {
}

@Extension
@Symbol("fileCopyOperation")
public static class DescriptorImpl extends FileOperationDescriptor {
public String getDisplayName() {
return "File Copy";
@@ -9,6 +9,7 @@
import hudson.model.Run;
import hudson.model.TaskListener;

import org.jenkinsci.Symbol;
import org.kohsuke.stapler.DataBoundConstructor;

import java.io.File;
@@ -98,6 +99,7 @@ public void checkRoles(RoleChecker checker) throws SecurityException {
}

@Extension
@Symbol("fileCreateOperation")
public static class DescriptorImpl extends FileOperationDescriptor {
public String getDisplayName() {
return "File Create";
@@ -9,6 +9,7 @@
import hudson.model.Run;
import hudson.model.TaskListener;

import org.jenkinsci.Symbol;
import org.kohsuke.stapler.DataBoundConstructor;

import java.io.File;
@@ -123,6 +124,7 @@ public void checkRoles(RoleChecker checker) throws SecurityException {
}

@Extension
@Symbol("fileDeleteOperation")
public static class DescriptorImpl extends FileOperationDescriptor {
public String getDisplayName() {
return "File Delete";
@@ -10,6 +10,7 @@
import hudson.model.TaskListener;

import hudson.util.Secret;
import org.jenkinsci.Symbol;
import org.kohsuke.stapler.DataBoundConstructor;

import java.io.FileOutputStream;
@@ -164,6 +165,7 @@ public void checkRoles(RoleChecker checker) throws SecurityException {
}

@Extension
@Symbol("fileDownloadOperation")
public static class DescriptorImpl extends FileOperationDescriptor {
public String getDisplayName() {
return "File Download";
@@ -9,6 +9,7 @@
import hudson.model.Run;
import hudson.model.TaskListener;

import org.jenkinsci.Symbol;
import org.kohsuke.stapler.DataBoundConstructor;

import java.io.File;
@@ -110,6 +111,7 @@ public void checkRoles(RoleChecker checker) throws SecurityException {
}

@Extension
@Symbol("fileJoinOperation")
public static class DescriptorImpl extends FileOperationDescriptor {
public String getDisplayName() {
return "File Join";
@@ -7,6 +7,7 @@
import hudson.model.*;
import hudson.tasks.Builder;
import hudson.tasks.BuildStepDescriptor;
import org.jenkinsci.Symbol;
import org.kohsuke.stapler.DataBoundConstructor;

import java.util.List;
@@ -56,8 +57,13 @@ public DescriptorImpl getDescriptor() {


@Extension
@Symbol("fileOperations")
public static final class DescriptorImpl extends BuildStepDescriptor<Builder> {

public DescriptorImpl() {
load();
}

public boolean isApplicable(Class<? extends AbstractProject> aClass) {
// Indicates that this builder can be used with all kinds of project types
return true;
@@ -11,6 +11,7 @@
import hudson.model.Run;
import hudson.model.TaskListener;

import org.jenkinsci.Symbol;
import org.kohsuke.stapler.DataBoundConstructor;

import java.io.File;
@@ -127,6 +128,7 @@ public void checkRoles(RoleChecker checker) throws SecurityException {
}

@Extension
@Symbol("filePropertiesToJsonOperation")
public static class DescriptorImpl extends FileOperationDescriptor {
public String getDisplayName() {
return "File Properties to Json";
@@ -9,6 +9,7 @@
import hudson.model.Run;
import hudson.model.TaskListener;

import org.jenkinsci.Symbol;
import org.kohsuke.stapler.DataBoundConstructor;

import java.io.File;
@@ -105,6 +106,7 @@ public void checkRoles(RoleChecker checker) throws SecurityException {
}

@Extension
@Symbol("fileTransformOperation")
public static class DescriptorImpl extends FileOperationDescriptor {
public String getDisplayName() {
return "File Transform";
@@ -9,6 +9,7 @@
import hudson.model.Run;
import hudson.model.TaskListener;

import org.jenkinsci.Symbol;
import org.kohsuke.stapler.DataBoundConstructor;

import java.io.File;
@@ -117,6 +118,7 @@ public void checkRoles(RoleChecker checker) throws SecurityException {
}

@Extension
@Symbol("fileUnTarOperation")
public static class DescriptorImpl extends FileOperationDescriptor {
public String getDisplayName() {
return "Untar";
@@ -9,6 +9,7 @@
import hudson.model.Run;
import hudson.model.TaskListener;

import org.jenkinsci.Symbol;
import org.kohsuke.stapler.DataBoundConstructor;

import java.io.File;
@@ -103,6 +104,7 @@ public void checkRoles(RoleChecker checker) throws SecurityException {
}

@Extension
@Symbol("fileUnZipOperation")
public static class DescriptorImpl extends FileOperationDescriptor {
public String getDisplayName() {
return "Unzip";
@@ -9,6 +9,7 @@
import hudson.model.Run;
import hudson.model.TaskListener;

import org.jenkinsci.Symbol;
import org.kohsuke.stapler.DataBoundConstructor;

import java.io.File;
@@ -96,6 +97,7 @@ public void checkRoles(RoleChecker checker) throws SecurityException {
}

@Extension
@Symbol("folderCopyOperation")
public static class DescriptorImpl extends FileOperationDescriptor {
public String getDisplayName() {
return "Folder Copy";
@@ -9,6 +9,7 @@
import hudson.model.Run;
import hudson.model.TaskListener;

import org.jenkinsci.Symbol;
import org.kohsuke.stapler.DataBoundConstructor;

import java.io.File;
@@ -87,6 +88,7 @@ public void checkRoles(RoleChecker checker) throws SecurityException {
}

@Extension
@Symbol("folderCreateOperation")
public static class DescriptorImpl extends FileOperationDescriptor {
public String getDisplayName() {
return "Folder Create";
@@ -9,6 +9,7 @@
import hudson.model.Run;
import hudson.model.TaskListener;

import org.jenkinsci.Symbol;
import org.kohsuke.stapler.DataBoundConstructor;

import java.io.File;
@@ -87,6 +88,7 @@ public void checkRoles(RoleChecker checker) throws SecurityException {
}

@Extension
@Symbol("folderDeleteOperation")
public static class DescriptorImpl extends FileOperationDescriptor {
public String getDisplayName() {
return "Folder Delete";

0 comments on commit e0b44fc

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