Bump ec2 from 1.44 to 1.63 (#1658)
* Bump ec2 from 1.44 to 1.63 Bumps [ec2](https://github.com/jenkinsci/ec2-plugin) from 1.44 to 1.63. - [Release notes](https://github.com/jenkinsci/ec2-plugin/releases) - [Changelog](https://github.com/jenkinsci/ec2-plugin/blob/master/CHANGELOG.md) - [Commits](https://github.com/jenkinsci/ec2-plugin/compare/ec2-1.44...ec2-1.63) --- updated-dependencies: - dependency-name: org.jenkins-ci.plugins:ec2 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Bump ec2 from 1.44 to 1.63 Bumps [ec2](https://github.com/jenkinsci/ec2-plugin) from 1.44 to 1.63. - [Release notes](https://github.com/jenkinsci/ec2-plugin/releases) - [Changelog](https://github.com/jenkinsci/ec2-plugin/blob/master/CHANGELOG.md) - [Commits](https://github.com/jenkinsci/ec2-plugin/compare/ec2-1.44...ec2-1.63) --- updated-dependencies: - dependency-name: org.jenkins-ci.plugins:ec2 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Update ec2 demo Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Tim Jacomb <timjacomb1+github@gmail.com>
This commit is contained in:
parent
b455cf1a55
commit
57ac0b9dd6
|
|
@ -16,7 +16,7 @@ x-ec2_anchor: &ec2_anchor
|
||||||
monitoring: false
|
monitoring: false
|
||||||
numExecutors: 1
|
numExecutors: 1
|
||||||
stopOnTerminate: false
|
stopOnTerminate: false
|
||||||
useDedicatedTenancy: false
|
tenancy: Default
|
||||||
useEphemeralDevices: false
|
useEphemeralDevices: false
|
||||||
zone: "us-east-1"
|
zone: "us-east-1"
|
||||||
ami: "ami-0c6bb742864ffa3f3"
|
ami: "ami-0c6bb742864ffa3f3"
|
||||||
|
|
@ -39,7 +39,7 @@ jenkins:
|
||||||
# but let's be explicit to avoid issues.
|
# but let's be explicit to avoid issues.
|
||||||
useInstanceProfileForCredentials: true
|
useInstanceProfileForCredentials: true
|
||||||
# Reminder: the following key has multiple lines
|
# Reminder: the following key has multiple lines
|
||||||
privateKey: "${EC2_PRIVATE_KEY}"
|
sshKeysCredentialsId: "ssh-key-credential-id"
|
||||||
noDelayProvisioning: true
|
noDelayProvisioning: true
|
||||||
region: "eu-central-1"
|
region: "eu-central-1"
|
||||||
templates:
|
templates:
|
||||||
|
|
|
||||||
|
|
@ -384,7 +384,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jenkins-ci.plugins</groupId>
|
<groupId>org.jenkins-ci.plugins</groupId>
|
||||||
<artifactId>aws-credentials</artifactId>
|
<artifactId>aws-credentials</artifactId>
|
||||||
<version>1.28</version>
|
<version>1.29</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
@ -405,7 +405,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jenkins-ci.plugins</groupId>
|
<groupId>org.jenkins-ci.plugins</groupId>
|
||||||
<artifactId>ec2</artifactId>
|
<artifactId>ec2</artifactId>
|
||||||
<version>1.44</version>
|
<version>1.63</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,6 @@ import java.util.List;
|
||||||
import jenkins.model.Jenkins;
|
import jenkins.model.Jenkins;
|
||||||
import org.junit.Rule;
|
import org.junit.Rule;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.contrib.java.lang.system.EnvironmentVariables;
|
|
||||||
import org.junit.rules.RuleChain;
|
|
||||||
|
|
||||||
import static org.hamcrest.CoreMatchers.containsString;
|
import static org.hamcrest.CoreMatchers.containsString;
|
||||||
import static org.hamcrest.CoreMatchers.equalTo;
|
import static org.hamcrest.CoreMatchers.equalTo;
|
||||||
|
|
@ -28,18 +26,16 @@ import static org.junit.Assert.assertTrue;
|
||||||
public class EC2CloudTest {
|
public class EC2CloudTest {
|
||||||
|
|
||||||
@Rule
|
@Rule
|
||||||
public RuleChain chain = RuleChain.outerRule(new EnvironmentVariables()
|
public JenkinsConfiguredWithReadmeRule j = new JenkinsConfiguredWithReadmeRule();
|
||||||
.set("EC2_PRIVATE_KEY", "ADMIN123"))
|
|
||||||
.around(new JenkinsConfiguredWithReadmeRule());
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ConfiguredWithReadme("ec2/README.md")
|
@ConfiguredWithReadme("ec2/README.md")
|
||||||
public void configure_ec2_cloud() throws Exception {
|
public void configure_ec2_cloud() {
|
||||||
final AmazonEC2Cloud ec2Cloud = (AmazonEC2Cloud) Jenkins.get().getCloud("ec2-ec2");
|
final AmazonEC2Cloud ec2Cloud = (AmazonEC2Cloud) Jenkins.get().getCloud("ec2-ec2");
|
||||||
assertNotNull(ec2Cloud);
|
assertNotNull(ec2Cloud);
|
||||||
|
|
||||||
assertTrue(ec2Cloud.isUseInstanceProfileForCredentials());
|
assertTrue(ec2Cloud.isUseInstanceProfileForCredentials());
|
||||||
assertThat(ec2Cloud.getPrivateKey().getPrivateKey(), is("ADMIN123"));
|
assertThat(ec2Cloud.getSshKeysCredentialsId(), is("ssh-key-credential-id"));
|
||||||
final List<SlaveTemplate> templates = ec2Cloud.getTemplates();
|
final List<SlaveTemplate> templates = ec2Cloud.getTemplates();
|
||||||
assertThat(templates, hasSize(2));
|
assertThat(templates, hasSize(2));
|
||||||
|
|
||||||
|
|
@ -51,7 +47,6 @@ public class EC2CloudTest {
|
||||||
assertFalse(slaveTemplate.ebsOptimized);
|
assertFalse(slaveTemplate.ebsOptimized);
|
||||||
assertFalse(slaveTemplate.monitoring);
|
assertFalse(slaveTemplate.monitoring);
|
||||||
assertFalse(slaveTemplate.stopOnTerminate);
|
assertFalse(slaveTemplate.stopOnTerminate);
|
||||||
assertFalse(slaveTemplate.getUseDedicatedTenancy());
|
|
||||||
assertFalse(slaveTemplate.useEphemeralDevices);
|
assertFalse(slaveTemplate.useEphemeralDevices);
|
||||||
assertThat(slaveTemplate.type, is(InstanceType.T2Small));
|
assertThat(slaveTemplate.type, is(InstanceType.T2Small));
|
||||||
assertThat(slaveTemplate.getAmi(), equalTo("ami-0c6bb742864ffa3f3"));
|
assertThat(slaveTemplate.getAmi(), equalTo("ami-0c6bb742864ffa3f3"));
|
||||||
|
|
@ -83,7 +78,6 @@ public class EC2CloudTest {
|
||||||
assertFalse(slaveTemplate.ebsOptimized);
|
assertFalse(slaveTemplate.ebsOptimized);
|
||||||
assertFalse(slaveTemplate.monitoring);
|
assertFalse(slaveTemplate.monitoring);
|
||||||
assertFalse(slaveTemplate.stopOnTerminate);
|
assertFalse(slaveTemplate.stopOnTerminate);
|
||||||
assertFalse(slaveTemplate.getUseDedicatedTenancy());
|
|
||||||
assertFalse(slaveTemplate.useEphemeralDevices);
|
assertFalse(slaveTemplate.useEphemeralDevices);
|
||||||
assertThat(slaveTemplate.type, is(InstanceType.T2Xlarge));
|
assertThat(slaveTemplate.type, is(InstanceType.T2Xlarge));
|
||||||
assertThat(slaveTemplate.getAmi(), equalTo("ami-0c6bb742864ffa3f3"));
|
assertThat(slaveTemplate.getAmi(), equalTo("ami-0c6bb742864ffa3f3"));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue