@@ -32,42 +32,56 @@ Buildkite-managed Amazon S3 bucket, where they’re retained for six months.
3232
3333### Example
3434
35- $ buildkite-agent artifact upload "log/**/*.log"
35+ ``` shell
36+ $ buildkite-agent artifact upload " log/**/*.log"
37+ ```
3638
3739You can also upload directly to Amazon S3 if you' ; d like to host your own artifacts:
3840
39- $ export BUILDKITE_S3_ACCESS_KEY_ID=xxx
40- $ export BUILDKITE_S3_SECRET_ACCESS_KEY=yyy
41- $ export BUILDKITE_S3_DEFAULT_REGION=eu-central-1 # default is us-east-1
42- $ export BUILDKITE_S3_ACL=private # default is public-read
43- $ buildkite-agent artifact upload "log/**/*.log" s3://name-of-your-s3-bucket/$BUILDKITE_JOB_ID
41+ ``` shell
42+ $ export BUILDKITE_S3_ACCESS_KEY_ID=xxx
43+ $ export BUILDKITE_S3_SECRET_ACCESS_KEY=yyy
44+ $ export BUILDKITE_S3_DEFAULT_REGION=eu-central-1 # default is us-east-1
45+ $ export BUILDKITE_S3_ACL=private # default is public-read
46+ $ buildkite-agent artifact upload " log/**/*.log" s3://name-of-your-s3-bucket/$BUILDKITE_JOB_ID
47+ ```
4448
4549You can use Amazon IAM assumed roles by specifying the session token:
4650
47- $ export BUILDKITE_S3_SESSION_TOKEN=zzz
51+ ``` shell
52+ $ export BUILDKITE_S3_SESSION_TOKEN=zzz
53+ ```
4854
4955Or upload directly to Google Cloud Storage:
5056
51- $ export BUILDKITE_GS_ACL=private
52- $ buildkite-agent artifact upload "log/**/*.log" gs://name-of-your-gs-bucket/$BUILDKITE_JOB_ID
57+ ``` shell
58+ $ export BUILDKITE_GS_ACL=private
59+ $ buildkite-agent artifact upload " log/**/*.log" gs://name-of-your-gs-bucket/$BUILDKITE_JOB_ID
60+ ```
5361
5462Or upload directly to Artifactory:
5563
56- $ export BUILDKITE_ARTIFACTORY_URL=http://my-artifactory-instance.com/artifactory
57- $ export BUILDKITE_ARTIFACTORY_USER=carol-danvers
58- $ export BUILDKITE_ARTIFACTORY_PASSWORD=xxx
59- $ buildkite-agent artifact upload "log/**/*.log" rt://name-of-your-artifactory-repo/$BUILDKITE_JOB_ID
64+ ``` shell
65+ $ export BUILDKITE_ARTIFACTORY_URL=http://my-artifactory-instance.com/artifactory
66+ $ export BUILDKITE_ARTIFACTORY_USER=carol-danvers
67+ $ export BUILDKITE_ARTIFACTORY_PASSWORD=xxx
68+ $ buildkite-agent artifact upload " log/**/*.log" rt://name-of-your-artifactory-repo/$BUILDKITE_JOB_ID
69+ ```
6070
61- By default, symlinks to directories will not be explored when resolving the glob, but symlinks to files will be uploaded as the linked files.
62- To ignore symlinks to files use:
71+ By default, symlinks to directories will not be explored when resolving the glob, but symlinks to
72+ files will be uploaded as the linked files. To ignore symlinks to files use:
6373
64- $ buildkite-agent artifact upload --upload-skip-symlinks "log/**/*.log"
74+ ``` shell
75+ $ buildkite-agent artifact upload --upload-skip-symlinks " log/**/*.log"
76+ ```
6577
6678Note: uploading symlinks to files without following them is not supported.
6779If you need to preserve them in a directory, we recommend creating a tar archive:
6880
69- $ tar -cvf log.tar log/**/*
70- $ buildkite-agent upload log.tar
81+ ``` shell
82+ $ tar -cvf log.tar log/** /*
83+ $ buildkite-agent upload log.tar
84+ ```
7185
7286### Options
7387
0 commit comments