forked from AmadeusITGroup/otter
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ea4fecd
commit 6887ff0
Showing
33 changed files
with
885 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"$schema": "https://raw.githubusercontent.com/compodoc/compodoc/develop/src/config/schema.json", | ||
"name": "Pipeline", | ||
"output": "../../../generated-doc/pipeline", | ||
"tsconfig": "./tsconfig.doc.json", | ||
"assetsFolder": "../../../.attachments", | ||
"disableSourceCode": true, | ||
"disableDomTree": true, | ||
"disableTemplateTab": true, | ||
"disableStyleTab": true, | ||
"disableGraph": true, | ||
"disableCoverage": true, | ||
"disablePrivate": true, | ||
"disableProtected": true, | ||
"disableInternal": true, | ||
"disableLifeCycleHooks": true, | ||
"disableRoutesGraph": true, | ||
"disableSearch": false, | ||
"hideGenerator": true, | ||
"customFavicon": "../../../assets/logo/flavors/otter-128x128.png", | ||
"templates": "../../../compodoc-templates/package" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* eslint-disable @typescript-eslint/naming-convention */ | ||
/* eslint-disable quote-props */ | ||
|
||
module.exports = { | ||
'root': true, | ||
'parserOptions': { | ||
'EXPERIMENTAL_useSourceOfProjectReferenceRedirect': true, | ||
'tsconfigRootDir': __dirname, | ||
'project': [ | ||
'tsconfig.build.json', | ||
'tsconfig.builders.json', | ||
'tsconfig.spec.json', | ||
'tsconfig.eslint.json' | ||
], | ||
'sourceType': 'module' | ||
}, | ||
'extends': [ | ||
'../../../.eslintrc.js' | ||
] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/dist* |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<h1 align="center">Otter Pipeline</h1> | ||
<p align="center"> | ||
<img src="https://raw.githubusercontent.com/AmadeusITGroup/otter/main/assets/logo/otter.png" alt="Super cute Otter!" width="40%"/> | ||
</p> | ||
|
||
This package is an [Otter Framework Module](https://github.com/AmadeusITGroup/otter/tree/main/docs/core/MODULE.md). | ||
<br /> | ||
<br /> | ||
|
||
## Description | ||
|
||
[![Stable Version](https://img.shields.io/npm/v/@o3r/pipeline?style=for-the-badge)](https://www.npmjs.com/package/@o3r/pipeline) | ||
[![Bundle Size](https://img.shields.io/bundlephobia/min/@o3r/pipeline?color=green&style=for-the-badge)](https://www.npmjs.com/package/@o3r/pipeline) | ||
|
||
This module contains tooling around DevOps toolchains. | ||
|
||
## How to install | ||
|
||
```shell | ||
ng add @o3r/pipeline | ||
``` | ||
|
||
## Description | ||
|
||
The `ng add` schematic for Otter Pipeline helps you set up a DevOps pipeline for your frontend project. This schematic configures the necessary CI runner and npm registry settings to streamline your development workflow. | ||
|
||
### Properties | ||
|
||
- `toolchain`: The DevOps toolchain to create. For now, only `GitHub` is supported. | ||
- `runner`: The CI runner. Default is `ubuntu-latest`. | ||
- `npmRegistry`: A private npm registry. By default, the public one will be used. | ||
|
||
### Usage | ||
|
||
Here is an example of how to use the `ng add` schematics with parameters: | ||
|
||
```shell | ||
ng add @o3r/pipeline --runner=windows-latest --npmRegistry=https://custom-registry.example.com | ||
``` | ||
|
||
### Private NPM Registry | ||
|
||
When a custom NPM Registry is provided, the schematic will automatically create a `.npmrc` (or a `.yarnrc`) file with the specified registry. | ||
Additionally, it will set the necessary environment variables for the install task. | ||
|
||
```yaml | ||
- name: Install | ||
env: | ||
COREPACK_NPM_REGISTRY: https://custom-registry.example.com | ||
COREPACK_INTEGRITY_KEYS: "" | ||
shell: bash | ||
run: npm ci | ||
``` | ||
If you choose to run the schematic without specifying an `npmRegistry`, you may need to manually apply these changes afterwards. | ||
|
||
### GitHub workflow | ||
|
||
The generated pipeline ensures that your code is built, tested and linted on every push or pull request to the main and release branches. | ||
It also automates the versioning thanks to the [Otter - New Version GitHub Action](https://github.com/AmadeusITGroup/otter/tree/main/tools/github-actions/new-version#readme) and release process by creating a new release on GitHub and generating release notes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"$schema": "https://raw.githubusercontent.com/angular/angular-cli/master/packages/angular_devkit/schematics/collection-schema.json", | ||
"schematics": { | ||
"ng-add": { | ||
"description": "Add Otter Pipeline to the project.", | ||
"factory": "./schematics/ng-add/index#ngAdd", | ||
"schema": "./schematics/ng-add/schema.json", | ||
"aliases": [ | ||
"install", | ||
"i" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
const getJestGlobalConfig = require('../../../jest.config.ut').getJestGlobalConfig; | ||
|
||
/** @type {import('ts-jest/dist/types').JestConfigWithTsJest} */ | ||
module.exports = { | ||
...getJestGlobalConfig(), | ||
projects: [ | ||
'<rootDir>/testing/jest.config.ut.builders.js' | ||
] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"$schema": "https://raw.githubusercontent.com/angular/angular-cli/master/packages/angular_devkit/schematics/collection-schema.json", | ||
"schematics": { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
{ | ||
"name": "@o3r/pipeline", | ||
"version": "0.0.0-placeholder", | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"typings": "./dist/src/public_api.d.ts", | ||
"main": "dist/src/public_api.js", | ||
"description": "A package that provides toolchain related helpers.", | ||
"keywords": [ | ||
"toolchain", | ||
"pipeline", | ||
"otter", | ||
"otter-module" | ||
], | ||
"scripts": { | ||
"nx": "nx", | ||
"ng": "yarn nx", | ||
"test": "yarn nx test pipeline", | ||
"copy:templates": "yarn cpy 'schematics/**/templates{-*,}/**/*' dist/schematics", | ||
"prepare:build:builders": "yarn cpy '{collection,migration}.json' dist && yarn cpy 'schematics/**/schema.json' dist/schematics && yarn copy:templates", | ||
"prepare:publish": "prepare-publish ./dist", | ||
"build:source": "tsc -b tsconfig.build.json && yarn cpy package.json dist/", | ||
"build:builders": "tsc -b tsconfig.builders.json --pretty && yarn copy:templates && generate-cjs-manifest", | ||
"build": "yarn nx build pipeline", | ||
"postbuild": "patch-package-json-main" | ||
}, | ||
"exports": { | ||
"./package.json": { | ||
"default": "./package.json" | ||
}, | ||
".": { | ||
"default": "./dist/src/public_api.js", | ||
"typings": "./dist/src/public_api.d.ts" | ||
} | ||
}, | ||
"dependencies": { | ||
"js-yaml": "^4.1.0", | ||
"tslib": "^2.6.2" | ||
}, | ||
"peerDependencies": { | ||
"@o3r/schematics": "workspace:^", | ||
"@o3r/telemetry": "workspace:^" | ||
}, | ||
"peerDependenciesMeta": { | ||
"@o3r/schematics": { | ||
"optional": true | ||
}, | ||
"@o3r/telemetry": { | ||
"optional": true | ||
} | ||
}, | ||
"devDependencies": { | ||
"@angular-devkit/architect": "~0.1802.0", | ||
"@angular-devkit/core": "~18.2.0", | ||
"@angular-devkit/schematics": "~18.2.0", | ||
"@angular-eslint/eslint-plugin": "~18.3.0", | ||
"@compodoc/compodoc": "^1.1.19", | ||
"@nx/eslint-plugin": "~19.5.0", | ||
"@nx/jest": "~19.5.0", | ||
"@nx/js": "~19.5.0", | ||
"@o3r/build-helpers": "workspace:^", | ||
"@o3r/eslint-plugin": "workspace:^", | ||
"@o3r/schematics": "workspace:^", | ||
"@o3r/telemetry": "workspace:^", | ||
"@o3r/test-helpers": "workspace:^", | ||
"@schematics/angular": "~18.2.0", | ||
"@stylistic/eslint-plugin-ts": "~2.4.0", | ||
"@types/jest": "~29.5.2", | ||
"@types/js-yaml": "^4.0.5", | ||
"@types/node": "^20.0.0", | ||
"@typescript-eslint/eslint-plugin": "^7.14.1", | ||
"@typescript-eslint/parser": "^7.14.1", | ||
"@typescript-eslint/utils": "^7.14.1", | ||
"cpy-cli": "^5.0.0", | ||
"eslint": "^8.57.0", | ||
"eslint-import-resolver-node": "^0.3.9", | ||
"eslint-plugin-jest": "~28.8.0", | ||
"eslint-plugin-jsdoc": "~48.11.0", | ||
"eslint-plugin-prefer-arrow": "~1.2.3", | ||
"eslint-plugin-unicorn": "^54.0.0", | ||
"jest": "~29.7.0", | ||
"jest-junit": "~16.0.0", | ||
"jsonc-eslint-parser": "~2.4.0", | ||
"nx": "~19.5.0", | ||
"pid-from-port": "^1.1.3", | ||
"ts-jest": "~29.2.0", | ||
"ts-node": "~10.9.2", | ||
"typescript": "~5.5.4" | ||
}, | ||
"engines": { | ||
"node": "^18.19.1 || ^20.11.1 || >=22.0.0" | ||
}, | ||
"schematics": "./collection.json", | ||
"ng-update": { | ||
"migrations": "./migration.json" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
{ | ||
"name": "pipeline", | ||
"$schema": "https://raw.githubusercontent.com/nrwl/nx/master/packages/nx/schemas/project-schema.json", | ||
"projectType": "library", | ||
"sourceRoot": "packages/@o3r/pipeline/src", | ||
"prefix": "o3r", | ||
"targets": { | ||
"build": { | ||
"executor": "nx:run-script", | ||
"outputs": [ | ||
"{projectRoot}/dist/package.json" | ||
], | ||
"options": { | ||
"script": "postbuild" | ||
}, | ||
"dependsOn": [ | ||
"^build", | ||
"build-builders", | ||
"compile" | ||
] | ||
}, | ||
"compile": { | ||
"executor": "nx:run-script", | ||
"options": { | ||
"script": "build:source" | ||
}, | ||
"inputs": [ | ||
"source", | ||
"^source" | ||
] | ||
}, | ||
"prepare-build-builders": { | ||
"executor": "nx:run-script", | ||
"options": { | ||
"script": "prepare:build:builders" | ||
} | ||
}, | ||
"build-builders": { | ||
"executor": "nx:run-script", | ||
"options": { | ||
"script": "build:builders" | ||
} | ||
}, | ||
"lint": { | ||
"options": { | ||
"eslintConfig": "packages/@o3r/pipeline/.eslintrc.js", | ||
"lintFilePatterns": [ | ||
"packages/@o3r/pipeline/src/**/*.ts", | ||
"packages/@o3r/pipeline/schematics/**/*.ts", | ||
"packages/@o3r/pipeline/package.json" | ||
] | ||
} | ||
}, | ||
"test": { | ||
"executor": "@nx/jest:jest", | ||
"options": { | ||
"jestConfig": "packages/@o3r/pipeline/jest.config.js" | ||
} | ||
}, | ||
"test-int": { | ||
"executor": "@nx/jest:jest", | ||
"options": { | ||
"jestConfig": "packages/@o3r/pipeline/testing/jest.config.it.js" | ||
} | ||
}, | ||
"prepare-publish": { | ||
"executor": "nx:run-script", | ||
"options": { | ||
"script": "prepare:publish" | ||
} | ||
}, | ||
"publish": { | ||
"executor": "nx:run-commands", | ||
"options": { | ||
"command": "npm publish packages/@o3r/pipeline/dist" | ||
} | ||
}, | ||
"documentation": { | ||
"executor": "nx:run-script", | ||
"options": { | ||
"script": "compodoc" | ||
} | ||
} | ||
}, | ||
"tags": [] | ||
} |
Oops, something went wrong.