Skip to content
This repository has been archived by the owner on Feb 2, 2021. It is now read-only.

Commit

Permalink
feat: extracted w/ improvements from iris-backend
Browse files Browse the repository at this point in the history
  • Loading branch information
coderbyheart committed Mar 16, 2019
0 parents commit 40a00d4
Show file tree
Hide file tree
Showing 19 changed files with 6,006 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# editorconfig.org
root = true

[*]
indent_size = 2
indent_style = space
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dist/
node_modules/
npm-debug.log
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"parser": "typescript",
"singleQuote": true,
"trailingComma": "all"
}
28 changes: 28 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Copyright (c) 2019, Nordic Semiconductor ASA
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

3. Neither the name of Nordic Semiconductor ASA nor the names of its
contributors may be used to endorse or promote products derived from this
software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Package Layered Lambdas

[![Build Status](https://codebuild.us-east-1.amazonaws.com/badges?uuid=eyJlbmNyeXB0ZWREYXRhIjoidDJRd29PcytxMjJSRzlPSXdYTTlyYmphZjhEWFFwRndaaWxBNldVZXdEREJZZVhobmN5aWNqRVNLeFpOck5DZjVKZURnSm03cHVnZFJIN2tDQm9FZVR3PSIsIml2UGFyYW1ldGVyU3BlYyI6IjdkaTZ6dkZWdXg4WDQ3WXYiLCJtYXRlcmlhbFNldFNlcmlhbCI6MX0%3D&branch=saga)](https://console.aws.amazon.com/codesuite/codebuild/projects/package-layered-lambdas/history?region=us-east-1)

Packages lambdas with intra-project dependencies using Webpack and a base layer with the dependencies defined in `package.json`.

Checksums are created for dependencies per lambda so that rebuild only happens when files are changed.

Packaged lambdas are published to S3 so they can be picked up from CloudFormation and shared also cached for other developers.
19 changes: 19 additions & 0 deletions buildspec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
version: 0.2
phases:
install:
commands:
- echo "updating git ..."; apt-get update; apt-get install -y python-software-properties software-properties-common; add-apt-repository ppa:git-core/ppa; apt-get update; apt-get install -y git
- echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
- echo "machine github.com login ${GH_USERNAME} password ${GH_TOKEN}" > ~/.netrc
- npm install -g npm@
- export GK_LOCK_DEFAULT_BRANCH=saga
- npm i -g greenkeeper-lockfile@2
- npx greenkeeper-lockfile-update
- npm ci --no-audit
build:
commands:
- node -e 'const {version} = require("./package.json"); if(version !== "0.0.0-development") { console.error("\033[0;31mversion in package.json must be 0.0.0-development, but is " + version + "!\033[0m"); process.exit(1); }'
- npm run lint
- npx tsc
- npx greenkeeper-lockfile-upload
- npm i semantic-release; npx semantic-release || true
1 change: 1 addition & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = {extends: ['@commitlint/config-angular']}
Loading

0 comments on commit 40a00d4

Please sign in to comment.