Closed domcar closed 5 years ago
Thanks for opening this - I can confirm that's the case. The mvn install
goal includes the verify
phase, which due to the inclusion of the maven-failsafe-plugins, runs the integration tests.
The integration tests expect that you've provided a valid GCP credential file with a specific name in a known location (see src/test/resources).
So the first choice would be to follow the setup instructions there. Alternatively, if you want to live a little more dangerously, you could run an alternate maven goal that doesn't include the verify
, like mvn package
.
Let me know if I can help answer questions on IT setup!
Hi @nblair thanks for your answer. Could you please tell me what the integration tests do (regarding gcs access)? Do they just check if the provided credentials are able to create a bucket and write to it?
Because in my case I will create the bucket and provide access only to this bucket. In the README is stated
will grant the plugin to create any Google Cloud Storage Buckets you require and administer
all of the objects within, but it will also have access to manage
any other Google Cloud Storage Buckets associated with the project.
and this is too much permissions for me. Anyway the targets get created and I am able to use the plugin to get a bucket as a blobstore. Thanks
Hi @domcar!
Could you please tell me what the integration tests do (regarding gcs access)?
The integration test for the blobstore:
integration-test-${UUID}
.The tests are super helpful if you plan on developing or making customizations. If you're just building the project with no plans for development, you can probably skip them.
and this is too much permissions for me
This is good feedback to hear. So far, I've been developing against a service account that has the Storage Admin for convenience. For day to day use, is that too much to require?
Thanks for the answer! Regarding the permissions, if the plugin or the tests must be able to create a bucket I think that is ok what you are doing. But for my project I will create the bucket myself and restrict the SA permissions only to the bucket, that's why the permissions are too much for me. Maybe it could be helpful to add the option to use an existing bucket with an existing sa?
I think it should work with just the Storage Object Creator
and Storage Object Viewer
roles, mind doing an experiment?
mvn clean package
.Storage Object Creator
and Storage Object Viewer
roles.The initialization code already tests to see if the bucket exists and skips the bucket create call if the bucket is already present. Let me know how it goes :)
@nblair Sorry I'm late to answer, I'll test it as soon as I can.
Another question, i saw that the AWS plugin was implemented upstream in the nexus image, do you know if this plugin is also going to be integrated?
Hey @domcar - the AWS S3 plugin did start the same way, as a plugin, then pulled upstream. We do have our eye on a similar path, but it's not scheduled currently in our roadmap.
Going to close the issue for now - feel free to re-open or create a new issue if you need more assistance, thanks!
Thanks for creating an issue! Please fill out this form so we can be sure to have all the information we need, and to minimize back and forth.
mvn clean install
but at the tests I receive several Errors like[ERROR] isWritable true for buckets created by the Integration Test(org.sonatype.nexus.blobstore.gcloud.internal.GoogleCloudBlobStoreIT) Time elapsed: 0.174 s <<< ERROR! java.lang.NullPointerException: Cannot invoke method stop() on null object at org.sonatype.nexus.blobstore.gcloud.internal.GoogleCloudBlobStoreIT.cleanup(GoogleCloudBlobStoreIT.groovy:99)