Skip to content

Commit

Permalink
ENG-54759 : Jenkins review fix (#74)
Browse files Browse the repository at this point in the history
* project with spaces and review nits

* removed test folder

* nits

* Empty test commit
  • Loading branch information
souvik-karfa authored Jan 2, 2025
1 parent f55015e commit 2a1c7b8
Show file tree
Hide file tree
Showing 136 changed files with 18 additions and 444 deletions.
22 changes: 1 addition & 21 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@
<url>https://opensource.org/licenses/MIT</url>
</license>
</licenses>
<developers>
<developer>
<id>dhruv-singhal-github</id>
<name>Dhruv Singhal</name>
</developer>
</developers>

<scm>
<connection>scm:git:https://github.com/${gitHubRepo}</connection>
Expand All @@ -42,6 +36,7 @@
<jenkins.version>2.440.3</jenkins.version>
<gitHubRepo>jenkinsci/${project.artifactId}-plugin</gitHubRepo>
<tagNameFormat>v@{project.version}</tagNameFormat>
<spotless.check.skip>false</spotless.check.skip>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -110,21 +105,6 @@

<build>
<plugins>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>2.43.0</version>
<executions>
<execution>
<id>format</id>
<goals>
<goal>check</goal>
<goal>apply</goal>
</goals>
<phase>process-sources</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -378,8 +378,7 @@ private void downloadTraceableCliBinary(FilePath workspace, TaskListener listene
}

// Initialize the scan.
private void initScan(Run<?, ?> run, FilePath workspace, TaskListener listener)
throws IOException, InterruptedException {
private void initScan(Run<?, ?> run, FilePath workspace, TaskListener listener) {
String replay = String.valueOf(xastReplay != null && xastReplay);
String allEndPoint = String.valueOf(includeAllEndPoints != null && includeAllEndPoints);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
import java.io.InputStreamReader;
import java.net.URL;
import jenkins.MasterToSlaveFileCallable;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class DownloadTraceableCliBinary extends MasterToSlaveFileCallable<Void> {

private String workspacePath;
Expand Down Expand Up @@ -45,7 +47,6 @@ public Void invoke(File f, VirtualChannel channel) throws IOException, Interrupt
}

unTar(filepath);

return null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@
import java.util.Scanner;
import java.util.UUID;
import jenkins.MasterToSlaveFileCallable;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;

@Slf4j
public class RunScript extends MasterToSlaveFileCallable<String> {

private final TaskListener listener;
Expand Down Expand Up @@ -67,13 +69,18 @@ private void runScript() throws IOException, InterruptedException {
command.add("/bin/bash");
command.add(this.tempFile.getAbsolutePath());

for (int i = 0; i < args.length; i++) {
if (!StringUtils.isEmpty(args[i])) {
args[i] = args[i].replace(" ", "");
for (int argIndex = 0; argIndex < args.length; argIndex++) {
if (StringUtils.isNotBlank(args[argIndex])) {
if (argIndex == 0) {
args[argIndex] = "'" + args[argIndex] + "'";
} else {
args[argIndex] = args[argIndex].replace(" ", "");
}

command.add(args[argIndex]);
} else {
command.add("''");
}

if (args[i] != null && !args[i].isEmpty()) command.add(args[i]);
else command.add("''");
}

ProcessBuilder pb = new ProcessBuilder(command);
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/index.jelly
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?jelly escape-by-default='true'?>
<div>
TRACEABLE
Traceable Jenkins Plugin that allows to configure and run AST scans.
</div>

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 2a1c7b8

Please sign in to comment.