在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):skhatri/gradle-s3-plugin开源软件地址(OpenSource Url):https://github.com/skhatri/gradle-s3-plugin开源编程语言(OpenSource Language):Groovy 71.2%开源软件介绍(OpenSource Introduction):Gradle S3 PluginThis plugin can be used to download files from S3 buckets. You can upload artifacts to S3 as well. The link configuration attribute can be used to create amz-website-redirect-location based redirects. Technically this is not a symbolic link, but it can behave like one when trying to reference same file from multiple locations. The plugin creates two tasks: s3UploadAs the name suggests, the s3Upload task can be used to upload a local file to a bucket with a given key name. s3DownloadSimilarly, the s3Download task can be used to download a given file from a chosen bucket to a local directory. The plugin uses a ProfileCredentialsProvider strategy to figure out AWS access and secret key. The name of the credentials profile to use when connecting to AWS can be specified by the awsProfile propterty. See com.github.skhatri.s3aws.client.S3Client for implementation. Pull requests are welcome if you want to modify to your needs. Plugin Configuration in your build.gradle
Using Upload Task to upload more artifacts
Then I can call "gradle uploadAppJar" to upload yet another artifact to S3. This can be useful, if uploading hash checksums of the artifacts. For instance, I can upload sha1 value of the artifact so my automated artifact deployment task could download checksum file first to decide whether downloading the big artifact is worth it.
Now, calling awsUpload will upload jar and the hash file. Downloading more than one artifactSimilarly, I can download more artifacts by simply creating ad-hoc Download task. I am downloading the previously uploaded sha1 file of the artifact using the task below.
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论