Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
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
8 changes: 0 additions & 8 deletions .eslintignore

This file was deleted.

16 changes: 13 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {

Check failure on line 1 in .eslintrc.js

View workflow job for this annotation

GitHub Actions / Run-CDK-Tests (20.x)

'module' is not defined
env: {
browser: true,
es2021: true,
Expand Down Expand Up @@ -38,21 +38,31 @@
],
},
root: true,
plugins: [

Check failure on line 41 in .eslintrc.js

View workflow job for this annotation

GitHub Actions / Run-CDK-Tests (20.x)

Duplicate key 'plugins'
"@typescript-eslint/eslint-plugin",
"eslint-plugin-tsdoc"
],
extends: [
extends: [

Check failure on line 45 in .eslintrc.js

View workflow job for this annotation

GitHub Actions / Run-CDK-Tests (20.x)

Duplicate key 'extends'
'plugin:@typescript-eslint/recommended'
],
parser: '@typescript-eslint/parser',
parser: '@typescript-eslint/parser',

Check failure on line 48 in .eslintrc.js

View workflow job for this annotation

GitHub Actions / Run-CDK-Tests (20.x)

Duplicate key 'parser'
parserOptions: {

Check failure on line 49 in .eslintrc.js

View workflow job for this annotation

GitHub Actions / Run-CDK-Tests (20.x)

Duplicate key 'parserOptions'
project: "./tsconfig.json",
tsconfigRootDir: __dirname,

Check failure on line 51 in .eslintrc.js

View workflow job for this annotation

GitHub Actions / Run-CDK-Tests (20.x)

'__dirname' is not defined
ecmaVersion: 2018,
sourceType: "module"
},
rules: {

Check failure on line 55 in .eslintrc.js

View workflow job for this annotation

GitHub Actions / Run-CDK-Tests (20.x)

Duplicate key 'rules'
"tsdoc/syntax": "warn"
}
},
ignorePatterns: [
"npm_modules/",
"dist/",
"cdk.out/",
".eslintrc.js",
"package.json",
"package-lock.json",
"tsconfig.json",
"typedoc.json"
],
};
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,13 @@ The `cdk diff` command can be used to preview changes before deployment. This wi
You can use [`npm link`](https://docs.npmjs.com/cli/v10/commands/npm-link) to develop with a local copy of this repo.

### In this library repo:

```bash
npm install
```

### In your-project folder:

```bash
npm install
npm link ../aws4embeddedlinux-ci
Expand All @@ -65,7 +67,6 @@ or [set a node prefix](https://docs.npmjs.com/resolving-eacces-permissions-error
- When using AWS Cloud9 a micro instance type will run out of memory.
- Deletion of stacks while a CodePipeline is running can lead to unexpected failures.


## Security

See [SECURITY](SECURITY.md) for more information about reporting issues with this project.
Expand All @@ -79,10 +80,10 @@ source repos, etc.
1. Grant access permissions to the CodeBuild pipeline project.
11. Create a [Policy Statement](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iam.PolicyStatement.html) which allows `secretsmanager:GetSecretValue` for your secret.
11. Add this policy statement to the `buildPolicyAdditions` props for the `EmbeddedLinuxPipelineStack`. e.g.

```typescript
import * as iam from "aws-cdk-lib/aws-iam";


const pipeline = new EmbeddedLinuxPipelineStack(app, "MyPokyPipeline", {
imageRepo: buildImageRepo.repository,
imageTag: ImageKind.Ubuntu22_04,
Expand All @@ -100,6 +101,7 @@ const pipeline = new EmbeddedLinuxPipelineStack(app, "MyPokyPipeline", {

The secret can then be used in the CodeBuild Project by adding it to the BuildSpec. See
the [CodeBuild Documentation](https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html) for more details.

```yaml
env:
secrets-manager:
Expand Down
13 changes: 13 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import globals from "globals";
import pluginJs from "@eslint/js";
import tseslint from "typescript-eslint";


/** @type {import('eslint').Linter.Config[]} */
export default [
{files: ["**/*.{js,mjs,cjs,ts}"]},
{files: ["**/*.js"], languageOptions: {sourceType: "commonjs"}},
{languageOptions: { globals: globals.browser }},
pluginJs.configs.recommended,
...tseslint.configs.recommended,
];
4 changes: 2 additions & 2 deletions lib/build-image-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class BuildImageDataStack extends cdk.Stack {
*/
private createDeploymentBucket(bucketName: string): s3.IBucket {
const accessLoggingBucket = new s3.Bucket(this, 'LoggingBucket', {
versioned: false,
versioned: true,
enforceSSL: true,
autoDeleteObjects: true,
removalPolicy: RemovalPolicy.DESTROY,
Expand All @@ -51,7 +51,7 @@ export class BuildImageDataStack extends cdk.Stack {
// Create a bucket, then allow a deployment Lambda to upload to it.
const dataBucket = new s3.Bucket(this, 'BuildImageDataBucket', {
bucketName,
versioned: false,
versioned: true,
encryptionKey: encryptionKey,
enforceSSL: true,
serverAccessLogsBucket: accessLoggingBucket,
Expand Down
4 changes: 2 additions & 2 deletions lib/build-image-pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export class BuildImagePipelineStack extends cdk.Stack {
accessLoggingBucket = props.accessLoggingBucket;
} else {
accessLoggingBucket = new s3.Bucket(this, 'ArtifactAccessLogging', {
versioned: false,
versioned: true,
enforceSSL: true,
autoDeleteObjects: true,
removalPolicy: RemovalPolicy.DESTROY,
Expand All @@ -128,7 +128,7 @@ export class BuildImagePipelineStack extends cdk.Stack {
enableKeyRotation: true,
});
artifactBucket = new s3.Bucket(this, 'PipelineArtifacts', {
versioned: false,
versioned: true,
enforceSSL: true,
serverAccessLogsBucket: accessLoggingBucket,
serverAccessLogsPrefix: props.serverAccessLogsPrefix,
Expand Down
2 changes: 1 addition & 1 deletion lib/embedded-linux-codebuild-project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export class EmbeddedLinuxCodebuildProjectStack extends cdk.Stack {
accessLoggingBucket = props.accessLoggingBucket;
} else {
accessLoggingBucket = new s3.Bucket(this, "ArtifactAccessLogging", {
versioned: false,
versioned: true,
enforceSSL: true,
autoDeleteObjects: true,
removalPolicy: RemovalPolicy.DESTROY,
Expand Down
6 changes: 3 additions & 3 deletions lib/embedded-linux-pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export class EmbeddedLinuxPipelineStack extends cdk.Stack {
accessLoggingBucket = props.accessLoggingBucket;
} else {
accessLoggingBucket = new s3.Bucket(this, 'ArtifactAccessLogging', {
versioned: false,
versioned: true,
enforceSSL: true,
autoDeleteObjects: true,
removalPolicy: RemovalPolicy.DESTROY,
Expand Down Expand Up @@ -150,7 +150,7 @@ export class EmbeddedLinuxPipelineStack extends cdk.Stack {
outputBucket = props.outputBucket;
} else {
outputBucket = new s3.Bucket(this, 'PipelineOutput', {
versioned: false,
versioned: true,
enforceSSL: true,
serverAccessLogsBucket: accessLoggingBucket,
autoDeleteObjects: true,
Expand All @@ -169,7 +169,7 @@ export class EmbeddedLinuxPipelineStack extends cdk.Stack {
enableKeyRotation: true,
});
artifactBucket = new s3.Bucket(this, 'PipelineArtifacts', {
versioned: false,
versioned: true,
enforceSSL: true,
serverAccessLogsBucket: accessLoggingBucket,
encryptionKey,
Expand Down
Loading
Loading