-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First stable version of package (#1)
* init: draft project * fix: change json file and renew docs * fix: add logs and description * fix: delete workflow dispatch * fix: move build step * fix: move to official registry * fix: disable strict * fix: make more user-friendly config settings * docs: rename repo * fix: fmt file Co-authored-by: C5345365 <[email protected]>
- Loading branch information
1 parent
1167523
commit a2bbf6d
Showing
23 changed files
with
5,825 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"commonjs": true, | ||
"es2021": true | ||
}, | ||
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": "latest" | ||
}, | ||
"plugins": ["@typescript-eslint"], | ||
"rules": { | ||
"@typescript-eslint/no-explicit-any": "off" | ||
}, | ||
"ignorePatterns": ["dist/*"] | ||
} |
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,28 @@ | ||
name: develop | ||
|
||
on: | ||
pull_request: | ||
branches: [develop] | ||
paths-ignore: | ||
- "README.md" | ||
- "LICENSE" | ||
push: | ||
branches: [develop] | ||
paths-ignore: | ||
- "README.md" | ||
- "LICENSE" | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: "Install NPM requirements" | ||
run: npm install | ||
- name: "Lint" | ||
run: npm run lint | ||
- name: "Build module" | ||
run: tsc | ||
- uses: JS-DevTools/npm-publish@v1 | ||
with: | ||
token: ${{ secrets.NPM_TOKEN }} |
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,2 @@ | ||
node_modules/ | ||
dist/ |
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 @@ | ||
src/ | ||
tsconfig.json | ||
.eslintrc.json | ||
.prettierrc.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,13 @@ | ||
{ | ||
"overrides": [ | ||
{ | ||
"files": "src/**/*.ts", | ||
"options": { | ||
"semi": true, | ||
"trailingComma": "es5", | ||
"singleQuote": true, | ||
"tabWidth": 4 | ||
} | ||
} | ||
] | ||
} |
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 |
---|---|---|
@@ -1,2 +1,66 @@ | ||
# keptn-provisioning | ||
This GHA (main branch) and NPM package(dev branch) use for Keptn provisioning | ||
# keptn-provisioning-npm | ||
|
||
[![Standard - JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](http://standardjs.com/) | ||
|
||
[![NPM](https://nodei.co/npm/keptn-provisioning.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/keptn-provisioning/) | ||
|
||
Create or update projects, stages, and services Keptn. Also enabled monitoring for SLO. | ||
|
||
#### Example | ||
|
||
```js | ||
import { provisioning } from "keptn-provisioning"; | ||
|
||
// If you select this section will use port-forwarding and Keptn API token will get from K8s secrets | ||
const keptnResourcesInKubernetes = `{ | ||
"enabled": true, | ||
"namespace": "keptn", | ||
"secret": "keptn-api-token", | ||
"service": "api-gateway-nginx" | ||
}`; | ||
|
||
// If you have public Keptn URL and `enabled = false` please fill these settings | ||
const keptnAuth = `{ | ||
"keptnURL": "", | ||
"token": "" | ||
}`; | ||
|
||
const config = `{ | ||
"projects": [ | ||
{ | ||
"name": "test", | ||
"github": { | ||
"url": "https://github.test.com", | ||
"user": "github-user", | ||
"token": "github-pat", | ||
// For personal repo - "owner" is similar with "user" | ||
"owner": "github-organization-name", | ||
"repo": "github-repo-name", | ||
"isPrivateRepo": true, | ||
"isOrganization": true, | ||
"isEnterprise": true | ||
}, | ||
"stages": [ | ||
{ | ||
"name": "develop" | ||
} | ||
], | ||
"services": [ | ||
{ | ||
"name": "test", | ||
// Upload all files from this folder (optional) | ||
"workdir": "services/test", | ||
// Enable monitoring for SLO (optional) | ||
"monitoring": { | ||
"enabled": true, | ||
"type": "prometheus" | ||
} | ||
} | ||
], | ||
"shipyardPath": "projects/test/shipyard.yaml" | ||
} | ||
] | ||
}`; | ||
|
||
provisioning(config, keptnAuth, keptnResourcesInKubernetes); | ||
``` |
Oops, something went wrong.