diff --git a/pom.xml b/pom.xml index e9e2e78..7c260be 100644 --- a/pom.xml +++ b/pom.xml @@ -20,7 +20,7 @@ org.jenkins-ci.plugins plugin - 4.24 + 4.47 - 2.222.4 + 2.319.3 1.0.0 1.32.1 20200213 1.18.24 - 8 Max none **/GoogleOAuthPluginTestSuite.class @@ -82,8 +80,8 @@ io.jenkins.tools.bom - bom-2.222.x - 887.vae9c8ac09ff7 + bom-2.319.x + 1607.va_c1576527071 pom import @@ -91,7 +89,7 @@ com.google.cloud libraries-bom - 20.9.0 + 26.1.1 pom import @@ -180,7 +178,7 @@ org.jenkins-ci.plugins oauth-credentials - 0.4 + 0.5 diff --git a/src/main/java/com/google/jenkins/plugins/credentials/oauth/GoogleRobotMetadataCredentials.java b/src/main/java/com/google/jenkins/plugins/credentials/oauth/GoogleRobotMetadataCredentials.java index 36cc2b6..de3e146 100644 --- a/src/main/java/com/google/jenkins/plugins/credentials/oauth/GoogleRobotMetadataCredentials.java +++ b/src/main/java/com/google/jenkins/plugins/credentials/oauth/GoogleRobotMetadataCredentials.java @@ -26,11 +26,11 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; import com.google.jenkins.plugins.util.ExecutorException; +import edu.umd.cs.findbugs.annotations.Nullable; import hudson.Extension; import java.io.IOException; import java.security.GeneralSecurityException; import java.util.List; -import javax.annotation.Nullable; import org.kohsuke.stapler.DataBoundConstructor; /** diff --git a/src/main/java/com/google/jenkins/plugins/credentials/oauth/GoogleRobotPrivateKeyCredentials.java b/src/main/java/com/google/jenkins/plugins/credentials/oauth/GoogleRobotPrivateKeyCredentials.java index f411191..b5fd513 100644 --- a/src/main/java/com/google/jenkins/plugins/credentials/oauth/GoogleRobotPrivateKeyCredentials.java +++ b/src/main/java/com/google/jenkins/plugins/credentials/oauth/GoogleRobotPrivateKeyCredentials.java @@ -22,13 +22,13 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableList; import edu.umd.cs.findbugs.annotations.NonNull; +import edu.umd.cs.findbugs.annotations.Nullable; import hudson.Extension; import java.io.FileInputStream; import java.io.IOException; import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; -import javax.annotation.Nullable; import jenkins.model.Jenkins; import org.kohsuke.stapler.DataBoundConstructor; diff --git a/src/main/java/com/google/jenkins/plugins/credentials/oauth/JsonServiceAccountConfig.java b/src/main/java/com/google/jenkins/plugins/credentials/oauth/JsonServiceAccountConfig.java index 4bd57cd..b0778b0 100644 --- a/src/main/java/com/google/jenkins/plugins/credentials/oauth/JsonServiceAccountConfig.java +++ b/src/main/java/com/google/jenkins/plugins/credentials/oauth/JsonServiceAccountConfig.java @@ -19,6 +19,7 @@ import com.google.api.client.json.jackson2.JacksonFactory; import com.google.api.client.util.PemReader; import com.google.api.client.util.Strings; +import edu.umd.cs.findbugs.annotations.CheckForNull; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import hudson.Extension; import java.io.ByteArrayInputStream; @@ -31,7 +32,6 @@ import java.security.spec.PKCS8EncodedKeySpec; import java.util.logging.Level; import java.util.logging.Logger; -import javax.annotation.CheckForNull; import jenkins.model.Jenkins; import org.apache.commons.fileupload.FileItem; import org.kohsuke.accmod.Restricted; diff --git a/src/main/java/com/google/jenkins/plugins/credentials/oauth/P12ServiceAccountConfig.java b/src/main/java/com/google/jenkins/plugins/credentials/oauth/P12ServiceAccountConfig.java index 7cde5ff..13ec16f 100644 --- a/src/main/java/com/google/jenkins/plugins/credentials/oauth/P12ServiceAccountConfig.java +++ b/src/main/java/com/google/jenkins/plugins/credentials/oauth/P12ServiceAccountConfig.java @@ -17,6 +17,7 @@ import com.cloudbees.plugins.credentials.SecretBytes; import com.google.api.client.util.Strings; +import edu.umd.cs.findbugs.annotations.CheckForNull; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import hudson.Extension; import java.io.ByteArrayInputStream; @@ -30,7 +31,6 @@ import java.security.cert.CertificateException; import java.util.logging.Level; import java.util.logging.Logger; -import javax.annotation.CheckForNull; import jenkins.model.Jenkins; import org.apache.commons.fileupload.FileItem; import org.apache.commons.io.IOUtils; diff --git a/src/main/java/com/google/jenkins/plugins/credentials/oauth/RemotableGoogleCredentials.java b/src/main/java/com/google/jenkins/plugins/credentials/oauth/RemotableGoogleCredentials.java index fa06732..5cd246b 100644 --- a/src/main/java/com/google/jenkins/plugins/credentials/oauth/RemotableGoogleCredentials.java +++ b/src/main/java/com/google/jenkins/plugins/credentials/oauth/RemotableGoogleCredentials.java @@ -21,6 +21,7 @@ import com.google.api.client.auth.oauth2.Credential; import com.google.api.client.googleapis.auth.oauth2.GoogleCredential; import com.google.common.collect.Ordering; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.io.IOException; import java.security.GeneralSecurityException; import org.joda.time.DateTime; @@ -42,6 +43,9 @@ final class RemotableGoogleCredentials extends GoogleRobotCredentials { * is {@code package-private}. This should only be called from {@link * GoogleRobotCredentials#forRemote}. */ + @SuppressFBWarnings( + value = "NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE", + justification = "False positive from what I can see in Ordering.natural().nullsFirst()") public RemotableGoogleCredentials( GoogleRobotCredentials credentials, GoogleOAuth2ScopeRequirement requirement, diff --git a/src/main/java/com/google/jenkins/plugins/credentials/oauth/ServiceAccountConfig.java b/src/main/java/com/google/jenkins/plugins/credentials/oauth/ServiceAccountConfig.java index 73add7c..ed42dd0 100644 --- a/src/main/java/com/google/jenkins/plugins/credentials/oauth/ServiceAccountConfig.java +++ b/src/main/java/com/google/jenkins/plugins/credentials/oauth/ServiceAccountConfig.java @@ -17,6 +17,7 @@ import com.cloudbees.plugins.credentials.SecretBytes; import com.google.common.base.Strings; +import edu.umd.cs.findbugs.annotations.CheckForNull; import hudson.model.Describable; import java.io.File; import java.io.IOException; @@ -24,7 +25,6 @@ import java.security.PrivateKey; import java.util.logging.Level; import java.util.logging.Logger; -import javax.annotation.CheckForNull; import jenkins.model.Jenkins; import org.apache.commons.io.FileUtils; diff --git a/src/main/resources/index.jelly b/src/main/resources/index.jelly new file mode 100644 index 0000000..4c85a0d --- /dev/null +++ b/src/main/resources/index.jelly @@ -0,0 +1,4 @@ + +
+ This plugin implements the OAuth Credentials interfaces to surface Google Service Account credentials to Jenkins. +