Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
325 commits
Select commit Hold shift + click to select a range
ef421bb
Change handler name
willfarrell Aug 2, 2017
a9d6046
Up the timeouts to 2min from 30sec
willfarrell Aug 2, 2017
6ef4599
Refactor promise
willfarrell Aug 2, 2017
d5927c4
Merge branch 'develop' into develop
benjaminwood Aug 10, 2017
4557462
Add note regarding command line flags
benjaminwood Aug 10, 2017
47b968d
Add note regarding command line flags
benjaminwood Aug 10, 2017
21ca65b
Capitalization fix in readme
benjaminwood Aug 10, 2017
4dbdba6
Merge pull request #38 from benjaminwood/develop
adieuadieu Aug 11, 2017
4d39e8b
chore: bump packages ava@0.22.0, babel-register@6.26.0, rollup@0.48.2…
adieuadieu Aug 27, 2017
d2dc3ec
chore: bump packages ava@0.22.0, babel-register@6.26.0, rollup@0.48.2…
adieuadieu Aug 27, 2017
adf9d07
chore (base): bump packages ava@0.22.0, babel-core@6.26.0, babel-poly…
adieuadieu Aug 27, 2017
dd161fd
Updates postinstall script and module to include NSS build.
qubyte Aug 29, 2017
b9a7d01
Adds NSS build.
qubyte Aug 29, 2017
720947a
Merge pull request #56 from qubyte/nss
adieuadieu Aug 29, 2017
558ae62
merge remote
adieuadieu Oct 20, 2017
b38ead9
chore: upgrade packages babel-eslint@8.0.1, babel-preset-env@1.6.1, c…
adieuadieu Oct 20, 2017
bb3a283
wip: automate headless-chromium-for-aws builds
adieuadieu Oct 20, 2017
56ab91e
Merge branch 'master' into develop
adieuadieu Oct 20, 2017
cbce9ba
add script to get latest stable chromium version
adieuadieu Oct 21, 2017
31cfd8e
wip: progress on automation, some cleanup
adieuadieu Oct 21, 2017
5d159a2
Merge branch 'develop' into feature/binary
adieuadieu Oct 21, 2017
cfbddd7
wip: progress on automated builds/release
adieuadieu Oct 21, 2017
cb1ac30
automated build and github release
adieuadieu Oct 21, 2017
99c6327
fixes and imporvements. whole flow works now.
adieuadieu Oct 21, 2017
5a46784
fix: test:docker package script
adieuadieu Oct 21, 2017
5dda3aa
Merge branch 'develop' into feature/binary
adieuadieu Oct 21, 2017
2c805f9
Merge pull request #37 from willfarrell/feature/binary
adieuadieu Oct 21, 2017
b3018d1
tweaks
adieuadieu Oct 21, 2017
88ef437
test: setup integration test in circleci (probably take 1)
adieuadieu Oct 22, 2017
fa1111a
test: ci tweak 1
adieuadieu Oct 22, 2017
438291c
test: ci tweak 2
adieuadieu Oct 22, 2017
8456257
test: ci tweak 3, switch to circlev2
adieuadieu Oct 22, 2017
e98b99c
test: ci tweak 4
adieuadieu Oct 22, 2017
1cd289e
test: ci tweak 5
adieuadieu Oct 22, 2017
6272e55
test: ci tweak 6
adieuadieu Oct 22, 2017
f1fe131
test: ci tweak 7
adieuadieu Oct 22, 2017
b0f7dc2
test: ci tweak 8
adieuadieu Oct 22, 2017
e40fc2b
test: ci tweak 9
adieuadieu Oct 22, 2017
aabcb51
test: ci tweak 10
adieuadieu Oct 22, 2017
16b7e53
test: ci tweak 11
adieuadieu Oct 22, 2017
9d05824
test: ci tweak 12
adieuadieu Oct 22, 2017
8dfac6f
updates/cleanup in serverless plugin
adieuadieu Oct 22, 2017
c215967
test: add integration test for serverless-plugin
adieuadieu Oct 22, 2017
b8129c9
docs(readme): clean up, tweaks, fix urls
adieuadieu Oct 22, 2017
19be5be
Update README.md
adieuadieu Oct 22, 2017
0c6b5b6
Update README.md
adieuadieu Oct 22, 2017
21a37f5
docs(readme): more tweaks
adieuadieu Oct 22, 2017
3685f97
fix: API Gateway has a 30 second timeout, so limit lambda execution t…
adieuadieu Oct 22, 2017
915b60c
chore (examples): bump example dependencies, cleanup
adieuadieu Oct 22, 2017
cb8c4b5
refactor (examples): clean up, rework, generally updating the example…
adieuadieu Oct 22, 2017
d5eaaf5
test: setup project-wide lint and testing in CircleCi
adieuadieu Oct 22, 2017
9bab20d
test: tweaks to CircleCi workflow
adieuadieu Oct 22, 2017
c8bc8e6
test: tweaks to CircleCi workflow 2
adieuadieu Oct 22, 2017
7101872
test: tweaks to CircleCi workflow 3
adieuadieu Oct 22, 2017
ec06269
test: tweaks to CircleCi workflow 4
adieuadieu Oct 22, 2017
c36578f
wip: get example working
adieuadieu Oct 22, 2017
5ce77d9
test: circleci build test 1
adieuadieu Oct 23, 2017
2c763d7
test: circleci build test 2
adieuadieu Oct 23, 2017
494b0fb
test: circleci build test 3
adieuadieu Oct 23, 2017
b36b586
test: circleci build test 4
adieuadieu Oct 23, 2017
491a28d
test: initial setup of automated scheduled release
adieuadieu Oct 23, 2017
663c545
test: progress on automated scheduled release
adieuadieu Oct 23, 2017
e8b23d2
test: progress on automated scheduled release 2
adieuadieu Oct 23, 2017
c09f962
feat: split chromium Docker stuff into a base and main build
adieuadieu Oct 25, 2017
f36d944
more docker
adieuadieu Oct 25, 2017
25a9aee
more docker
adieuadieu Oct 25, 2017
59677cb
more docker fun
adieuadieu Oct 26, 2017
9ac89d4
more docker..
adieuadieu Oct 26, 2017
5b8b12a
fix yaml derp
adieuadieu Oct 26, 2017
5a8a90b
fix yaml derp 2
adieuadieu Oct 26, 2017
7a12caa
fix yaml derp 3
adieuadieu Oct 26, 2017
e02428c
fix file exec permission derp
adieuadieu Oct 26, 2017
0c23f8d
circleci 1
adieuadieu Oct 26, 2017
7bca8fe
circleci 2
adieuadieu Oct 26, 2017
b4f884d
docker build 1
adieuadieu Oct 26, 2017
18fea48
circleci stuff 3
adieuadieu Oct 26, 2017
29f3a73
circleci stuff 4
adieuadieu Oct 26, 2017
a3d6762
circleci stuff 4, derp
adieuadieu Oct 26, 2017
f7fcbcd
circleci stuff 4, derp 2
adieuadieu Oct 26, 2017
435cec5
circleci stuff 4, derp 3
adieuadieu Oct 26, 2017
5b7cc14
circleci stuff 5
adieuadieu Oct 26, 2017
7cc6660
circleci stuff 6
adieuadieu Oct 26, 2017
e492374
circleci stuff 7
adieuadieu Oct 26, 2017
123d4d3
circleci stuff 8
adieuadieu Oct 26, 2017
6edc4fd
circleci stuff 9
adieuadieu Oct 26, 2017
e49351b
circleci stuff 10
adieuadieu Oct 26, 2017
a7e3f4a
circleci stuff 10
adieuadieu Oct 26, 2017
aac95e1
circleci stuff 10, derp 1
adieuadieu Oct 26, 2017
f01fd2c
[wip] circleci stuff 11
adieuadieu Oct 27, 2017
78ff89c
[wip] feat: build on AWS EC2
adieuadieu Nov 7, 2017
f6d0a8f
[wip] small tweaks, fixes to user-data script
adieuadieu Nov 7, 2017
772b7f4
[wip] further tweaks to user-data script
adieuadieu Nov 7, 2017
6b242fa
[wip] further tweaks to user-data script 2
adieuadieu Nov 7, 2017
8bf9610
[wip] further tweaks to user-data script 3
adieuadieu Nov 7, 2017
bfbe284
feat: add cloud-watch logging to ec2 build instance in cloudinit
adieuadieu Nov 8, 2017
b645aa0
fix path issue in build script
adieuadieu Nov 8, 2017
b3b7d5b
feat: abstract ec2-build, cleanup, tweaks, fixes
adieuadieu Nov 8, 2017
05313c6
tweaks to scripts—finally fully working
adieuadieu Nov 8, 2017
12aa737
rename role file for clarity
adieuadieu Nov 8, 2017
bcf787a
refactoring
adieuadieu Nov 9, 2017
1108c16
progress..
adieuadieu Nov 9, 2017
28b87a3
tweaks...
adieuadieu Nov 9, 2017
b1f21d8
config tweaks
adieuadieu Nov 10, 2017
7f70a98
small tweaks to postinstall script for lambda
adieuadieu Nov 11, 2017
80e5beb
docs: add a section on configuring the Chromium channel with NPM_CONF…
adieuadieu Nov 11, 2017
f993c55
tweaks to scripts for circle ci
adieuadieu Nov 11, 2017
6cb1159
circle-ci: enable the daily_build workflow with cron trigger
adieuadieu Nov 11, 2017
34caeb8
(lambda): bump some packages
adieuadieu Nov 13, 2017
0c1a65d
more continuous delivery scripting
adieuadieu Nov 13, 2017
e7855b1
1.0.0-7
adieuadieu Nov 13, 2017
55a27b9
v1.0.0-7
adieuadieu Nov 13, 2017
5c84c86
more continuous delivery scripting and testing
adieuadieu Nov 13, 2017
e5e05ae
docs: fix section about NPM_CONFIG_CHROMIUM_CHANNEL
adieuadieu Nov 13, 2017
5a6cf73
fix: try to fix circleci daily build docker image 1
adieuadieu Nov 14, 2017
176dbbd
fix: try to fix circleci daily build docker image 2
adieuadieu Nov 14, 2017
b97a3c5
fix: improve docker build error reporting
adieuadieu Nov 14, 2017
19a133b
fix: improve docker build error reporting 2
adieuadieu Nov 14, 2017
ec241ae
docs: quick tweaks
adieuadieu Nov 14, 2017
a50a263
docs: add some notes about circleci setup
adieuadieu Nov 15, 2017
a444ecc
circleci CD test 1
adieuadieu Nov 15, 2017
c8301d4
circleci CD test 2
adieuadieu Nov 15, 2017
395cff1
circleci CD test 3
adieuadieu Nov 15, 2017
76c89b1
circleci CD test 4
adieuadieu Nov 15, 2017
ccdbbda
circleci CD test 5
adieuadieu Nov 15, 2017
1e9f04f
circleci CD test 6
adieuadieu Nov 15, 2017
408d0dc
circleci CD test 7
adieuadieu Nov 15, 2017
def18ce
circleci CD test 7.2
adieuadieu Nov 15, 2017
bbd5243
circleci CD test 8
adieuadieu Nov 15, 2017
46bbac7
circleci CD test 9
adieuadieu Nov 15, 2017
dd9eca4
chore (chromium): bump stable channel version to 62.0.3202.94
botsimo Nov 15, 2017
3fd43a6
v1.0.0-13
botsimo Nov 15, 2017
7d40bbd
circleci CD test 10
adieuadieu Nov 15, 2017
7d816a1
chore (chromium): bump stable channel version to 62.0.3202.94
botsimo Nov 15, 2017
dfa2e35
v1.0.0-14
botsimo Nov 15, 2017
edd9c6b
circleci CD test 11
adieuadieu Nov 15, 2017
530a1b9
circleci CD test 11.1
adieuadieu Nov 15, 2017
8f1378d
circleci CD test 12
adieuadieu Nov 15, 2017
61fba5a
chore (chromium): bump stable channel version to 62.0.3202.94
botsimo Nov 15, 2017
5f8d680
v1.0.0-15
botsimo Nov 15, 2017
356be49
circleci CD test 13
adieuadieu Nov 15, 2017
6715148
chore (chromium): bump stable channel version to 62.0.3202.94
botsimo Nov 15, 2017
b9d52b4
v1.0.0-16
botsimo Nov 15, 2017
d9ff89b
circleci CD test 14
adieuadieu Nov 15, 2017
7eba4bb
circleci CD test 15
adieuadieu Nov 15, 2017
2dc913c
chore (chromium): bump stable channel version to 62.0.3202.94
botsimo Nov 15, 2017
a808b30
v1.0.0-17
botsimo Nov 15, 2017
2fc341e
circleci CD test 16
adieuadieu Nov 15, 2017
43c9394
chore (chromium): bump stable channel version to 62.0.3202.94
botsimo Nov 15, 2017
461202c
v1.0.0-18
botsimo Nov 15, 2017
018573f
circleci CD test 17
adieuadieu Nov 15, 2017
3782f7b
chore (chromium): bump stable channel version to 62.0.3202.94
botsimo Nov 15, 2017
112eb50
v1.0.0-19
botsimo Nov 15, 2017
27f2fd7
circleci CD test 18
adieuadieu Nov 15, 2017
0e7ed93
chore (chromium): bump stable channel version to 62.0.3202.94
botsimo Nov 15, 2017
359c09c
v1.0.0-20
botsimo Nov 15, 2017
c9a2856
circleci CD test 19
adieuadieu Nov 15, 2017
7ce3196
chore (chromium): bump stable channel version to 62.0.3202.94
botsimo Nov 15, 2017
53eb947
v1.0.0-21
botsimo Nov 15, 2017
b8a6bc0
fix
adieuadieu Nov 15, 2017
e765ce4
circleci CD test 20
adieuadieu Nov 15, 2017
03bba6f
cron tweak
adieuadieu Nov 15, 2017
a0493e5
Fix remove Chrome zip file after extract
Nov 16, 2017
ea8191f
cron tweak
adieuadieu Nov 16, 2017
4716051
Merge pull request #85 from frosty5689/fix-remove-chrome-zip-after-ex…
adieuadieu Nov 16, 2017
b81790d
chore (chromium): bump beta channel version to 63.0.3239.52
botsimo Nov 16, 2017
dcf941a
chore (chromium): bump stable channel version to 62.0.3202.94
botsimo Nov 16, 2017
450dcd8
v1.0.0-22
botsimo Nov 16, 2017
4394fe4
use npm run build instead of yarn build for CI simplicity reasons
adieuadieu Nov 16, 2017
6711bf5
circleci CD test 21
adieuadieu Nov 16, 2017
abefc1c
circleci CD test 22
adieuadieu Nov 16, 2017
54c0a83
chore (chromium): bump stable channel version to 62.0.3202.94
botsimo Nov 16, 2017
04a6000
v1.0.0-23
botsimo Nov 16, 2017
2ac4717
circleci CD test 23
adieuadieu Nov 16, 2017
4c5f362
chore (chromium): bump stable channel version to 62.0.3202.94
botsimo Nov 16, 2017
337861d
v1.0.0-24
botsimo Nov 16, 2017
192f133
circleci CD test 24
adieuadieu Nov 16, 2017
9b6b082
circleci CD test 25
adieuadieu Nov 16, 2017
9e2c52b
style: lint cleanup
adieuadieu Nov 16, 2017
de00274
circleci fixes 1
adieuadieu Nov 16, 2017
2b03244
chore (base): bump packages ava@0.23.0, babel-eslint@8.0.2, eslint@4.…
adieuadieu Nov 16, 2017
71a4158
circleci fixes 2
adieuadieu Nov 16, 2017
fe0149b
circleci tweaking 1
adieuadieu Nov 16, 2017
29a18a8
circleci tweaking 3
adieuadieu Nov 16, 2017
7183800
circleci tweaking 4
adieuadieu Nov 16, 2017
54e868c
circleci tweaking 5
adieuadieu Nov 16, 2017
8d04b3f
circleci tweaking 6
adieuadieu Nov 16, 2017
24dbf25
circleci tweaking 7
adieuadieu Nov 16, 2017
931d32d
circleci tweaking 8
adieuadieu Nov 16, 2017
1f2a7b5
circleci tweaking 9
adieuadieu Nov 16, 2017
a640d8d
chore (chromium): bump dev channel version to 64.0.3269.3
botsimo Nov 17, 2017
f7cf4c2
test related changes
adieuadieu Nov 17, 2017
5eb091d
test: try to fix localchrome issue in circleci
adieuadieu Nov 17, 2017
5c6ba22
test: try to fix localchrome issue in circleci 2
adieuadieu Nov 17, 2017
d2c5e2a
test: try to fix localchrome issue in circleci 3
adieuadieu Nov 17, 2017
dafd55b
lint and testing improvements
adieuadieu Nov 17, 2017
2cb057f
silence some noise
adieuadieu Nov 17, 2017
df00fd3
add missing tests
adieuadieu Nov 17, 2017
18f5878
circleci tweaks. so fun.
adieuadieu Nov 17, 2017
be30c9c
circleci CI/CD test 26
adieuadieu Nov 17, 2017
9f3e2e4
chore (chromium): bump stable channel version to 62.0.3202.94
botsimo Nov 17, 2017
4568947
fix: fix a typo/baka in update-browser script
adieuadieu Nov 17, 2017
05062a1
circleci CI/CD test 27
adieuadieu Nov 17, 2017
3f5c19f
chore (chromium): bump stable channel version to 62.0.3202.94
botsimo Nov 17, 2017
d7d22bd
v1.0.0-25
botsimo Nov 17, 2017
2622556
circleci tweak, try to trigger tag filter
adieuadieu Nov 17, 2017
efccbe6
circleci tag filter tweak/guess 1
adieuadieu Nov 17, 2017
397dbab
tag test
adieuadieu Nov 17, 2017
8f494d6
circleci tag filter tweak
adieuadieu Nov 17, 2017
93b71ce
circleci tag filter tweak 2
adieuadieu Nov 17, 2017
5ef4eab
circleci tag filter tweak 3
adieuadieu Nov 17, 2017
90e69a1
circleci tag filter tweak 4
adieuadieu Nov 17, 2017
b64a87f
circleci tag filter tweak 5
adieuadieu Nov 17, 2017
fdee9a8
circleci tweaking
adieuadieu Nov 17, 2017
dde4e97
circleci CI/CD test 28
adieuadieu Nov 17, 2017
65cadc0
chore (chromium): bump stable channel version to 62.0.3202.94
botsimo Nov 17, 2017
8afa685
v1.0.0-26
botsimo Nov 17, 2017
94930db
circleci cron tweak
adieuadieu Nov 17, 2017
fc94060
docs: small tweaks
adieuadieu Nov 17, 2017
0db442b
fix: missing dist files in lambda package
adieuadieu Nov 17, 2017
554de74
v1.0.0-27
adieuadieu Nov 17, 2017
56985d8
prepublish vs prepublishOnly is pretty annoying, especially given Cir…
adieuadieu Nov 17, 2017
2655bf4
yep. the circleci config file is getting out of control
adieuadieu Nov 17, 2017
c930611
uuuugggghhh
adieuadieu Nov 17, 2017
ae5a7ae
ffs
adieuadieu Nov 17, 2017
1473b85
😑 🔫
adieuadieu Nov 17, 2017
eecd12b
lint
adieuadieu Nov 17, 2017
a220196
sdfsdfsaf
adieuadieu Nov 17, 2017
ac046e2
did i fix everything?
adieuadieu Nov 17, 2017
e44d40e
v1.0.0-28
adieuadieu Nov 17, 2017
52f51a1
feat (serverless-plugin): add support for serverless-webpack compatib…
adieuadieu Nov 18, 2017
36ac10d
fix serverless-framework/aws examples, with binary support
adieuadieu Nov 18, 2017
5356e59
docs: tweak and linking
adieuadieu Nov 18, 2017
2c58ebb
fixes and improvements to screenshot example handler
adieuadieu Nov 18, 2017
9e3981a
cleanup and documentation
adieuadieu Nov 18, 2017
8a4aaa1
cleanup and documentation
adieuadieu Nov 18, 2017
04978d3
chore (lambda): bump package rollup@0.51.7
adieuadieu Nov 18, 2017
1c9c781
documentation improvements
adieuadieu Nov 18, 2017
3fd305e
doc: fix formatting
adieuadieu Nov 18, 2017
68d05ac
abstract in package sync script
adieuadieu Nov 18, 2017
4e332fb
add a symlink chrome -> packages/lambda/builds/chromium because there…
adieuadieu Nov 19, 2017
434a7b2
jk. that doesn't work on github as expected
adieuadieu Nov 19, 2017
f13edfd
add "this file moved" readme
adieuadieu Nov 19, 2017
13093f4
docs: document all the things.
adieuadieu Nov 19, 2017
4e2cb8c
feat: additional abstractions in aws build tooling
adieuadieu Nov 19, 2017
4046a0d
fixes/improvements in ec2-build automation scripts
adieuadieu Nov 19, 2017
f35793b
clean up, docs
adieuadieu Nov 19, 2017
528844a
fix example pdf handler
adieuadieu Nov 19, 2017
1cf5f71
fix example project version synchronisation
adieuadieu Nov 19, 2017
390e009
doc tweaks
adieuadieu Nov 19, 2017
d39119e
docs: section to chrome docs on instance specs
adieuadieu Nov 19, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
325 changes: 325 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,325 @@
version: 2

#
# Jobs
#

jobs:

# This job builds the base project directory (e.g. ~/package.json)
build:
docker:
- image: circleci/node:6.10.3
steps:
- checkout
- restore_cache:
key: dependency-cache-{{ checksum "package.json" }}
- run: npm install
- save_cache:
key: dependency-cache-{{ checksum "package.json" }}
paths:
- node_modules

# This job runs the lint tool on the whole repository
lint:
docker:
- image: circleci/node:8
steps:
- checkout
- restore_cache:
key: dependency-cache-{{ checksum "package.json" }}
- restore_cache:
key: dependency-cache-{{ checksum "packages/lambda/package.json" }}
- restore_cache:
key: dependency-cache-{{ checksum "packages/serverless-plugin/package.json" }}-{{ checksum "packages/serverless-plugin/integration-test/package.json" }}
- restore_cache:
key: dependency-cache-{{ checksum "examples/serverless-framework/aws/package.json" }}
- restore_cache:
key: build-cache-{{ .Revision }}-package-lambda
# need to set permissions on the npm prefix so that we can npm link packages
- run: sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}
- run: ./scripts/link-package.sh packages/serverless-plugin lambda
- run: npm run lint

# This job runs all of the unit tests in the repository
unit_test:
docker:
# Node 8 so we can avoid transpiling our tests
- image: circleci/node:8
# The unit tests require DevTools on localhost:9222
- image: adieuadieu/headless-chromium-for-aws-lambda:stable
steps:
- checkout
- restore_cache:
key: dependency-cache-{{ checksum "package.json" }}
- restore_cache:
key: dependency-cache-{{ checksum "packages/lambda/package.json" }}
- restore_cache:
key: dependency-cache-{{ checksum "packages/serverless-plugin/package.json" }}-{{ checksum "packages/serverless-plugin/integration-test/package.json" }}
- restore_cache:
key: dependency-cache-{{ checksum "examples/serverless-framework/aws/package.json" }}
- run:
name: Install Chromium for local development Launcher test
command: sudo apt-get install -y chromium
- run: npm run ava

# This job builds the @serverless-chrome/lambda package
build_lambda:
# use a machine because we extract binaries from Docker images
machine: true
steps:
- checkout
- restore_cache:
key: dependency-cache-{{ checksum "package.json" }}
- restore_cache:
key: dependency-cache-{{ checksum "packages/lambda/package.json" }}
- run:
name: Add chromium binary if missing
command: |
cd packages/lambda
if [ ! -f "dist/headless-chromium" ]; then
./scripts/package-binaries.sh chromium stable
cp dist/stable-headless-chromium dist/headless-chromium
fi
- run: cd packages/lambda && npm install
- save_cache:
key: dependency-cache-{{ checksum "packages/lambda/package.json" }}
paths:
- packages/lambda/node_modules
- packages/lambda/dist/headless-chromium
- packages/lambda/dist/stable-headless-chromium
- run: cd packages/lambda && npm run build
- save_cache:
key: build-cache-{{ .Revision }}-package-lambda
paths:
- packages/lambda/dist

# This job runs the @serverless-chrome/lambda package's integration tests
integration_test_lambda:
# use a machine because we run the integration tests with Docker (lambci/lambda)
machine: true
steps:
- checkout
- restore_cache:
key: dependency-cache-{{ checksum "package.json" }}
- restore_cache:
key: dependency-cache-{{ checksum "packages/lambda/package.json" }}
- restore_cache:
key: build-cache-{{ .Revision }}-package-lambda
- run:
name: Integration test
command: cd packages/lambda && npm test

# This job builds the serverless-plugin package
build_serverless_plugin:
docker:
- image: circleci/node:6.10.3
steps:
- checkout
- restore_cache:
key: dependency-cache-{{ checksum "package.json" }}
- restore_cache:
key: dependency-cache-{{ checksum "packages/serverless-plugin/package.json" }}-{{ checksum "packages/serverless-plugin/integration-test/package.json" }}
- restore_cache:
key: build-cache-{{ .Revision }}-package-lambda
# need to set permissions on the npm prefix so that we can npm link packages
- run: sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}
- run: ./scripts/link-package.sh packages/serverless-plugin lambda
- run: cd packages/serverless-plugin && npm install
- run: cd packages/serverless-plugin && npm run build
- save_cache:
key: build-cache-{{ .Revision }}-package-serverless-plugin
paths:
- packages/serverless-plugin/dist
- run: |
[ -z "$CIRCLE_TAG" ] || ./scripts/link-package.sh packages/serverless-plugin/integration-test lambda
- run: cd packages/serverless-plugin/integration-test && npm install
- save_cache:
key: dependency-cache-{{ checksum "packages/serverless-plugin/package.json" }}-{{ checksum "packages/serverless-plugin/integration-test/package.json" }}
paths:
- packages/serverless-plugin/node_modules
- packages/serverless-plugin/integration-test/node_modules

# This job runs the serverless-plugin package's integration tests
integration_test_serverless_plugin:
# use a machine because we run the integration tests with Docker (lambci/lambda)
machine: true
steps:
- checkout
- restore_cache:
key: dependency-cache-{{ checksum "package.json" }}
- restore_cache:
key: dependency-cache-{{ checksum "packages/serverless-plugin/package.json" }}-{{ checksum "packages/serverless-plugin/integration-test/package.json" }}
- restore_cache:
key: build-cache-{{ .Revision }}-package-lambda
- run:
name: Integration test
command: cd packages/serverless-plugin && npm test

# This job builds the serverless-framework AWS example service
build_serverless_example:
docker:
- image: circleci/node:6.10.3
steps:
- checkout
- restore_cache:
key: dependency-cache-{{ checksum "package.json" }}
- restore_cache:
key: dependency-cache-{{ checksum "examples/serverless-framework/aws/package.json" }}
- restore_cache:
key: build-cache-{{ .Revision }}-package-lambda
- restore_cache:
key: build-cache-{{ .Revision }}-package-serverless-plugin
# need to set permissions on the npm prefix so that we can npm link packages
- run: sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}
- run: ./scripts/link-package.sh packages/serverless-plugin lambda
- run: ./scripts/link-package.sh examples/serverless-framework/aws serverless-plugin
- run: cd examples/serverless-framework/aws && npm install
- save_cache:
key: dependency-cache-{{ checksum "examples/serverless-framework/aws/package.json" }}
paths:
- examples/serverless-framework/aws/node_modules

# This job checks for new versions of browsers (chromium)
# and updates the repository code when new docker images have been built
update_browser_versions:
docker:
- image: circleci/node:6.10.3
branch:
- master
steps:
- checkout
- run: scripts/update-browser-versions.sh

# This job handles release automation. Usually run when new binaries of
# browsers have been built. Only stable-channel binaries will trigger a git tag
# from which we make releases.
release:
# use a machine because we run Docker containers while preparing the release
machine: true
branch:
- master
steps:
- checkout
- restore_cache:
key: dependency-cache-{{ checksum "package.json" }}
- restore_cache:
key: dependency-cache-{{ checksum "packages/lambda/package.json" }}
- restore_cache:
key: dependency-cache-{{ checksum "packages/serverless-plugin/package.json" }}-{{ checksum "packages/serverless-plugin/integration-test/package.json" }}
# we need a newer version of NPM than is available by default, e.g. >=4
# because we make use of the "prepublishOnly" package.json script, which was introduces in npm@4
- run:
name: Update NPM
command: npm install -g npm@latest
- run: scripts/release.sh

# This step triggers builds of binaries when new versions are available
# The builds happen on AWS Spot Instances created by this step and are not run
# on CircleCI due to instance-size/build-time constraints there.
# AWS Spot Instances are configured by ~/aws/ec2-spot-instance-specification.json.
# On start up, the spot instances run the user-data script in ~/aws/user-data.sh.
# Using "amazonlinux:latest" image because it's easy to install aws-cli.
build_new_binaries:
docker:
- image: amazonlinux:latest
branch:
- master
steps:
- checkout
- run:
name: Install AWS CLI & JQ
command: yum install -y aws-cli jq
- run:
name: Build stable-channel Chromium
command: scripts/ci-daily.sh stable chromium
- run:
name: Build beta-channel Chromium
command: scripts/ci-daily.sh beta chromium
- run:
name: Build dev-channel Chromium
command: scripts/ci-daily.sh dev chromium


#
# Workflows
#

workflows:
version: 2

# Runs on every commit. The jobs install and build dependencies
# and also setup test environments and prerequisites for integration tests
# On tagged commits on master branch, the "release" job automates publishing
# of NPM packages and making a GitHub release. The release and npm packages are published
# by a bot account (botsimo).
build_test_release:
jobs:
- build

- build_lambda:
requires:
- build
- build_serverless_plugin:
requires:
- build_lambda
- build_serverless_example:
requires:
- build_serverless_plugin
- lint:
requires:
- build
- build_lambda
- build_serverless_plugin
- build_serverless_example
- unit_test:
requires:
- build
- build_lambda
- build_serverless_plugin
- build_serverless_example
- integration_test_lambda:
requires:
- build_lambda
- integration_test_serverless_plugin:
requires:
- build_serverless_plugin
- release:
filters:
branches:
only: master
requires:
- lint
- unit_test
- integration_test_lambda
- integration_test_serverless_plugin

# Runs daily at 08:00 UTC. The job checks for new versions of
# headless browsers (chromium) and creates an AWS spot-instance-request
# on which to compile/build any new versions.
# Takes about 2h10m for Chromium 64+ on c5.2xlarge
daily_build:
triggers:
- schedule:
cron: "0 8 * * *"
filters:
branches:
only:
- master
jobs:
- build_new_binaries

# Runs daily at 11:00 UTC. The job checks if any new versions of
# headless browsers (chromium) have been built and updates the repository
# code to point at any new versions. A new stable-channel version will
# trigger an automated release in the "release" job in the build_test_release workflow
daily_version_update:
triggers:
- schedule:
cron: "0 11 * * *"
filters:
branches:
only:
- master
jobs:
- update_browser_versions
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@ jspm_packages
# Optional REPL history
.node_repl_history

# package directories
node_modules
jspm_packages

# Serverless directories
.serverless


*.log
Expand All @@ -55,7 +60,9 @@ npm-debug.log
awsconfig.json
npm-debug.log
dump/
config.yml
config.json
/config.js
event.json
.build/
headless-chromium-amazonlinux-2017-03.zip
.eslintcache
27 changes: 16 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,25 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]
### Added
- @serverless-chrome/lambda NPM package from @adieuadieu
- @serverless-chrome/lambda will persist Chrome instance across container-reuse from @adieuadieu
- serverless-plugin-chrome NPM package for Serverless-framework from @adieuadieu
- CHANGELOG.md from @adieuadieu.
- Binary support in AWS Lambda/API Gateway example
- Build and release tooling shell scripts and Dockerfile's
- Integration tests and CircleCI setup
- Complete automation of build/test/release workflows
- serverless-plugin-chrome: support for limiting Chrome to only select service functions with the `custom.chrome.functions` parameter.
- @serverless-chrome/lambda NPM package
- serverless-plugin-chrome NPM package for Serverless-framework
- Lots of new and updated documentation
- CHANGELOG.md.

### Changed
- example Serverless-framework printToPdf function handler to use the Serverless plugin from @adieuadieu
- example Serverless-framework captureScreenshot function handler to use the Serverless plugin from @adieuadieu
- example Serverless-framework printToPdf function handler to use the Serverless plugin
- example Serverless-framework captureScreenshot function handler to use the Serverless plugin


## [0.5.0] - 2017-03-11, 2017-05-09
### Added
- Headless Chrome headless_shell binary version 60.0.3089.0 built for AWS Lambda from @adieuadieu
- Serverless-framework configuration for deploying to AWS Lambda from @adieuadieu
- sample printToPdf Lambda function handler from @adieuadieu
- sample captureScreenshot Lambda function handler from @adieuadieu
- Initial documentation in README.md from @adieuadieu
- Headless Chrome headless_shell binary version 60.0.3089.0 built for AWS Lambda
- Serverless-framework configuration for deploying to AWS Lambda
- sample printToPdf Lambda function handler
- sample captureScreenshot Lambda function handler
- Initial documentation in README.md
Loading