Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial external release #1

Merged
merged 36 commits into from
May 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
2db0565
Initial external release: repository skelaton
May 30, 2018
97b24d9
aws-cdk: Initial external release
May 30, 2018
58a45ea
aws-cdk-cx-api: Initial external release
May 30, 2018
4d7d88b
aws-cdk-toolkit: Initial external release
May 30, 2018
dc44bef
aws-cdk-util: Initial external release
May 30, 2018
43f42d0
cfn2ts + aws-cdk-resources: Initial external release
May 30, 2018
9bef41b
aws-cdk-rtv: Initial external release
May 30, 2018
07924bc
aws-cdk-custom-resources: Initial external release
May 30, 2018
e5ab03c
aws-cdk-applet-js: Initial external release
May 30, 2018
25697da
aws-cdk-assert: Initial external release
May 30, 2018
f400b9b
simple-resource-bundler: Initial external release
May 30, 2018
160a175
pkglint: Initial external release
May 30, 2018
8f0e59c
pkgtools: Initial external release
May 30, 2018
cf988d1
aws-cdk-iam: Initial external release
May 30, 2018
97dfb5d
aws-cdk-events: Initial external release
May 30, 2018
4b8d001
aws-cdk-route53: Initial external release
May 30, 2018
41f747d
aws-cdk-s3: Initial external release
May 30, 2018
d283d51
aws-cdk-rds: Initial external release
May 30, 2018
4b6f328
aws-cdk-sns: Initial external release
May 30, 2018
e5bc11c
aws-cdk-codebuild: Initial external release
May 30, 2018
8ca6b9c
aws-cdk-codecommit: Initial external release
May 30, 2018
5b061af
aws-cdk-codepipeline: Initial external release
May 30, 2018
181dd68
aws-cdk-lambda: Initial external release
May 30, 2018
5adf048
aws-cdk-sqs: Initial external release
May 30, 2018
29816af
aws-cdk-quickstarts: Initial external release
May 30, 2018
e9b13a6
aws-cdk-cloudtrail: Initial external release
May 30, 2018
c964172
aws-cdk-kms: Initial external release
May 30, 2018
e9c0b59
aws-cdk-neptune: Initial external release
May 30, 2018
1906f76
aws-cdk-java: Initial external release
May 30, 2018
c3fe663
aws-cdk-all: Initial external release
May 30, 2018
aabb6e8
docs: Initial external release
May 30, 2018
5bfd757
examples: Initial external release
May 30, 2018
0847a43
Bundle jsii-0.4.0
May 30, 2018
284177d
aws-cdk-acm: Initial external release
May 30, 2018
9b34fe8
aws-cdk-dynamodb: Initial external release
May 30, 2018
4168f10
aws-cdk-ec2: Initial external release
May 30, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
69 changes: 69 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
node_modules
lerna-debug.log
*.js


# Created by https://www.gitignore.io/api/node

### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Typescript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env


# End of https://www.gitignore.io/api/node
91 changes: 89 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,89 @@
# aws-cdk-js
The AWS CDK is a rich class library for building services on top of the AWS Cloud. CfnObjects is the base layer of the CDK, providing language bindings to CloudFormation resources.
# AWS Cloud Development Kit (AWS CDK)

The **AWS Cloud Development Kit (AWS CDK)** is a software development framework
for defining cloud infrastructure in code.

# Development Environment

This is a monorepo which uses [lerna](https://github.com/lerna/lerna).

The CDK depends on [jsii](https://github.com/awslabs/jsii), which is still not
published to npm. Therefore, the jsii tarballs are checked-in to this repository
under `./local-npm` and the install script will install them in the repo-global
node_modules directory.

## Prerequisites

Since this repo produces artifacts for multiple programming languages using
__jsii__, it relies on the following toolchains:

- [Node.js 8.11.0](https://nodejs.org/download/release/v8.11.0/)
- [Java OpenJDK 8](http://openjdk.java.net/install/)
- [.NET Core 2.0](https://www.microsoft.com/net/download)
- [Python 3.6.5](https://www.python.org/downloads/release/python-365/)
- [Ruby 2.5.1](https://www.ruby-lang.org/en/news/2018/03/28/ruby-2-5-1-released/)

When building on CodeBuild, these toolchains are all included in the
[superchain](https://github.com/awslabs/superchain) docker image. This image can
also be used locally as follows:

```shell
docker pull 260708760616.dkr.ecr.us-east-1.amazonaws.com/superchain:latest
docker run --net=host -it -v $PWD:$PWD -w $PWD superchain
```

This will get you into an interactive docker shell. You can then run
./install.sh and ./build.sh as described below.

## Bootstrapping

1. Clone this repository (or run `git clean -fdx` to clean up all build artifacts).
2. Run `./install.sh` - this will install all repo-level dependencies, including
`lerna` and the unpublished modules from local-npm.
3. Run `./build.sh` - this will invoke `lerna bootstrap` and `lerna run test`.
All external dependencies will be installed and internal deps will be
cross-linked.

## Development Iteration

After you've bootstrapped the repo, you would probably want to work on individual packages.

All packages in the repo have a two useful scripts: `prepare` and `watch`. In order to execute
these scripts, use `lerna run --stream --scope <package> <script>`.

> The reason you can't use "npm" is because dev tools are installed at the repository level
> and they are needed in the PATH when executing most of the package scripts.

A useful shell alias would use the directory name as a scope:

```bash
# add to your ~/.zshrc or ~/.bashrc
alias lr='lerna run --stream --scope $(basename $PWD)'

# more sugar
alias lw='lr watch &'
alias lp='lr prepare'
```

Then, you could just go into any of the package directories and use "lr" to run scripts. For example:

```bash
cd packages/aws-cdk-s3
lr watch
```

## Package Linter

The `pkglint` tool normalizes all packages in the repo. It verifies package.json
is normalized and adheres to the set of rules. To evaluate (and potentially fix)
all package linting issues in the repo, run the following command from the root
of the repository (after boostrapping):

```bash
npm run pkglint
```

## Updating jsii

Run `./pack.sh` in the jsii repository and copy the tarballs to `./local-npm`.
Make sure all tarballs are defined in the root `package.json`.
18 changes: 18 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash
set -euo pipefail

if [ ! -d node_modules ]; then
/bin/bash ./install.sh
fi

export PATH=node_modules/.bin:$PATH

echo "============================================================================================="
echo "boostrapping..."
lerna bootstrap --loglevel=debug

echo "============================================================================================="
echo "testing..."
lerna run test --stream


10 changes: 10 additions & 0 deletions buildspec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 0.2

phases:
install:
commands:
- /bin/bash ./install.sh
build:
commands:
- /bin/bash ./build.sh

Loading