Build: correct tarball copying to out folder and upload to s3

This commit is contained in:
BoykoAlex
2017-08-04 14:44:51 -04:00
parent f5e9f47a25
commit 5fcc93aea7
2 changed files with 18 additions and 1 deletions

View File

@@ -101,6 +101,14 @@ resources:
secret_access_key: {{s3_secretkey}}
region_name: {{s3_region}}
regexp: sts4/fatjars/snapshots/concourse-language-server-(.*).jar
- name: s3-atom-cf-manifest-yaml-snapshot
type: s3
source:
bucket: {{s3_bucket}}
access_key_id: {{s3_accesskey}}
secret_access_key: {{s3_secretkey}}
region_name: {{s3_region}}
regexp: sts4/atom/snapshots/(.*)cf-manifest-yaml-(.*).tgz
- name: snapshot-website
type: s3-multi
source:
@@ -491,3 +499,9 @@ jobs:
params:
text: |
Concourse ${BUILD_PIPELINE_NAME}/${BUILD_JOB_NAME}/${BUILD_NAME} has failed!
on_success:
aggregate:
- put: s3-atom-cf-manifest-yaml-snapshot
params:
file: out/*cf-manifest-yaml-*.tgz
acl: public-read

View File

@@ -27,10 +27,13 @@ node ./node_modules/bundle-deps/bundle-deps .
npm pack
ls *.tgz
timestamp=`date -u +%Y%m%d%H%M`
for i in `ls *.tgz`; do
basename=$(basename $i)
cp $i $output/${basename/SNAPSHOT/$timestamp}
length = ${#basename}
cp $i $output/${basename:0:$length-4}-$timestamp${basename:$length-4:$length}
done
ls -la $output