Skip to content

Commit d5f0f70

Browse files
Mengqi Yufrankfarzansnyk-botphanimarupakaetefera
authored
Starlark/v0.1 (#345)
* use GITHUB_BASE_REF env var (#254) * Specify how function config should be documented * Update README.md * fix: upgrade typescript from 4.2.3 to 4.2.4 (#259) Snyk has created this PR to upgrade typescript from 4.2.3 to 4.2.4. See this package in npm: https://www.npmjs.com/package/typescript See this project in Snyk: https://app.snyk.io/org/kpt-fn-bot/project/206705c7-640c-491f-9f5b-bcb93537444e?utm_source=github&utm_medium=upgrade-pr * add usage doc for kubeval (#257) * add usage doc for kubeval * update usage doc * update usage doc * update usage doc * update usage doc * Fix search-replace image typo (#262) * Separate api layer apply-setters (#266) * SeparateApiLayerApplySetters * Update package name * Check functions catalog site for breakage on repo changes. (#250) * Add Firebase files. * Add placeholder sidebar. * Add make command to run site locally. * Check site on changes to function/example dirs. * Fix lint errors in shell scripts. * Change os.MkdirTemp to ioutil.TempDir * Remaining lint error. * Update hosting site name. * Add comment to Dockerfile. * Move site files from examples/ to site/ * Add successful site running output. * Output missing function. * Return command of bad git checkout. * Move firebase files to site. * Better errors at copy stage. * Update license years in shell scripts. * Set bash script flags. * Run docker in attached mode. * Revert "Run docker in attached mode." This reverts commit 5c57a1a. * Use named docker container * Separate api layer from cmd/function and validate inputs (#264) * Validate input cases for Search and Replace * Suggested changes * Update package name * Setup firebase hosting (#269) * Update firebase hosting deployment. (#270) * Fix miscellaneous styling issues. (#272) * Allow cross-origin linking. * Add favicon to catalog. * Match kpt.dev styling. * Top level links to overview page. * fix: upgrade @types/node from 14.14.21 to 14.14.39 (#273) Snyk has created this PR to upgrade @types/node from 14.14.21 to 14.14.39. See this package in npm: https://www.npmjs.com/package/@types/node See this project in Snyk: https://app.snyk.io/org/kpt-fn-bot/project/206705c7-640c-491f-9f5b-bcb93537444e?utm_source=github&utm_medium=upgrade-pr * Bump underscore from 1.12.0 to 1.13.1 in /functions/ts/kubeval (#283) Bumps [underscore](https://github.com/jashkenas/underscore) from 1.12.0 to 1.13.1. - [Release notes](https://github.com/jashkenas/underscore/releases) - [Commits](jashkenas/underscore@1.12.0...1.13.1) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump underscore in /functions/contrib/ts/analyze-istio (#282) Bumps [underscore](https://github.com/jashkenas/underscore) from 1.12.0 to 1.13.1. - [Release notes](https://github.com/jashkenas/underscore/releases) - [Commits](jashkenas/underscore@1.12.0...1.13.1) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump lodash from 4.17.20 to 4.17.21 in /functions/ts/kubeval (#281) Bumps [lodash](https://github.com/lodash/lodash) from 4.17.20 to 4.17.21. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](lodash/lodash@4.17.20...4.17.21) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump lodash from 4.17.20 to 4.17.21 in /functions/contrib/ts/sops (#280) Bumps [lodash](https://github.com/lodash/lodash) from 4.17.20 to 4.17.21. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](lodash/lodash@4.17.20...4.17.21) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump lodash in /functions/contrib/ts/analyze-istio (#279) Bumps [lodash](https://github.com/lodash/lodash) from 4.17.20 to 4.17.21. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](lodash/lodash@4.17.20...4.17.21) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump lodash in /functions/contrib/ts/inflate-helm-chart (#278) Bumps [lodash](https://github.com/lodash/lodash) from 4.17.20 to 4.17.21. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](lodash/lodash@4.17.20...4.17.21) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump underscore from 1.12.0 to 1.13.1 in /functions/contrib/ts/sops (#284) Bumps [underscore](https://github.com/jashkenas/underscore) from 1.12.0 to 1.13.1. - [Release notes](https://github.com/jashkenas/underscore/releases) - [Commits](jashkenas/underscore@1.12.0...1.13.1) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump underscore in /functions/contrib/ts/inflate-helm-chart (#277) Bumps [underscore](https://github.com/jashkenas/underscore) from 1.12.0 to 1.13.1. - [Release notes](https://github.com/jashkenas/underscore/releases) - [Commits](jashkenas/underscore@1.12.0...1.13.1) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * add usage doc template for TS functions (#271) * fix README styling for examples (#276) * fix: upgrade @types/node from 14.14.39 to 14.14.41 (#286) Snyk has created this PR to upgrade @types/node from 14.14.39 to 14.14.41. See this package in npm: https://www.npmjs.com/package/@types/node See this project in Snyk: https://app.snyk.io/org/kpt-fn-bot/project/206705c7-640c-491f-9f5b-bcb93537444e?utm_source=github&utm_medium=upgrade-pr * Format function (#242) * Format function * Update short description * Suggested changes 1 * Update fmt to format * Add simple example * Update short description * Suggested docs changes * Add test block * Remove new lines * openapi to OpenAPI * Suggested changes * Remove orchestrator reference * Only build on release or main branch changes. (#292) * Add make generate as pre-commit hook (#287) * Update cmd docs with latest README.md * Add make generate pre-commit hook * Update .github/hooks/pre-commit Co-authored-by: Mengqi Yu <mengqiy@google.com> Co-authored-by: Mengqi Yu <mengqiy@google.com> * Bump hosted-git-info from 2.8.8 to 2.8.9 in /functions/contrib/ts/sops (#291) Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.8.8 to 2.8.9. - [Release notes](https://github.com/npm/hosted-git-info/releases) - [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md) - [Commits](npm/hosted-git-info@v2.8.8...v2.8.9) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump hosted-git-info in /functions/contrib/ts/analyze-istio (#290) Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.8.8 to 2.8.9. - [Release notes](https://github.com/npm/hosted-git-info/releases) - [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md) - [Commits](npm/hosted-git-info@v2.8.8...v2.8.9) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump hosted-git-info from 2.8.8 to 2.8.9 in /functions/ts/kubeval (#289) Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.8.8 to 2.8.9. - [Release notes](https://github.com/npm/hosted-git-info/releases) - [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md) - [Commits](npm/hosted-git-info@v2.8.8...v2.8.9) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump hosted-git-info in /functions/contrib/ts/inflate-helm-chart (#288) Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.8.8 to 2.8.9. - [Release notes](https://github.com/npm/hosted-git-info/releases) - [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md) - [Commits](npm/hosted-git-info@v2.8.8...v2.8.9) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Hash setter names for regex matching (#293) * fix: upgrade typescript from 4.2.3 to 4.2.4 (#296) Snyk has created this PR to upgrade typescript from 4.2.3 to 4.2.4. See this package in npm: https://www.npmjs.com/package/typescript See this project in Snyk: https://app.snyk.io/org/kpt-fn-bot/project/5ee802a9-8df2-4243-be28-e1da63426b99?utm_source=github&utm_medium=upgrade-pr * fix: upgrade @types/node from 14.14.21 to 14.14.41 (#295) Snyk has created this PR to upgrade @types/node from 14.14.21 to 14.14.41. See this package in npm: https://www.npmjs.com/package/@types/node See this project in Snyk: https://app.snyk.io/org/kpt-fn-bot/project/5ee802a9-8df2-4243-be28-e1da63426b99?utm_source=github&utm_medium=upgrade-pr * improve error message for kubeval when encounter unknown CRDs (#297) * Use image paths as names for landing page. (#301) * Updating SOPS to 3.7.1 (#241) Sops 3.7.1 introduces a limited AGE support[1] Disabling gpg importing key debug by default (can be overridden) [1] https://github.com/mozilla/sops#encrypting-using-age * Escape regex characters in setter pattern (#300) * Escape regex characters in setter pattern * Use image paths as names for landing page. (#301) * Updates test and example for pattern escape Co-authored-by: etefera <31711490+etefera@users.noreply.github.com> * Adds .vscode to .gitignore (#303) * Apply setters empty values checks (#299) * Apply setters empty values * {} for empty map * stop setting LOG_TO_STDERR=true in kubeval (#304) * Add kpt logo to catalog site. (#302) * Log message for no search results (#306) * Log message for no search results * update message * make file scheme more visible in kubeval help text (#305) * make file scheme more visible * Use URI instead of URL * Create setters example (#294) * Create setters example * Suggested changes * Results for apply-setters (#307) * Results for apply-setters * Suggested changes * Error for no matches * Remove results * fix: upgrade @types/jasmine from 3.6.9 to 3.6.10 (#311) Snyk has created this PR to upgrade @types/jasmine from 3.6.9 to 3.6.10. See this package in npm: https://www.npmjs.com/package/@types/jasmine See this project in Snyk: https://app.snyk.io/org/kpt-fn-bot/project/206705c7-640c-491f-9f5b-bcb93537444e?utm_source=github&utm_medium=upgrade-pr * fix: upgrade @types/node from 14.14.41 to 14.14.42 (#312) Snyk has created this PR to upgrade @types/node from 14.14.41 to 14.14.42. See this package in npm: https://www.npmjs.com/package/@types/node See this project in Snyk: https://app.snyk.io/org/kpt-fn-bot/project/206705c7-640c-491f-9f5b-bcb93537444e?utm_source=github&utm_medium=upgrade-pr * fix: upgrade @types/node from 14.14.41 to 14.14.42 (#313) Snyk has created this PR to upgrade @types/node from 14.14.41 to 14.14.42. See this package in npm: https://www.npmjs.com/package/@types/node See this project in Snyk: https://app.snyk.io/org/kpt-fn-bot/project/5ee802a9-8df2-4243-be28-e1da63426b99?utm_source=github&utm_medium=upgrade-pr * fix: upgrade @types/node from 14.14.42 to 14.14.43 (#315) Snyk has created this PR to upgrade @types/node from 14.14.42 to 14.14.43. See this package in npm: https://www.npmjs.com/package/@types/node See this project in Snyk: https://app.snyk.io/org/kpt-fn-bot/project/206705c7-640c-491f-9f5b-bcb93537444e?utm_source=github&utm_medium=upgrade-pr * upsert-resource function (#298) * upsert-resource function * Check set annotations error * Deep copy matched resource * update diff.patch * Suggested changes * Refactor to handle meta annotations * Suggested changes * Check for fn config annotation * remove new line * Suggested changes * Better handle empty values for apply-setters (#317) * Better handle empty values * Empty string and empty sequence * Fix function (#308) * Fix function * Update resources grouping in packages * Simple example * lint changes * Remove diff.patch and add later * Docs changes * Output results * fix: upgrade @types/node from 14.14.42 to 14.14.43 (#319) Snyk has created this PR to upgrade @types/node from 14.14.42 to 14.14.43. See this package in npm: https://www.npmjs.com/package/@types/node See this project in Snyk: https://app.snyk.io/org/kpt-fn-bot/project/5ee802a9-8df2-4243-be28-e1da63426b99?utm_source=github&utm_medium=upgrade-pr * Upgrade kyaml to v0.10.20 in functions (#318) * Upgrade kyaml to v0.10.19 in apply-setters, search-replace * Update other functions * Upgrade to v0.10.20 * Add setters first to the pipelint (#320) * Add "open an issue" link to README (#321) * Skip missing and contributed funcs in site. (#322) * Skip missing and contrib funcs in site. * Check site on catalog gen script changes. * Update example packages to use new kpt (#275) * update README in examples * use new kpt in tests * update CI * temporarily skip sops e2e test * fix eval tests * replace inline CRD config with configPath * make pkg name before flags * code review * update expected stderr * address comments * Switch back to function name in catalog. (#326) * fix: upgrade @types/node from 14.14.43 to 14.14.44 (#331) Snyk has created this PR to upgrade @types/node from 14.14.43 to 14.14.44. See this package in npm: https://www.npmjs.com/package/@types/node See this project in Snyk: https://app.snyk.io/org/kpt-fn-bot/project/206705c7-640c-491f-9f5b-bcb93537444e?utm_source=github&utm_medium=upgrade-pr * fix: upgrade @types/jasmine from 3.6.10 to 3.7.0 (#330) Snyk has created this PR to upgrade @types/jasmine from 3.6.10 to 3.7.0. See this package in npm: https://www.npmjs.com/package/@types/jasmine See this project in Snyk: https://app.snyk.io/org/kpt-fn-bot/project/206705c7-640c-491f-9f5b-bcb93537444e?utm_source=github&utm_medium=upgrade-pr * fix: upgrade prettier from 2.2.1 to 2.3.0 (#335) Snyk has created this PR to upgrade prettier from 2.2.1 to 2.3.0. See this package in npm: https://www.npmjs.com/package/prettier See this project in Snyk: https://app.snyk.io/org/kpt-fn-bot/project/206705c7-640c-491f-9f5b-bcb93537444e?utm_source=github&utm_medium=upgrade-pr * fix: upgrade @types/jasmine from 3.7.0 to 3.7.1 (#334) Snyk has created this PR to upgrade @types/jasmine from 3.7.0 to 3.7.1. See this package in npm: https://www.npmjs.com/package/@types/jasmine See this project in Snyk: https://app.snyk.io/org/kpt-fn-bot/project/206705c7-640c-491f-9f5b-bcb93537444e?utm_source=github&utm_medium=upgrade-pr * fix: upgrade @types/jasmine from 3.7.1 to 3.7.2 (#336) Snyk has created this PR to upgrade @types/jasmine from 3.7.1 to 3.7.2. See this package in npm: https://www.npmjs.com/package/@types/jasmine See this project in Snyk: https://app.snyk.io/org/kpt-fn-bot/project/206705c7-640c-491f-9f5b-bcb93537444e?utm_source=github&utm_medium=upgrade-pr * set imagePullPolicy to ifNotPresent in e2e tests (#332) * set imagePullPolicy to ifNotPresent in e2e tests This is to ensure we are testing the newly built images * not use internal package * Use never for image-pull-policy in e2e tests * rename enforce-gatekeeper to gatekeeper (#327) * build(deps): bump ws from 6.2.1 to 6.2.2 in /functions/ts/kubeval (#337) Bumps [ws](https://github.com/websockets/ws) from 6.2.1 to 6.2.2. - [Release notes](https://github.com/websockets/ws/releases) - [Commits](https://github.com/websockets/ws/commits) --- updated-dependencies: - dependency-name: ws dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump ws in /functions/contrib/ts/analyze-istio (#338) Bumps [ws](https://github.com/websockets/ws) from 6.2.1 to 6.2.2. - [Release notes](https://github.com/websockets/ws/releases) - [Commits](https://github.com/websockets/ws/commits) --- updated-dependencies: - dependency-name: ws dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump ws from 6.2.1 to 6.2.2 in /functions/contrib/ts/sops (#339) Bumps [ws](https://github.com/websockets/ws) from 6.2.1 to 6.2.2. - [Release notes](https://github.com/websockets/ws/releases) - [Commits](https://github.com/websockets/ws/commits) --- updated-dependencies: - dependency-name: ws dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump ws in /functions/contrib/ts/inflate-helm-chart (#340) Bumps [ws](https://github.com/websockets/ws) from 6.2.1 to 6.2.2. - [Release notes](https://github.com/websockets/ws/releases) - [Commits](https://github.com/websockets/ws/commits) --- updated-dependencies: - dependency-name: ws dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update docs for 1.0 compatibility (#341) * update usage doc for gatekeeper and starlark (#342) * update usage doc for gatekeeper and starlark * code review * update pkg in tests dir * code review * Rename simple to set-namespace and add a few more examples * fix: upgrade @types/node from 14.14.44 to 14.14.45 (#343) Snyk has created this PR to upgrade @types/node from 14.14.44 to 14.14.45. See this package in npm: https://www.npmjs.com/package/@types/node See this project in Snyk: https://app.snyk.io/org/kpt-fn-bot/project/206705c7-640c-491f-9f5b-bcb93537444e?utm_source=github&utm_medium=upgrade-pr * bump kyaml to v0.10.20 for starlark and gatekeeper (#344) * bump kyaml to v0.10.20 for starlark and gatekeeper * minor tweak Co-authored-by: Frank Farzan <frankf@google.com> Co-authored-by: Snyk bot <snyk-bot@snyk.io> Co-authored-by: phani <pmarupaka@google.com> Co-authored-by: etefera <31711490+etefera@users.noreply.github.com> Co-authored-by: Morten Torkildsen <mortent@google.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Alexey Odinokov <alexey.odinokov.82@gmail.com> Co-authored-by: Stefan Henseler <stefan.henseler@synax.io> Co-authored-by: Sam Wronski <samwronski@google.com>
1 parent 7ca1651 commit d5f0f70

File tree

353 files changed

+9539
-2682
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

353 files changed

+9539
-2682
lines changed

.github/hooks/pre-commit

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
cd functions/go;
4+
echo "Generating docs..."
5+
make generate;
6+
diff=`git diff`
7+
8+
if [[ $diff != "" ]];
9+
then
10+
echo "found unstaged changes. Please ensure you have run `make generate` to update the generated docs and add them before commit."
11+
exit 1
12+
else
13+
exit 0
14+
fi

.github/workflows/checkSite.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Copyright 2021 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: CheckSite
16+
on:
17+
pull_request:
18+
paths:
19+
- "functions/**"
20+
- "examples/**"
21+
- "site/**"
22+
- "scripts/generate_catalog/**"
23+
jobs:
24+
build:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v2
28+
with:
29+
fetch-depth: 0
30+
- uses: actions/checkout@v2
31+
with:
32+
repository: etefera/href-checker
33+
ref: docsify
34+
path: href-checker
35+
- uses: actions/setup-node@v2
36+
with:
37+
node-version: '14'
38+
- name: Install Site Checker
39+
run: yarn install
40+
working-directory: href-checker
41+
- name: Set up Docker Buildx
42+
uses: docker/setup-buildx-action@v1
43+
- name: Run Site Checker
44+
run: make site-check

.github/workflows/ci.yaml

Lines changed: 11 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -67,50 +67,34 @@ jobs:
6767
cd functions/go
6868
make check-licenses
6969
70-
verify-ci:
71-
runs-on: ubuntu-latest
72-
env:
73-
GOPATH: /home/runner/work/kpt-functions-catalog/functions/go
74-
GO111MODULE: on
75-
steps:
76-
- uses: actions/checkout@v2
77-
- name: Set up python 3
78-
uses: actions/setup-python@v2
79-
- name: Install libs
80-
run: |
81-
pip install pyyaml
82-
- name: Set up Go 1.15
83-
uses: actions/setup-go@v2
84-
with:
85-
go-version: 1.15
86-
- name: Install mdrip
87-
run: |
88-
go get github.com/russross/blackfriday/v2@v2.0.1
89-
go get github.com/monopole/mdrip@v1.0.2
90-
- name: Verify docs
91-
run: |
92-
make verify-docs
93-
9470
e2e-ci:
95-
needs: [ts-unit-test-ci, go-unit-test-ci, verify-ci]
71+
needs: [ts-unit-test-ci, go-unit-test-ci]
9672
strategy:
9773
matrix:
9874
platform: [ubuntu-latest]
9975
node-version: [12.x]
10076
runs-on: ${{ matrix.platform }}
77+
env:
78+
GOPATH: /home/runner/work/kpt-functions-catalog/functions/go
79+
GO111MODULE: on
10180
steps:
10281
- uses: actions/checkout@v2
10382
- name: Use Node.js ${{ matrix.node-version }}
10483
uses: actions/setup-node@v1
10584
with:
10685
node-version: ${{ matrix.node-version }}
86+
- name: Set up Go 1.15
87+
uses: actions/setup-go@v2
88+
with:
89+
go-version: 1.15
90+
- name: Install kpt
91+
run: |
92+
go get github.com/GoogleContainerTools/kpt@next
10793
- name: Build node and Go docker images
10894
if: matrix.platform == 'ubuntu-latest'
10995
run: |
11096
make build
11197
- name: Run all tests
11298
if: matrix.platform == 'ubuntu-latest'
11399
run: |
114-
sudo curl https://storage.googleapis.com/kpt-dev/latest/linux_amd64/kpt -o /usr/local/bin/kpt
115-
sudo chmod +x /usr/local/bin/kpt
116100
make e2e-test
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# This file was initially auto-generated by the Firebase CLI
2+
# https://github.com/firebase/firebase-tools
3+
4+
name: Deploy to Firebase Hosting on merge
5+
on:
6+
push:
7+
branches:
8+
- master
9+
- "*/v[0-9]+.[0-9]+"
10+
jobs:
11+
build_and_deploy:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
with:
16+
fetch-depth: 0
17+
- name: Generate Site
18+
run: make site-generate
19+
- uses: FirebaseExtended/action-hosting-deploy@276388dd6c2cde23455b30293105cc866c22282d # v0
20+
with:
21+
repoToken: '${{ secrets.GITHUB_TOKEN }}'
22+
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_KPT_DEV }}'
23+
channelId: live
24+
projectId: kpt-dev
25+
entryPoint: site
26+
env:
27+
FIREBASE_CLI_PREVIEWS: hostingchannels

.github/workflows/verify-docs.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: verify-docs
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
- '*/v[0-9]+.[0-9]+'
8+
9+
jobs:
10+
verify-ci:
11+
runs-on: ubuntu-latest
12+
env:
13+
GOPATH: /home/runner/work/kpt-functions-catalog/functions/go
14+
GO111MODULE: on
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Set up python 3
18+
uses: actions/setup-python@v2
19+
- name: Install libs
20+
run: |
21+
pip install pyyaml
22+
- name: Set up Go 1.15
23+
uses: actions/setup-go@v2
24+
with:
25+
go-version: 1.15
26+
- name: Install mdrip
27+
run: |
28+
go get github.com/russross/blackfriday/v2@v2.0.1
29+
go get github.com/monopole/mdrip@v1.0.2
30+
- name: Verify docs
31+
run: |
32+
make verify-docs

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.idea
2+
.vscode
23
dist
34
node_modules
45
*.iml

Makefile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,14 @@ push: ## Push images to registry. WARN: This operation should only be done in CI
5555
cd functions/contrib/ts && $(MAKE) push
5656

5757
site-generate: ## Collect function branches and generate a catalog of their examples and documentation using kpt next.
58-
rm -rf ./examples/*/
58+
rm -rf ./site/*/
5959
# GO111MODULE=on go get -v github.com/GoogleContainerTools/kpt@next
60-
(cd scripts/generate_catalog/ && go run . ../.. ../../examples)
60+
(cd scripts/generate_catalog/ && go run . ../.. ../../site)
61+
62+
site-run: ## Run the site locally.
63+
make site-generate
64+
./scripts/run-site.sh
65+
66+
site-check: ## Test site for broken catalog links.
67+
make site-run
68+
./scripts/check-site.sh

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
[Documentation]
66

7+
[Open an Issue]
8+
79
[Contributor Guide]
810

911
[Release Process]
@@ -14,3 +16,4 @@
1416
[Contributor Guide]: CONTRIBUTING.md
1517
[Code of Conduct]: CODE_OF_CONDUCT.md
1618
[Release Process]: RELEASING.md
19+
[Open an Issue]: https://github.com/GoogleContainerTools/kpt/issues

examples/_template/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# some-image-foo: Example Title
22

3-
## Overview
3+
### Overview
44

55
1. Explain what this particular example demonstrates.
66
2. Include a link to the function reference (help doc) on first mention of the function.
@@ -9,15 +9,15 @@
99
1. Explain what this function config does.
1010
Focus on explaining this particular example, not repeating the function reference.
1111

12-
## Function invocation
12+
### Function invocation
1313

1414
4. Show exact `kpt` commands to get the example package and run the function.
1515

16-
## Expected result
16+
### Expected result
1717

1818
5. Describe the expected outcome of running the instructions above. This needs to be specific enough
1919
so that the user is confident the function works as expected (Don't just provide the command to `cat` a file).
2020

21-
## Function Reference
21+
### Function Reference
2222

23-
6. Provide a link to the function help doc for reference.
23+
6. Provide a link to the function help doc for reference.

examples/apply-setters/simple/.expected/diff.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/resources.yaml b/resources.yaml
2-
index c0c871e..cd75f56 100644
2+
index c79db4d..6dc582c 100644
33
--- a/resources.yaml
44
+++ b/resources.yaml
55
@@ -1,7 +1,7 @@
@@ -15,6 +15,6 @@ index c0c871e..cd75f56 100644
1515
metadata:
1616
name: ns
1717
environments: # kpt-set: ${env}
18-
-- dev
19-
+- prod
20-
- stage
18+
- - dev
19+
+ - prod
20+
- stage

0 commit comments

Comments
 (0)