Using Jenkins for builds or continuous integration generates a lot of artifacts, such as rpm and deb packages and logs. You can preserve and share these artifacts while saving local disk space by publishing them your Swarm via the S3 protocol using the S3 Publisher Plugin.
Even better, this plugin can be configured to add extensive metadata to the published artifacts, allowing you to create Collections for e.g. all the .rpm artifacts from a successful integration test, or all the log files related to a particular source code branch.
archive.example.com
) and bucket (e.g. jenkins-artifacts
) to store your jenkins artifacts.https://jenkins-artifacts.archive.example.com/
on the jenkins machine and that it reaches your Content Gateway's S3 port. This "bucket in host" style access requires updating /etc/hosts
manually or having your DNS administrator configure a wildcard domain. You should configure s3cmd or rclone on your Jenkins server to verify your S3 token access, as these command-line tools are easier to diagnose.$ sudo mkdir -p /var/jenkins_home/caringo-s3-override/com/amazonaws/partitions/override
endpoints.json
and change the "archive.example.com" endpoint to your own domain.root@2822615d6c08:/# diff -u10 /original/endpoints.json /var/jenkins_home/caringo-s3-override/com/amazonaws/partitions/override/endpoints.json
--- /original/endpoints.json 2018-01-16 21:05:44.870469461 +0000
+++ /var/jenkins_home/caringo-s3-override/com/amazonaws/partitions/override/endpoints.json 2018-01-15 19:34:09.600137790 +0000
@@ -6,21 +6,21 @@
"protocols": [
"https"
],
"signatureVersions": [
"v4"
]
},
"dnsSuffix": "amazonaws.com",
"partition": "aws",
"partitionName": "AWS Standard",
- "regionRegex": "^(us|eu|ap|sa|ca)\\-\\w+\\-\\d+$",
+ "regionRegex": "^(caringo|us|eu|ap|sa|ca)\\-\\w+\\-\\d+$",
"regions": {
"ap-northeast-1": {
"description": "Asia Pacific (Tokyo)"
},
"ap-northeast-2": {
"description": "Asia Pacific (Seoul)"
},
"ap-south-1": {
"description": "Asia Pacific (Mumbai)"
},
@@ -52,20 +52,23 @@
"description": "US East (N. Virginia)"
},
"us-east-2": {
"description": "US East (Ohio)"
},
"us-west-1": {
"description": "US West (N. California)"
},
"us-west-2": {
"description": "US West (Oregon)"
+ },
+ "caringo": {
+ "description": "archive.example.com"
}
},
"services": {
"acm": {
"endpoints": {
"ap-northeast-1": {},
"ap-northeast-2": {},
"ap-south-1": {},
"ap-southeast-1": {},
"ap-southeast-2": {},
@@ -1391,20 +1394,27 @@
"s3",
"s3v4"
]
},
"us-west-2": {
"hostname": "s3.us-west-2.amazonaws.com",
"signatureVersions": [
"s3",
"s3v4"
]
+ },
+ "caringo": {
+ "hostname": "archive.example.com",
+ "signatureVersions": [
+ "s3",
+ "s3v4"
+ ]
}
},
"isRegionalized": true,
"partitionEndpoint": "us-east-1"
},
"sdb": {
"defaults": {
"protocols": [
"http",
"https"
-Xbootclasspath/a
"
option to make it use your new endpoints.json. You can do this by setting this environment variable globally or for the jenkins user, or by adding it to your Jenkins startup script: JAVA_OPTS="-Xms2g -Xmx2g -Xbootclasspath/a:/var/jenkins_home/caringo-s3-override"
**
" for all) and specify the destination bucket (e.g. "jenkins-artifacts") and choose the "caringo" Bucket Region.*.archive.example.com
" in addition to "archive.example.com
".An example S3 Publish action will be added to this KB soon, please let us know if you have any problems using this or suggestions for improving this KB. |
Related articles appear here based on the labels you select. Click to edit the macro and add or change labels.
|