Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 1 addition & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ root = true
[*]
end_of_line = lf
insert_final_newline = true

[*.{js,json,yml}]
charset = utf-8
indent_style = space
indent_size = 2
tab_width = 2
20 changes: 19 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
node_modules
*.js
!jest.config.js
!.eslintrc.js
!.prettierrc.js

!lib/**/*.ts
!test/**/*.ts
*.d.ts

dist
node_modules

# yarn asset
yarn-install.log
.yarn
!.yarn/releases/
!.yarn/plugins/
!.yarn/versions/
!.yarn/sdks/
.pnp.*

# yarn asset
yarn-install.log
Expand Down
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"eslint.alwaysShowStatus": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"explorer.autoReveal": false
}
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ where **\<pipeline-id\>** can be one or more of the following:

Again, the created pipeline can be found in the AWS console under `Developer Tools > Pipeline - CodePipeline > Pipelines`.

> [!**NXP-IMX**]
> [!NOTE] **NXP-IMX**
>
> The deployed pipeline for **NXP-IMX** will not complete as you should first accept the EULA and update the `build.buildspec.yml` file accordingly. See the [IMX Yocto Users Guide](https://www.nxp.com/docs/en/user-guide/IMX_YOCTO_PROJECT_USERS_GUIDE.pdf) for more detail.
>
Expand All @@ -130,7 +130,7 @@ Again, the created pipeline can be found in the AWS console under `Developer Too
> Once you have adjusted the content, you can update and upload the zip back to Amazon S3, and the pipeline will restart.
>

> [!**Renesas**]
> [!NOTE] **Renesas**
>
> The deployed pipeline for **Renesas** will complete. However, it won't include the Multimedia and Graphics library and related Linux drivers. See the [Renesas](https://github.com/adadouche/aws4embeddedlinux-ci/blob/dev-adadouche/README.md#renesas) section for more detail.
> The source files are available in a S3 bucket that you can get with the following command:
Expand All @@ -142,7 +142,7 @@ Again, the created pipeline can be found in the AWS console under `Developer Too
> Once you have adjusted the content, you can update and upload the zip back to Amazon S3, and the pipeline will restart.
>

> [!**Custom Pipeline**]
> [!NOTE] **Custom Pipeline**
>
> When using the **Custom** pipeline, you will need to provide your own `build.buildspec.yml` file.
>
Expand All @@ -161,7 +161,7 @@ To deploy _all_ the example pipelines, you can use the CDK deploy command:
cdk deploy aws4el-ci-pipelines --require-approval never --concurrency 3
```

> [!*NOTE*]
> [!NOTE]
>
> `aws4el-ci-pipelines`is an empty stack that depends on the other stacks, so that if you deploy it, it will deploy the others.
>
Expand Down
3 changes: 0 additions & 3 deletions cdk/.eslintignore

This file was deleted.

22 changes: 0 additions & 22 deletions cdk/.eslintrc.js

This file was deleted.

27 changes: 16 additions & 11 deletions cdk/bin/app.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env node
import path = require("path");
import * as path from "path";

import * as cdk from "aws-cdk-lib";
import {
Expand Down Expand Up @@ -39,7 +39,7 @@ const pipelineResourcesStack = new PipelineResourcesStack(
{
...defaultProps,
resource_prefix: resource_prefix,
}
},
);

const baseImageStack = new EmbeddedLinuxCodePipelineBaseImageStack(
Expand All @@ -51,7 +51,7 @@ const baseImageStack = new EmbeddedLinuxCodePipelineBaseImageStack(
pipelineArtifactBucket: pipelineResourcesStack.pipelineArtifactBucket,
ecrRepository: pipelineResourcesStack.ecrRepository,
encryptionKey: pipelineResourcesStack.encryptionKey,
}
},
);

/**
Expand All @@ -66,7 +66,7 @@ new EmbeddedLinuxCodeBuildProjectStack(
ecrRepositoryImageTag: baseImageStack.ecrRepositoryImageTag,
vpc: pipelineResourcesStack.vpc,
encryptionKey: pipelineResourcesStack.encryptionKey,
}
},
);

/**
Expand Down Expand Up @@ -97,18 +97,23 @@ for (const projectType of projectTypes) {
pipelineArtifactPrefix: `pipeline-${projectType}`,
vpc: pipelineResourcesStack.vpc,
encryptionKey: pipelineResourcesStack.encryptionKey,
}
},
);
projectPipeline.addDependency(pipelineResourcesStack);
pipelines.addDependency(projectPipeline)
pipelines.addDependency(projectPipeline);
}

/**
* Create custom project pipeline.
*/
const projectType = ProjectType.Custom;

const sourceCustomPath : string = path.join(__dirname, "..", "source-repo", projectType);
const sourceCustomPath: string = path.join(
__dirname,
"..",
"source-repo",
projectType,
);
console.log(`Using custom source path: ${sourceCustomPath}`);

const projectPipeline = new EmbeddedLinuxCodePipelineStack(
Expand All @@ -125,11 +130,11 @@ const projectPipeline = new EmbeddedLinuxCodePipelineStack(
pipelineArtifactPrefix: `pipeline-${projectType}`,
vpc: pipelineResourcesStack.vpc,
encryptionKey: pipelineResourcesStack.encryptionKey,
sourceCustomPath : sourceCustomPath
}
sourceCustomPath: sourceCustomPath,
},
);
projectPipeline.addDependency(pipelineResourcesStack);
pipelines.addDependency(projectPipeline)
pipelines.addDependency(projectPipeline);

// Synthetize the app
app.synth();
app.synth();
105 changes: 105 additions & 0 deletions cdk/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
import typescriptEslintEslintPlugin from "@typescript-eslint/eslint-plugin";
import simpleImportSort from "eslint-plugin-simple-import-sort";
import tsdoc from "eslint-plugin-tsdoc";
import globals from "globals";
import tsParser from "@typescript-eslint/parser";
import path from "node:path";
import { fileURLToPath } from "node:url";
import eslintjs from "@eslint/js";
import eslintts from "typescript-eslint";
import { FlatCompat } from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

import { includeIgnoreFile } from "@eslint/compat";
const gitignorePath = path.resolve(__dirname, "..", ".gitignore");

const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: eslintjs.configs.recommended,
allConfig: eslintjs.configs.all,
});

export default [
...compat.extends(
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended"
),
...eslintts.configs.recommended,
{
...eslintjs.configs.recommended,
plugins: {
"@typescript-eslint": typescriptEslintEslintPlugin,
"simple-import-sort": simpleImportSort,
tsdoc,
},

languageOptions: {
globals: {
...globals.node,
...globals.jest,
},

parser: tsParser,
ecmaVersion: "latest",
sourceType: "module",

parserOptions: {
sourceType: "module",
project: "./tsconfig.eslint.json",
},
},

rules: {
"tsdoc/syntax": "warn",

"max-len": [
"error",
{
code: 150,
ignoreUrls: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
ignoreComments: true,
ignoreRegExpLiterals: true,
},
],

"prettier/prettier": [
"error",
{
singleQuote: false,
trailingComma: "all",
},
],

"@typescript-eslint/no-unused-vars": [
"error",
{
args: "all",
argsIgnorePattern: "^_",
caughtErrors: "all",
caughtErrorsIgnorePattern: "^_",
destructuredArrayIgnorePattern: "^_",
varsIgnorePattern: "^_",
ignoreRestSiblings: true,
},
],
},
ignores: [
"jest.config.js",
"package.json",
"package-lock.json",
"tsconfig.json",
"typedoc.json",
"/cdk.out/**",
"/dist/**",
"/docs/**",
"/test/**",
"/tmp/**",
],
},
includeIgnoreFile(gitignorePath),
];
Loading