Skip to content

Commit

Permalink
Merge pull request #14 from jenkinsci/dependabot/maven/org.jenkins-ci…
Browse files Browse the repository at this point in the history
….plugins-aws-credentials-191.vcb_f183ce58b_9

chore(deps): bump aws-credentials from 1.29 to 191.vcb_f183ce58b_9
  • Loading branch information
repolevedavaj authored Jan 6, 2023
2 parents a8a50bf + a3d98e4 commit 382701e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 27 deletions.
9 changes: 8 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@
<gitHubRepo>jenkinsci/${project.artifactId}-plugin</gitHubRepo>

<aws-java-sdk.version>1.12.287-357.vf82d85a_6eefd</aws-java-sdk.version>
<aws-credentials.version>1.29</aws-credentials.version>
<aws-credentials.version>191.vcb_f183ce58b_9</aws-credentials.version>
<variant.version>59.vf075fe829ccb</variant.version>
<jsr305.version>3.0.2</jsr305.version>
<assertj-core.version>3.24.0</assertj-core.version>
<testcontainers.version>1.17.6</testcontainers.version>
<zstd-jni.version>1.5.2-5</zstd-jni.version>
<jackson2-api.version>2.14.1-313.v504cdd45c18b</jackson2-api.version>
</properties>

<name>Jenkins Job Cacher plugin</name>
Expand Down Expand Up @@ -70,6 +71,12 @@
<version>${aws-java-sdk.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>jackson2-api</artifactId>
<version>${jackson2-api.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>aws-credentials</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ private S3Profile createS3Profile() {
return new S3Profile(lookupCredentials(), endpoint, region, signerVersion, pathStyleAccess, parallelDownloads);
}

@OptionalExtension(requirePlugins = {"aws-java-sdk", "aws-credentials"})
@OptionalExtension(requirePlugins = {"aws-java-sdk", "aws-credentials", "jackson2-api"})
public static final class DescriptorImpl extends ItemStorageDescriptor<S3ObjectPath> {

@NonNull
Expand Down Expand Up @@ -175,7 +175,7 @@ public ListBoxModel doFillSignerVersionItems() {
}
}

@OptionalExtension(requirePlugins = {"aws-java-sdk", "aws-credentials"})
@OptionalExtension(requirePlugins = {"aws-java-sdk", "aws-credentials", "jackson2-api"})
public static final class S3ItemListener extends ItemListener {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
import jenkins.plugins.itemstorage.ItemStorage;
import jenkins.plugins.itemstorage.ItemStorageDescriptor;
import jenkins.plugins.itemstorage.Messages;

import org.jenkinsci.plugins.variant.OptionalExtension;
import org.kohsuke.stapler.DataBoundConstructor;
import org.kohsuke.stapler.QueryParameter;
Expand Down Expand Up @@ -108,7 +107,7 @@ private S3Profile createS3Profile() {
return new S3Profile(lookupCredentials(), null, region, null, false, true);
}

@OptionalExtension(requirePlugins={"aws-java-sdk", "aws-credentials"})
@OptionalExtension(requirePlugins = {"aws-java-sdk", "aws-credentials", "jackson2-api"})
public static final class DescriptorImpl extends ItemStorageDescriptor<S3ObjectPath> {

@NonNull
Expand Down Expand Up @@ -137,7 +136,7 @@ public ListBoxModel doFillRegionItems() {
}
}

@OptionalExtension(requirePlugins={"aws-java-sdk", "aws-credentials"})
@OptionalExtension(requirePlugins = {"aws-java-sdk", "aws-credentials", "jackson2-api"})
public static final class S3ItemListener extends ItemListener {

@Override
Expand Down
25 changes: 4 additions & 21 deletions src/test/java/minio/MinioMcContainer.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
package minio;

import static java.lang.String.format;
import com.github.dockerjava.api.command.InspectContainerResponse;
import org.testcontainers.containers.GenericContainer;

import java.io.IOException;
import java.util.UUID;

import org.json.JSONObject;
import org.testcontainers.containers.GenericContainer;

import com.github.dockerjava.api.command.InspectContainerResponse;
import static java.lang.String.format;

public class MinioMcContainer extends GenericContainer<MinioMcContainer> {

Expand Down Expand Up @@ -43,7 +40,7 @@ public ExecResult execSecure(String command, Object... args) throws IOException,
}

public ExecResult exec(String command, Object... args) throws IOException, InterruptedException {
return execInContainer("/bin/sh", "-c", format(command, args));
return execInContainer("/bin/sh", "-c", format(command, args));
}

public void deleteBucket(String bucket) throws IOException, InterruptedException {
Expand All @@ -57,18 +54,4 @@ public void createBucket(String bucket) throws IOException, InterruptedException
public void createObject(String bucket, String key, String content) throws IOException, InterruptedException {
execSecure("echo -n \"%s\" | mc pipe test-minio/%s/%s", content, bucket, key);
}

public void createObject(String bucket, String key, int megabytes) throws IOException, InterruptedException {
execSecure("dd if=/dev/urandom of=tmp.rnd bs=1000000 count=%s", megabytes);
execSecure("mc cp tmp.rnd test-minio/%s/%s", bucket, key);
}

public void createObject(String bucket, String key) throws IOException, InterruptedException {
createObject(bucket, key, UUID.randomUUID().toString());
}

public long getBucketSize(String bucket) throws IOException, InterruptedException {
String result = execSecure(format("mc du --json test-minio/%s", bucket)).getStdout();
return Long.parseLong(new JSONObject(result).optString("size"));
}
}

0 comments on commit 382701e

Please sign in to comment.