File tree Expand file tree Collapse file tree 4 files changed +20
-21
lines changed
Expand file tree Collapse file tree 4 files changed +20
-21
lines changed Original file line number Diff line number Diff line change 11# s3put
22
3- Upload a file to a s3 bucket .
3+ [ Wercker ] step to upload a file to [ Amazon S3 ] .
44
55You can use application and deployment variables in wercker.
66
7- View this step in the [ wercker directory] ( #TODO )
7+ View this step in the [ wercker directory] [ wd ]
88
99Current status on wercker:
1010
11- TODO
11+ [ ![ wercker status ] ( https://app.wercker.com/status/576477b5c41a585aa848dbcc6bfe58f9/m " wercker status ")] ( https://app.wercker.com/project/bykey/576477b5c41a585aa848dbcc6bfe58f9 )
1212
1313## Options
1414
1515* ` key-id ` (required) The Amazon Access key that will be used for authorization.
1616* ` key-secret ` (required) The Amazon Access secret that will be used for authorization.
17- * ` bucket-url ` (required) The url of the bucket to sync to, like: ` s3://born2code.net `
18- * ` source-file ` (required) The local file to upload to s3.
19- * ` dest-file ` (required) The name of the file to upload to.
17+ * ` url ` (required) The S3 URL denoting the file's destination.
18+ * ` file ` (required) The name of the file to upload to.
2019
2120## Example
2221
2322 - s3put:
2423 key-id: $KEY
2524 key-secret: $SECRET
26- bucket-url: $BUCKET
27- source-file: myproject-0.1.0.tar.gz
28- dest-file: myproject-latest.tar.gz
25+ file: myproject-0.1.0.tar.gz
26+ url: s3://mybucket/myproject-latest.tar.gz
27+
28+ [ Wercker ] : http://wercker.com
29+ [ Amazon S3 ] : http://aws.amazon.com/s3
30+ [ wd ] : https://app.wercker.com/#applications/5290b7c2f0bb53d73e00a03c/tab/details
Original file line number Diff line number Diff line change 1111 fail ' missing or empty option key_secret, please check wercker.yml'
1212fi
1313
14- if [ ! -n " $WERCKER_S3PUT_BUCKET_URL " ]
14+ if [ ! -n " $WERCKER_S3PUT_URL " ]
1515then
1616 fail ' missing or empty option bucket_url, please check wercker.yml'
1717fi
1818
19- if [ ! -n " $WERCKER_S3PUT_SOURCE_FILE " ]
19+ if [ ! -n " $WERCKER_S3PUT_FILE " ]
2020then
2121 fail ' missing or empty option source_file, please check wercker.yml'
2222fi
2323
24- if [ ! -n " $WERCKER_S3PUT_DEST_FILE " ]
25- then
26- fail ' missing or empty option dest_file, please check wercker.yml'
27- fi
2824
2925if ! type s3cmd & > /dev/null ;
3026then
@@ -48,16 +44,13 @@ echo "access_key=$WERCKER_S3PUT_KEY_ID" >> .s3cfg
4844echo " secret_key=$WERCKER_S3PUT_KEY_SECRET " >> .s3cfg
4945debug " generated .s3cfg for key $WERCKER_S3PUT_KEY_ID "
5046
51- source_file=" $WERCKER_ROOT /$WERCKER_S3PUT_SOURCE_FILE "
52- dest_file=" $WERCKER_S3PUT_BUCKET_URL /$WERCKER_S3PUT_DEST_FILE "
53-
5447info ' starting s3 upload'
5548
5649# TODO make public an option
5750
5851set +e
59- debug " s3cmd put --acl-public --verbose '$source_file ' '$dest_file '"
60- sync_output=$( s3cmd sync --acl-public --verbose " $source_file " " $dest_file " )
52+ debug " s3cmd put --acl-public --verbose '$WERCKER_S3PUT_FILE ' '$WERCKER_S3PUT_URL '"
53+ sync_output=$( s3cmd put --acl-public --verbose " $WERCKER_S3PUT_FILE " " $WERCKER_S3PUT_URL " )
6154
6255if [[ $? -ne 0 ]]; then
6356 warning $sync_output
Original file line number Diff line number Diff line change 11name : s3put
2- version : 0.0.1
2+ version : 0.0.2
33description : s3put step
Original file line number Diff line number Diff line change 1+ box : default
2+ build :
3+ steps :
4+ - validate-wercker-step
You can’t perform that action at this time.
0 commit comments