Skip to content

Commit b00ef24

Browse files
authored
chore: release pipelines to beta
Release Github Actions pipelines to Beta channel
2 parents 983f6a1 + 88e4ec2 commit b00ef24

File tree

11 files changed

+936
-675
lines changed

11 files changed

+936
-675
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve CloudGraph
4+
title: ''
5+
labels: bug
6+
assignees: tyler-dunkel
7+
8+
---
9+
10+
Thank you for filling out a bug report, we really appreciate any help in improving the CloudGraph CLI and providers!
11+
12+
**Describe the bug**
13+
A clear and concise description of what the bug is.
14+
15+
**To Reproduce**
16+
Steps to reproduce the behavior:
17+
1. Run command '...' NOTE: please run the command in DEBUG mode for additional debugging info [e.g. `CG_DEBUG=5 cg scan aws`]
18+
2. Run GraphQL query '....'
19+
4. See error
20+
21+
Please include the `cg-debug.log` file if applicable
22+
23+
**Expected behavior**
24+
A clear and concise description of what you expected to happen.
25+
26+
**Environment (please complete the following information):**
27+
- CLI version [e.g. `0.11.7`]
28+
- Provider versions [e.g. `[email protected]`, `[email protected]`]
29+
- Context [e.g. Local machine, EC2 Instance, Other]
30+
31+
**Screenshots**
32+
If applicable, add screenshots to help explain your problem.
33+
34+
**Additional context**
35+
Add any other context about the problem here.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: Feature request
3+
about: Suggest a feature you would like to see CloudGraph implement
4+
title: ''
5+
labels: enhancement
6+
assignees: tyler-dunkel
7+
8+
---
9+
10+
Thank you for taking the time to suggest a way the CloudGraph tool could imrpove!
11+
12+
If this is for a larger feature request, please use our [Slack channel](https://cloudgraph-workspace.slack.com) so we can discuss and avoid duplicate work (we may already be working on it!)
13+
.
14+
**Is your feature request related to a problem? Please describe.**
15+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
16+
17+
**Describe the solution you'd like**
18+
A clear and concise description of what you want to happen.
19+
20+
**Describe alternatives you've considered**
21+
A clear and concise description of any alternative solutions or features you've considered.
22+
23+
**How would this be useful to you**
24+
Tell us what this feature would help you achieve in your workflow
25+
26+
**Additional context**
27+
Add any other context or screenshots about the feature request here.

.github/SECURITY.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Security Policy
2+
3+
1. [Reporting security problems to CloudGraph](#reporting)
4+
2. [Security Point of Contact](#contact)
5+
3. [Incident Response Process](#process)
6+
7+
<a name="reporting"></a>
8+
## Reporting security problems to CloudGraph
9+
10+
**DO NOT CREATE AN ISSUE** to report a security problem. Instead, please
11+
send an email to [email protected]
12+
13+
<a name="contact"></a>
14+
## Security Point of Contact
15+
16+
The security point of contact is Tyler Dunkel. Tyler responds to security
17+
incident reports as fast as possible, within one business day at the latest.
18+
19+
In case Tyler does not respond within a reasonable time, the secondary point
20+
of contact is [Tyson Kunovsky](https://github.com/orgs/cloudgraphdev/people/kunovsky).
21+
22+
If neither Tyler nor Tyson responds then please contact [email protected]
23+
who can disable any access for the CloudGraph CLI tool until the security incident is resolved.
24+
25+
<a name="process"></a>
26+
## Incident Response Process
27+
28+
In case an incident is discovered or reported, CloudGraph will follow the following
29+
process to contain, respond and remediate:
30+
31+
### 1. Containment
32+
33+
The first step is to find out the root cause, nature and scope of the incident.
34+
35+
- Is still ongoing? If yes, first priority is to stop it.
36+
- Is the incident outside of my influence? If yes, first priority is to contain it.
37+
- Find out knows about the incident and who is affected.
38+
- Find out what data was potentially exposed.
39+
40+
One way to immediately remove all access for CloudGraph is to uninstall CloudGraph globally and/or locally using
41+
`npm uninstall -g @cloudgraph/cli` && `npm uninstall @cloudgraph/cli`
42+
43+
### 2. Response
44+
45+
After the initial assessment and containment to out best abilities, CloudGraph will
46+
document all actions taken in a response plan.
47+
48+
CloudGraph will create an RCA (Root Cause Analysis) document in the [CloudGraph documentation site](https://docs.cloudgraph.dev/overview) that describes what happened and what was done to resolve it.
49+
50+
### 3. Remediation
51+
52+
Once the incident is confirmed to be resolved, CloudGraph will summarize the lessons
53+
learned from the incident and create a list of actions CloudGraph will take to prevent
54+
it from happening again.
55+
56+
### Keep permissions to a minimum
57+
58+
The CloudGraph CLI tool uses the least amount of access to limit the impact of possible
59+
security incidents, see [README - How It Works](https://github.com/cloudgraphdev/cli#how-it-works).
60+
61+
### Secure accounts with access
62+
63+
The [CloudGraph GitHub Organization](https://github.com/cloudgraphdev) requires 2FA authorization
64+
for all members.
65+
66+
### Critical Updates And Security Notices
67+
68+
We learn about critical software updates and security threats from these sources
69+
70+
1. GitHub Security Alerts
71+
2. [Snyk open source vulnerability dectection](https://snyk.io/product/open-source-security-management/)
72+
3. GitHub: https://githubstatus.com/ & [@githubstatus](https://twitter.com/githubstatus)

.github/pull_request_template.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
## Issue tracker links
2+
3+
_Add links to any relevant tasks/stories/bugs/pagerduty/etc_
4+
5+
*Example - dummy TODO project*
6+
7+
[TODO-123](https://autoclouddev.atlassian.net/browse/TODO-123)
8+
9+
## Changes/solution
10+
11+
_How does this change address the problem?_
12+
13+
## Testing
14+
15+
_Describe how the testing was done, plus evidence, if not covered by automated tests_
16+
17+
## Notes and considerations
18+
19+
_Add any additional notes and/or considerations_
20+
21+
## Dependencies
22+
23+
_Add dependencies on any other PRs, if applicable

.github/workflows/notify.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: notify
3+
4+
on:
5+
release:
6+
types: [published]
7+
8+
jobs:
9+
notify:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
- uses: actions/setup-node@v3
14+
with:
15+
node-version: 16
16+
- run: |
17+
GIT_COMMIT_TILE=$(git log -1 --pretty=format:"%s")
18+
curl -X POST --data-urlencode "payload={\"attachments\":[{\"fallback\":\"$GIT_AUTHOR_NAME released new $ORGANIZATION_NAME $REPO_NAME version of $GITHUB_REF_NAME\",\"color\":\"good\",\"title\":\"Version $GITHUB_REF_NAME of $ORGANIZATION_NAME $REPO_NAME released\",\"title_link\":\"$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/releases/tag/$GITHUB_REF_NAME\",\"fields\":[{\"title\":\"Tag\",\"value\":\"<$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/commits/$GITHUB_REF_NAME|$GITHUB_REF_NAME>\",\"short\":true},{\"title\":\"Commit\",\"value\":\"<$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/tree/$GITHUB_REF_NAME|$GIT_COMMIT_TILE>\",\"short\":true}],\"footer\":\"$ORGANIZATION_NAME $REPO_NAME \",\"ts\":\"$( date +%s )\"}]}" $SLACK_WEBHOOK
19+
env:
20+
REPO_NAME: ${{ github.event.repository.name }}
21+
GIT_AUTHOR_NAME: "AutoCloud Deploy Bot"
22+
SLACK_WEBHOOK: ${{secrets.slack_api_endpoint}}
23+
ORGANIZATION_NAME: ${{secrets.organization_name}}

.github/workflows/pr-validator.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
name: pr-validator
3+
4+
on:
5+
pull_request:
6+
types: [synchronize, opened, reopened, edited]
7+
branches:
8+
- main
9+
- beta
10+
11+
jobs:
12+
pr-validation:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
- run: |
17+
if [ "$TARGET_BRANCH" == "main" ] && [ "$SOURCE_BRANCH" == "beta" ]; then
18+
echo "Merge from $SOURCE_BRANCH to $TARGET_BRANCH is valid"
19+
exit 0
20+
elif [ "$TARGET_BRANCH" == "beta" ] && [ "$SOURCE_BRANCH" == "alpha" ]; then
21+
echo "Merge from $SOURCE_BRANCH to $TARGET_BRANCH is valid"
22+
exit 0
23+
else
24+
echo "You cannot merge from $SOURCE_BRANCH to $TARGET_BRANCH"
25+
exit 1
26+
fi
27+
env:
28+
SOURCE_BRANCH: ${{ github.head_ref }}
29+
TARGET_BRANCH: ${{ github.base_ref }}

.github/workflows/publish.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
name: publish
3+
4+
on:
5+
push:
6+
branches:
7+
- alpha
8+
- beta
9+
- main
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
with:
17+
fetch-depth: 0
18+
persist-credentials: false
19+
token: ${{secrets.gh_token}}
20+
- uses: actions/setup-node@v3
21+
with:
22+
node-version: 16
23+
registry-url: "https://registry.npmjs.org"
24+
25+
- name: Get cache directory
26+
id: yarn-cache-dir
27+
run: |
28+
echo "::set-output name=dir::$(yarn cache dir)"
29+
30+
- name: Restoring cache
31+
uses: actions/cache@v3
32+
id: yarn-cache # use this to check for `cache-hit` ==> if: steps.yarn-cache.outputs.cache-hit != 'true'
33+
with:
34+
path: ${{ steps.yarn-cache-dir.outputs.dir }}
35+
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
36+
restore-keys: |
37+
${{ runner.os }}-yarn-
38+
39+
- name: Install Packages
40+
# NOTE: The --ignore-scripts flag is required to prevent leakage of NPM_TOKEN value
41+
# See https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#use-private-packages
42+
run: yarn install --frozen-lockfile --prefer-offline --ignore-scripts
43+
44+
- name: Build
45+
run: yarn prepack
46+
47+
# - name: Test
48+
# run: yarn lint
49+
50+
- name: Publish
51+
run: npx semantic-release
52+
env:
53+
NODE_ENV: "cicd"
54+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
55+
GITHUB_TOKEN: ${{secrets.gh_token}}
56+
GIT_AUTHOR_NAME: "autocloud-deploy-bot"
57+
GIT_AUTHOR_EMAIL: "[email protected]"
58+
GIT_COMMITTER_NAME: "autocloud-deploy-bot"
59+
GIT_COMMITTER_EMAIL: "[email protected]"

.releaserc.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
branches:
3+
- name: alpha
4+
channel: alpha
5+
prerelease: true
6+
- name: beta
7+
channel: beta
8+
prerelease: true
9+
- name: main
10+
11+
plugins:
12+
- "@semantic-release/commit-analyzer"
13+
- "@semantic-release/release-notes-generator"
14+
- - "@semantic-release/changelog"
15+
- changelogFile: CHANGELOG.md
16+
- - "@semantic-release/git"
17+
- assets:
18+
- CHANGELOG.md
19+
- package.json
20+
- - "@semantic-release/npm"
21+
- npmPublish: true
22+
- "@semantic-release/github"
23+
verifyConditions:
24+
- "@semantic-release/changelog"
25+
- "@semantic-release/github"
26+
- "@semantic-release/npm"
27+
prepare:
28+
- "@semantic-release/changelog"
29+
- "@semantic-release/npm"
30+
- - "@semantic-release/git"
31+
- message: "chore(release): ${nextRelease.version} \n\n${nextRelease.notes}"
32+
publish:
33+
- "@semantic-release/github"
34+
- "@semantic-release/npm"
35+
success: false
36+
fail: false
37+
tagFormat: "${version}"

CHANGELOG.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# 1.0.0-alpha.1 (2022-04-05)
2+
3+
4+
### Bug Fixes
5+
6+
* **config:** update config log out to use context.name ([d12bcd5](https://github.com/cloudgraphdev/cloudgraph-provider-kubernetes/commit/d12bcd5be92a1c263421c4658cd95c4ecc6983fb))
7+
* **service:** fix node schema ([1e2db65](https://github.com/cloudgraphdev/cloudgraph-provider-kubernetes/commit/1e2db65cbd1acdb3f5054b9831eb1af8b31a5a8c))
8+
* **services:** fix services schema ([53f1fca](https://github.com/cloudgraphdev/cloudgraph-provider-kubernetes/commit/53f1fca8edf338a5880041224be4a2bb4a31dbb2))
9+
* **services:** small fixes for cronJob and pod schemas ([932fad2](https://github.com/cloudgraphdev/cloudgraph-provider-kubernetes/commit/932fad23e4cc82561f2ed055ee7e5d21ed9f6fcf))
10+
* **services:** update deployment format for safe accessors ([dc3e6a4](https://github.com/cloudgraphdev/cloudgraph-provider-kubernetes/commit/dc3e6a4f8af482199cabbddc0709e6861e5fdda7))
11+
* **services:** update pod schema to fix id issue ([af5a62d](https://github.com/cloudgraphdev/cloudgraph-provider-kubernetes/commit/af5a62d1245b4eaf69912f2ef0c891159d20dd7a))
12+
* **services:** update service connection names to plural ([5a4030d](https://github.com/cloudgraphdev/cloudgraph-provider-kubernetes/commit/5a4030df7c31c910e56a54b8d6a336eba2ea2a67))
13+
* **services:** update service format func for safe access ([309a89b](https://github.com/cloudgraphdev/cloudgraph-provider-kubernetes/commit/309a89b74f405e5cfd4a3afbcc5ece979ef5d159))
14+
* **services:** update Service schema, move format func ([46ae6c6](https://github.com/cloudgraphdev/cloudgraph-provider-kubernetes/commit/46ae6c62c629eb1178c0e6710b1e754d2bdb1b50))
15+
* **service:** update deployment class name ([e0f8e83](https://github.com/cloudgraphdev/cloudgraph-provider-kubernetes/commit/e0f8e83fdb1779114c180f46d035fb20e0af670c))
16+
* **service:** update deployment mutation name ([9d734b2](https://github.com/cloudgraphdev/cloudgraph-provider-kubernetes/commit/9d734b24c4f7791d8b39dbee000da8d7ee4f323b))
17+
* **service:** update service schemas with directives. remove context hardocde ([c6fabbb](https://github.com/cloudgraphdev/cloudgraph-provider-kubernetes/commit/c6fabbb5cbdfabdaa684dbdd912a4090c8972a6c))
18+
19+
20+
### Features
21+
22+
* **config:** beginning of k8s provider with auth, config, node serivce, and namespace service ([9201ec5](https://github.com/cloudgraphdev/cloudgraph-provider-kubernetes/commit/9201ec55fc3c03fc20e99620e45d9093ee5a2806))
23+
* **services:** add cronJob service ([39cc35a](https://github.com/cloudgraphdev/cloudgraph-provider-kubernetes/commit/39cc35a160520a695a4a40db52952e05d09b73cb))
24+
* **services:** add job service ([5e77852](https://github.com/cloudgraphdev/cloudgraph-provider-kubernetes/commit/5e778526c14764b4d4ce18e167b3425a737aef3d))
25+
* **services:** add networkPolicy service ([8c6c9d5](https://github.com/cloudgraphdev/cloudgraph-provider-kubernetes/commit/8c6c9d5a55d1041e57fea291c0f9412c3bfb4d13))
26+
* **services:** add pod service and refactor obj -> array with util ([6e06b48](https://github.com/cloudgraphdev/cloudgraph-provider-kubernetes/commit/6e06b48b53e11c8de8dece93e4b9576edbc24fc8))
27+
* **services:** add role service ([f802762](https://github.com/cloudgraphdev/cloudgraph-provider-kubernetes/commit/f8027623a8ec2ec6b987d389295f98af0adef20d))
28+
* **services:** add secret service ([944b43c](https://github.com/cloudgraphdev/cloudgraph-provider-kubernetes/commit/944b43c9c1ca0f24cb340a6440047563cb8c00eb))
29+
* **services:** add serviceAccount service and connections to namesapce ([e005f69](https://github.com/cloudgraphdev/cloudgraph-provider-kubernetes/commit/e005f693a219d721ca3a7efde0e49c19a705061b))
30+
* **services:** Add services persistentVolume, persistentVolumeClaim, and storageClass ([fcd93e9](https://github.com/cloudgraphdev/cloudgraph-provider-kubernetes/commit/fcd93e93fb2ea60e854f90b093f7388becaadd4a))
31+
* **services:** create Ingress service, update getData to allow passing context as file or config ([d7b7e07](https://github.com/cloudgraphdev/cloudgraph-provider-kubernetes/commit/d7b7e072324d96aff151dfe950de4117d232f9ec))
32+
* **services:** create Service service ([8bd29c2](https://github.com/cloudgraphdev/cloudgraph-provider-kubernetes/commit/8bd29c25b3e55dc3d828cf65ab0ca6a3b558d722))
33+
* **services:** finish format for deployment, rework pod utils for reuse ([d241381](https://github.com/cloudgraphdev/cloudgraph-provider-kubernetes/commit/d2413811f84c2dd99e8ca986fd8a344fa2ec8393))

package.json

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
{
22
"name": "@cloudgraph/cg-provider-k8s",
3-
"version": "0.0.2",
3+
"version": "1.0.0-alpha.1",
44
"description": "Kubernetes provider for the CloudGraph CLI",
55
"publishConfig": {
6+
"registry": "https://registry.npmjs.org/",
67
"access": "public"
78
},
89
"homepage": "https://www.cloudgraph.dev/",
@@ -14,10 +15,10 @@
1415
"license": "MPL-2.0",
1516
"private": false,
1617
"scripts": {
17-
"build": "yarn prepublish",
18+
"build": "yarn prepack",
1819
"generate-types": "graphql-codegen --config codegen.yml",
1920
"prepare": "npx husky install && shx rm -rf .git/hooks && shx ln -s ../.husky .git/hooks",
20-
"prepublish": "rm -rf dist && yarn generate-types && tsc && yarn cpx 'src/**/*.graphql' dist",
21+
"prepack": "rm -rf dist && yarn generate-types && tsc && yarn cpx 'src/**/*.graphql' dist",
2122
"test": "NODE_ENV=test jest",
2223
"lint": "eslint --config .eslintrc.json --ext .js,.ts ./",
2324
"lint:fix": "eslint --fix --config .eslintrc.json --ext .js,.ts ./",
@@ -43,10 +44,10 @@
4344
"@autocloud/eslint-config": "^0.1.0",
4445
"@graphql-codegen/cli": "1.21.7",
4546
"@graphql-codegen/typescript": "1.23.0",
46-
"@semantic-release/changelog": "^5.0.1",
47-
"@semantic-release/git": "^9.0.0",
48-
"@semantic-release/gitlab": "^6.2.2",
49-
"@semantic-release/npm": "^7.1.3",
47+
"@semantic-release/changelog": "^6.0.1",
48+
"@semantic-release/git": "^10.0.1",
49+
"@semantic-release/github": "^8.0.1",
50+
"@semantic-release/npm": "^9.0.1",
5051
"@types/jest": "^26.0.24",
5152
"@types/lodash": "^4.14.170",
5253
"@types/node": "^15.12.4",
@@ -61,7 +62,7 @@
6162
"jest": "^27.0.6",
6263
"lint-staged": "^11.1.1",
6364
"prettier": "^2.3.2",
64-
"semantic-release": "^17.4.4",
65+
"semantic-release": "^19.0.2",
6566
"shx": "^0.3.3",
6667
"ts-jest": "^27.0.4"
6768
},

0 commit comments

Comments
 (0)