-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding option to control Content Behaviour in deployment #76
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
</parent> | ||
|
||
<artifactId>codedeploy</artifactId> | ||
<version>1.17-SNAPSHOT</version> | ||
<version>1.17-CONTENT</version> | ||
<packaging>hpi</packaging> | ||
<groupId>com.amazonaws</groupId> | ||
<name>AWS CodeDeploy Plugin for Jenkins</name> | ||
|
@@ -52,9 +52,9 @@ | |
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.jenkins-ci.plugins</groupId> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's probably better to upload the new aws-sdk to the jenkins maven repo and get it from there |
||
<groupId>com.amazonaws</groupId> | ||
<artifactId>aws-java-sdk</artifactId> | ||
<version>1.11.119</version> | ||
<version>1.11.203</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,7 +67,7 @@ | |
|
||
import javax.servlet.ServletException; | ||
|
||
/** | ||
/* | ||
* The AWS CodeDeploy Publisher is a post-build plugin that adds the ability to start a new CodeDeploy deployment | ||
* with the project's workspace as the application revision. | ||
* <p/> | ||
|
@@ -104,6 +104,7 @@ public class AWSCodeDeployPublisher extends Publisher { | |
private final String credentials; | ||
private final String deploymentMethod; | ||
private final String versionFileName; | ||
private final String fileExistsBehaviour; | ||
|
||
private PrintStream logger; | ||
private Map <String, String> envVars; | ||
|
@@ -131,7 +132,8 @@ public AWSCodeDeployPublisher( | |
String proxyHost, | ||
int proxyPort, | ||
String excludes, | ||
String subdirectory) { | ||
String subdirectory, | ||
String fileExistsBehaviour) { | ||
|
||
this.externalId = externalId; | ||
this.applicationName = applicationName; | ||
|
@@ -154,6 +156,7 @@ public AWSCodeDeployPublisher( | |
this.awsSecretKey = awsSecretKey; | ||
this.iamRoleArn = iamRoleArn; | ||
this.deploymentGroupAppspec = deploymentGroupAppspec; | ||
this.fileExistsBehaviour = fileExistsBehaviour; | ||
|
||
if (waitForCompletion != null && waitForCompletion) { | ||
this.waitForCompletion = waitForCompletion; | ||
|
@@ -419,6 +422,7 @@ private String createDeployment(AWSClients aws, RevisionLocation revisionLocatio | |
.withApplicationName(getApplicationNameFromEnv()) | ||
.withRevision(revisionLocation) | ||
.withDescription("Deployment created by Jenkins") | ||
.withFileExistsBehavior(getFileExistsBehaviour()) | ||
); | ||
|
||
return createDeploymentResult.getDeploymentId(); | ||
|
@@ -492,7 +496,7 @@ public BuildStepMonitor getRequiredMonitorService() { | |
return BuildStepMonitor.STEP; | ||
} | ||
|
||
/** | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed the double **, maven wasn't getting along with this |
||
/* | ||
* Descriptor for {@link AWSCodeDeployPublisher}. Used as a singleton. | ||
* The class is marked as public so that it can be accessed from views. | ||
* <p/> | ||
|
@@ -727,6 +731,10 @@ public int getProxyPort() { | |
return proxyPort; | ||
} | ||
|
||
public String getFileExistsBehaviour() { | ||
return fileExistsBehaviour; | ||
} | ||
|
||
public String getApplicationNameFromEnv() { | ||
return Util.replaceMacro(this.applicationName, envVars); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do not adjust the version suffix. SNAPSHOT is for prereleases as we aggregate additional functionality, and then the automated plugin release process will handle removing this and pushing the untagged version to the appropriate release branch.