Skip to content
Permalink
Browse files

Merge pull request #10 from red-gate/pom-INFRA-588-update

INFRA-588: POM update
  • Loading branch information
MichelleTaylorRG committed Oct 20, 2016
2 parents e9c08a7 + e4ca1b3 commit 0352c19693ed521494e8510d327a5ad09435c9b4
Showing with 23 additions and 6 deletions.
  1. +12 −2 pom.xml
  2. +4 −0 src/main/java/redgatesqlci/BuildBuilder.java
  3. +7 −4 src/main/java/redgatesqlci/Utils.java
14 pom.xml
@@ -5,8 +5,7 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<!-- Baseline Jenkins version you use to build and test the plugin. Users must have this version or newer to run. -->
<version>1.580.1</version>
<version>2.5</version>
</parent>

<groupId>com.redgate.plugins.redgatesqlci</groupId>
@@ -30,8 +29,18 @@
<name>Peter Gerrard</name>
<email>peter.gerrard@red-gate.com</email>
</developer>
<developer>
<id>Michelle_Taylor</id>
<name>Michelle Taylor</name>
<email>michelle.taylor@red-gate.com</email>
</developer>
</developers>

<properties>
<!-- Baseline Jenkins version you use to build and test the plugin. Users must have this version or newer to run. -->
<jenkins.version>1.580.1</jenkins.version>
</properties>

<scm>
<connection>scm:git:git://github.com/jenkinsci/${project.artifactId}-plugin.git</connection>
<developerConnection>scm:git:git@github.com:jenkinsci/${project.artifactId}-plugin.git</developerConnection>
@@ -45,6 +54,7 @@
<url>http://repo.jenkins-ci.org/public/</url>
</repository>
</repositories>

<pluginRepositories>
<pluginRepository>
<id>repo.jenkins-ci.org</id>
@@ -141,6 +141,10 @@ public boolean perform(AbstractBuild build, Launcher launcher, BuildListener lis
ArrayList<String> params = new ArrayList<String>();

FilePath checkOutPath = build.getWorkspace();
if (checkOutPath == null)
{
return false;
}
params.add("Build");

if (getDbFolder().equals("subfolder")) {
@@ -40,7 +40,7 @@ public static boolean runSQLCIWithParams(AbstractBuild build, Launcher launcher,
allLocations = allLocations.concat(possibleLocation + " ");
}

if(sqlCiLocation == "")
if(sqlCiLocation.isEmpty())
{
listener.error("SQLCI.ps1 cannot be found. Checked " + allLocations + ". Please install Redgate DLM Automation 2 on this agent.");
return false;
@@ -56,7 +56,9 @@ public static boolean runSQLCIWithParams(AbstractBuild build, Launcher launcher,
procParams.add(5, "\"" + sqlCiLocation + "\"");
procParams.add(6, "-Verbose");

String longString = "\"" + getPowerShellExeLocation() + "\" -NonInteractive -ExecutionPolicy Bypass -File \"" + sqlCiLocation + "\"" + " -Verbose";
StringBuffer longStringBuffer = new StringBuffer();

longStringBuffer.append("\"" + getPowerShellExeLocation() + "\" -NonInteractive -ExecutionPolicy Bypass -File \"" + sqlCiLocation + "\"" + " -Verbose");

// Here we do some parameter fiddling. Existing quotes must be escaped with three slashes
// Then, we need to surround the part on the right of the = with quotes iff it has a space.
@@ -76,8 +78,9 @@ public static boolean runSQLCIWithParams(AbstractBuild build, Launcher launcher,
}

procParams.add(param);
longString += " " + fixedParam;
longStringBuffer.append(" " + fixedParam);
}
String longString = longStringBuffer.toString();

// Run SQL CI with parameters. Send output and error streams to logger.Map<String, String> vars = new HashMap<String, String>();
Map<String, String> vars = new HashMap<String, String>();
@@ -88,7 +91,7 @@ public static boolean runSQLCIWithParams(AbstractBuild build, Launcher launcher,
Launcher.ProcStarter procStarter = launcher.new ProcStarter();

// Set process environment variables to system environment variables. This shouldn't be necessary!
EnvVars envVars = new EnvVars();
EnvVars envVars;
try {
envVars = build.getEnvironment(listener);
vars.putAll(envVars);

0 comments on commit 0352c19

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