Repository navigation
Expand file tree
/
Copy path.travis.yml
More file actions
49 lines (47 loc) · 1.53 KB
/
Copy path.travis.yml
File metadata and controls
49 lines (47 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
language: node_js
node_js: lts/boron
sudo: false
dist: trusty
cache: yarn
env:
- FORCE_COLOR=1
before_install:
- |
if [ -n "$TRAVIS_BRANCH" ]; then
LOWER=${TRAVIS_BRANCH,,}
export CFN_S3_PREFIX="branch-${LOWER//[^a-z0-9]}"
fi
if [ -n "$TRAVIS_TAG" ]; then
LOWER=${$TRAVIS_TAG,,}
export CFN_S3_PREFIX="tag-${LOWER//[^a-z0-9]}"
fi
export STACK_NAME="${TRAVIS_REPO_SLUG//[^-a-zA-Z]/-}-$CFN_S3_PREFIX"
export BUCKET_PREFIX="${STACK_NAME:0:59}"
export SOURCE_BUCKET="$BUCKET_PREFIX-src"
export DESTINATION_BUCKET="$BUCKET_PREFIX-dst"
export FFMPEG_ARGS=$'-c:a copy -vf scale=\'min(320\\,iw):-2\' -movflags +faststart -metadata description=http://my.site/$KEY_PREFIX.mp4 out.mp4 -vf thumbnail -vf scale=\'min(320\\,iw):-2\' -vframes 1 out.png'
export USE_GZIP=false
export MIME_TYPES='{"png":"image/png","mp4":"video/mp4"}'
export VIDEO_MAX_DURATION='30'
- curl -o- -L https://yarnpkg.com/install.sh | bash
before_script:
- yarn global add gulp
script:
- yarn test
- gulp aws:default
- yarn run test-integration
- gulp aws:deleteStack
after_success:
- cp dist.zip $TRAVIS_BUILD_DIR/lambda.zip
- cp platform/aws/cloudformation.json $TRAVIS_BUILD_DIR/cloudformation.template
deploy:
provider: releases
api_key:
secure: puFiceSPSkmj00qkFWWKryxMEbT5Ok3rUA74cps5OGlqHlNnNFGpwa87n2T21/xWNE2zRMbago/qE00BOxR8kq+an64y8OATO3Y54nXLsROBD+AydBMNa20EzDZV4dpesI/F7UlsTFCyts5ozAZ1mVW3Tz3W1QY0RC0t1GAUkTA=
file:
- lambda.zip
- cloudformation.template
skip_cleanup: true
on:
tags: true
repo: binoculars/aws-lambda-ffmpeg