Skip to content

Commit

Permalink
Add ci infrastructure
Browse files Browse the repository at this point in the history
Joe Snell committed Oct 9, 2020
1 parent cba1614 commit bbd75f7
Showing 9 changed files with 1,688 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .infrastructure/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
cdk.out
node_modules
12 changes: 12 additions & 0 deletions .infrastructure/app.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import * as cdk from '@aws-cdk/core';
import { Ci } from './stacks/ci';

const app = new cdk.App();

new Ci(app, 'lambda-extensions--parameter-store--infrastructure', {
env: {
account: '863125196191', // lambda-extensions account ID
region: 'us-east-1'
}
});

4 changes: 4 additions & 0 deletions .infrastructure/cdk.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"app": "npx ts-node app.ts",
"requireApproval": "never"
}
18 changes: 18 additions & 0 deletions .infrastructure/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "infrastructure",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"dependencies": {
"@aws-cdk/aws-codebuild": "^1.67.0",
"@aws-cdk/aws-iam": "^1.67.0",
"@aws-cdk/aws-lambda": "^1.67.0",
"@aws-cdk/core": "^1.67.0",
"aws-cdk": "^1.67.0"
},
"devDependencies": {
"@types/node": "^14.11.8",
"ts-node": "^9.0.0",
"typescript": "^4.0.3"
}
}
24 changes: 24 additions & 0 deletions .infrastructure/stacks/ci.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import * as cdk from '@aws-cdk/core';
import * as iam from '@aws-cdk/aws-iam';
import * as codebuild from '@aws-cdk/aws-codebuild';

export class Ci extends cdk.Stack {
constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) {
super(scope, id, props);

const appName = `lambda-extensions--parameter-store`

const prRole = new iam.Role(this, `PrRole`, {
roleName: `${appName}--pr`,
assumedBy: new iam.ServicePrincipal('codebuild.amazonaws.com')
});

new codebuild.Project(this, `PRs`, {
projectName: `${appName}--pr`,
role: prRole,
environment: {
buildImage: codebuild.LinuxBuildImage.AMAZON_LINUX_2_3
}
})
}
}
31 changes: 31 additions & 0 deletions .infrastructure/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"compilerOptions": {
"resolveJsonModule": true,
"target": "ES2018",
"module": "commonjs",
"lib": [
"es2018"
],
"declaration": true,
"strict": true,
"noImplicitAny": true,
"strictNullChecks": true,
"noImplicitThis": true,
"alwaysStrict": true,
"noUnusedLocals": false,
"noUnusedParameters": false,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": false,
"inlineSourceMap": true,
"inlineSources": true,
"experimentalDecorators": true,
"strictPropertyInitialization": false,
"typeRoots": [
"./node_modules/@types"
]
},
"exclude": [
"cdk.out",
"node_modules"
]
}
1,579 changes: 1,579 additions & 0 deletions .infrastructure/yarn.lock

Large diffs are not rendered by default.

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

phases:
install:
runtime-versions:
python: 3.8
build:
commands:
- cd languages/python
- bin/build
8 changes: 8 additions & 0 deletions languages/python/README.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,14 @@

This directory contains the source code for the python implementation of the [parameter store extension](/).

## Quick Start

To get started you can add the following arn as a layer to your lambda function:

```bash

```

## Development

This project uses [poetry](https://python-poetry.org/).

0 comments on commit bbd75f7

Please sign in to comment.