-
Notifications
You must be signed in to change notification settings - Fork 23
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
tskinner-oppfi
committed
Nov 9, 2023
1 parent
356b757
commit c1bee69
Showing
13 changed files
with
195 additions
and
51 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,17 @@ | ||
const { execSync } = require('child_process'); | ||
const { readFileSync } = require('fs'); | ||
|
||
exports.post = ctx => { | ||
|
||
const env = { ...process.env }; | ||
|
||
// execSync('npm install', { stdio: 'inherit', env }); | ||
|
||
// // import k8s objects | ||
// execSync('npm run import', { stdio: 'inherit', env }); | ||
// execSync('npm run compile', { stdio: 'inherit', env }); | ||
// execSync('npm run test -- -u', { stdio: 'inherit', env }); | ||
// execSync('npm run synth', { stdio: 'inherit', env }); | ||
|
||
console.log(readFileSync('./help', 'utf-8')); | ||
}; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,4 @@ | ||
language: typescript | ||
app: deno run --allow-env --allow-write --allow-read main.ts | ||
imports: | ||
- k8s |
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,3 @@ | ||
export { Construct } from 'npm:constructs@^{{ constructs_version }}'; | ||
export { App, Chart } from 'npm:cdk8s@^{{ cdk8s_core_version }}'; | ||
export type { ChartProps } from 'npm:cdk8s@^{{ cdk8s_core_version }}' |
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,23 @@ | ||
======================================================================================================== | ||
|
||
Your cdk8s typescript project is ready! | ||
|
||
cat help Print this message | ||
|
||
Compile: | ||
npm run compile Compile typescript code to javascript (or "yarn watch") | ||
npm run watch Watch for changes and compile typescript in the background | ||
npm run build Compile + synth | ||
|
||
Synthesize: | ||
npm run synth Synthesize k8s manifests from charts to dist/ (ready for 'kubectl apply -f') | ||
|
||
Deploy: | ||
kubectl apply -f dist/ | ||
|
||
Upgrades: | ||
npm run import Import/update k8s apis (you should check-in this directory) | ||
npm run upgrade Upgrade cdk8s modules to latest version | ||
npm run upgrade:next Upgrade cdk8s modules to latest "@next" version (last commit) | ||
|
||
======================================================================================================== |
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 @@ | ||
module.exports = { | ||
"roots": [ | ||
"<rootDir>" | ||
], | ||
testMatch: [ '**/*.test.ts'], | ||
"transform": { | ||
"^.+\\.tsx?$": "ts-jest" | ||
}, | ||
} |
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,11 @@ | ||
import {MyChart} from './main'; | ||
import {Testing} from 'cdk8s'; | ||
|
||
describe('Placeholder', () => { | ||
test('Empty', () => { | ||
const app = Testing.app(); | ||
const chart = new MyChart(app, 'test-chart'); | ||
const results = Testing.synth(chart) | ||
expect(results).toMatchSnapshot(); | ||
}); | ||
}); |
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 @@ | ||
import { App, Chart, ChartProps, Construct } from './deps.ts'; | ||
|
||
export class MyChart extends Chart { | ||
constructor(scope: Construct, id: string, props: ChartProps = { }) { | ||
super(scope, id, props); | ||
|
||
// define resources here | ||
|
||
} | ||
} | ||
|
||
const app = new App(); | ||
new MyChart(app, '{{ $base }}'); | ||
app.synth(); |
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,34 @@ | ||
{ | ||
"compilerOptions": { | ||
"alwaysStrict": true, | ||
"charset": "utf8", | ||
"declaration": true, | ||
"experimentalDecorators": true, | ||
"inlineSourceMap": true, | ||
"inlineSources": true, | ||
"lib": [ | ||
"es2016" | ||
], | ||
"module": "CommonJS", | ||
"noEmit": false, | ||
"noEmitOnError": true, | ||
"noFallthroughCasesInSwitch": true, | ||
"noImplicitAny": true, | ||
"noImplicitReturns": true, | ||
"noImplicitThis": true, | ||
"noUnusedLocals": true, | ||
"noUnusedParameters": true, | ||
"resolveJsonModule": true, | ||
"strict": true, | ||
"strictNullChecks": true, | ||
"strictPropertyInitialization": true, | ||
"stripInternal": true, | ||
"target": "ES2017" | ||
}, | ||
"include": [ | ||
"**/*.ts" | ||
], | ||
"exclude": [ | ||
"node_modules" | ||
] | ||
} |
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 @@ | ||
*.d.ts | ||
*.js | ||
!jest.config.js | ||
node_modules | ||
dist/ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.