Skip to content

Commit

Permalink
Ensure name substring/v0.1 (#356)
Browse files Browse the repository at this point in the history
* 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] <[email protected]>

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] <[email protected]>

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] <[email protected]>

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] <[email protected]>

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] <[email protected]>

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] <[email protected]>

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] <[email protected]>

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] <[email protected]>

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 <[email protected]>

Co-authored-by: Mengqi Yu <[email protected]>

* 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] <[email protected]>

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] <[email protected]>

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] <[email protected]>

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] <[email protected]>

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 <[email protected]>

* 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] <[email protected]>

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] <[email protected]>

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] <[email protected]>

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] <[email protected]>

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

* fix: upgrade @types/jasmine from 3.7.2 to 3.7.4 (#349)

Snyk has created this PR to upgrade @types/jasmine from 3.7.2 to 3.7.4.

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

* added create-setters function  (#333)

* create-setters added

* create-setters: functionality

* added comments

* updated tests, generated docs

* updated Results

* fixed typos

* modified functions

* added comments

* create-setters

* create-setters added

* create-setters: functionality

* added comments

* updated tests, generated docs

* updated Results

* fixed typos

* modified functions

* added comments

* scalar-setters

* modified docs

* added tests for linecomment

* added examples

* fixed typo

* doc changes

* fixed markdown

* checks

* updated kptfile

* address comments

* docs style

* docs style

* diff

* changes

Co-authored-by: Frank Farzan <[email protected]>
Co-authored-by: Snyk bot <[email protected]>
Co-authored-by: phani <[email protected]>
Co-authored-by: etefera <[email protected]>
Co-authored-by: Morten Torkildsen <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexey Odinokov <[email protected]>
Co-authored-by: Stefan Henseler <[email protected]>
Co-authored-by: Sam Wronski <[email protected]>
Co-authored-by: NagaHarshita <[email protected]>
  • Loading branch information
11 people authored Jun 8, 2021
1 parent db64705 commit 26884e3
Show file tree
Hide file tree
Showing 368 changed files with 11,361 additions and 2,682 deletions.
14 changes: 14 additions & 0 deletions .github/hooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

cd functions/go;
echo "Generating docs..."
make generate;
diff=`git diff`

if [[ $diff != "" ]];
then
echo "found unstaged changes. Please ensure you have run `make generate` to update the generated docs and add them before commit."
exit 1
else
exit 0
fi
44 changes: 44 additions & 0 deletions .github/workflows/checkSite.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: CheckSite
on:
pull_request:
paths:
- "functions/**"
- "examples/**"
- "site/**"
- "scripts/generate_catalog/**"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/checkout@v2
with:
repository: etefera/href-checker
ref: docsify
path: href-checker
- uses: actions/setup-node@v2
with:
node-version: '14'
- name: Install Site Checker
run: yarn install
working-directory: href-checker
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Run Site Checker
run: make site-check
38 changes: 11 additions & 27 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,50 +67,34 @@ jobs:
cd functions/go
make check-licenses
verify-ci:
runs-on: ubuntu-latest
env:
GOPATH: /home/runner/work/kpt-functions-catalog/functions/go
GO111MODULE: on
steps:
- uses: actions/checkout@v2
- name: Set up python 3
uses: actions/setup-python@v2
- name: Install libs
run: |
pip install pyyaml
- name: Set up Go 1.15
uses: actions/setup-go@v2
with:
go-version: 1.15
- name: Install mdrip
run: |
go get github.com/russross/blackfriday/[email protected]
go get github.com/monopole/[email protected]
- name: Verify docs
run: |
make verify-docs
e2e-ci:
needs: [ts-unit-test-ci, go-unit-test-ci, verify-ci]
needs: [ts-unit-test-ci, go-unit-test-ci]
strategy:
matrix:
platform: [ubuntu-latest]
node-version: [12.x]
runs-on: ${{ matrix.platform }}
env:
GOPATH: /home/runner/work/kpt-functions-catalog/functions/go
GO111MODULE: on
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Set up Go 1.15
uses: actions/setup-go@v2
with:
go-version: 1.15
- name: Install kpt
run: |
go get github.com/GoogleContainerTools/kpt@next
- name: Build node and Go docker images
if: matrix.platform == 'ubuntu-latest'
run: |
make build
- name: Run all tests
if: matrix.platform == 'ubuntu-latest'
run: |
sudo curl https://storage.googleapis.com/kpt-dev/latest/linux_amd64/kpt -o /usr/local/bin/kpt
sudo chmod +x /usr/local/bin/kpt
make e2e-test
27 changes: 27 additions & 0 deletions .github/workflows/firebase-hosting-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# This file was initially auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools

name: Deploy to Firebase Hosting on merge
on:
push:
branches:
- master
- "*/v[0-9]+.[0-9]+"
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Generate Site
run: make site-generate
- uses: FirebaseExtended/action-hosting-deploy@276388dd6c2cde23455b30293105cc866c22282d # v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_KPT_DEV }}'
channelId: live
projectId: kpt-dev
entryPoint: site
env:
FIREBASE_CLI_PREVIEWS: hostingchannels
32 changes: 32 additions & 0 deletions .github/workflows/verify-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: verify-docs

on:
pull_request:
branches:
- master
- '*/v[0-9]+.[0-9]+'

jobs:
verify-ci:
runs-on: ubuntu-latest
env:
GOPATH: /home/runner/work/kpt-functions-catalog/functions/go
GO111MODULE: on
steps:
- uses: actions/checkout@v2
- name: Set up python 3
uses: actions/setup-python@v2
- name: Install libs
run: |
pip install pyyaml
- name: Set up Go 1.15
uses: actions/setup-go@v2
with:
go-version: 1.15
- name: Install mdrip
run: |
go get github.com/russross/blackfriday/[email protected]
go get github.com/monopole/[email protected]
- name: Verify docs
run: |
make verify-docs
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.idea
.vscode
dist
node_modules
*.iml
Expand Down
12 changes: 10 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,14 @@ push: ## Push images to registry. WARN: This operation should only be done in CI
cd functions/contrib/ts && $(MAKE) push

site-generate: ## Collect function branches and generate a catalog of their examples and documentation using kpt next.
rm -rf ./examples/*/
rm -rf ./site/*/
# GO111MODULE=on go get -v github.com/GoogleContainerTools/kpt@next
(cd scripts/generate_catalog/ && go run . ../.. ../../examples)
(cd scripts/generate_catalog/ && go run . ../.. ../../site)

site-run: ## Run the site locally.
make site-generate
./scripts/run-site.sh

site-check: ## Test site for broken catalog links.
make site-run
./scripts/check-site.sh
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

[Documentation]

[Open an Issue]

[Contributor Guide]

[Release Process]
Expand All @@ -14,3 +16,4 @@
[Contributor Guide]: CONTRIBUTING.md
[Code of Conduct]: CODE_OF_CONDUCT.md
[Release Process]: RELEASING.md
[Open an Issue]: https://github.com/GoogleContainerTools/kpt/issues
10 changes: 5 additions & 5 deletions examples/_template/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# some-image-foo: Example Title

## Overview
### Overview

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

## Function invocation
### Function invocation

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

## Expected result
### Expected result

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

## Function Reference
### Function Reference

6. Provide a link to the function help doc for reference.
6. Provide a link to the function help doc for reference.
8 changes: 4 additions & 4 deletions examples/apply-setters/simple/.expected/diff.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/resources.yaml b/resources.yaml
index c0c871e..cd75f56 100644
index c79db4d..6dc582c 100644
--- a/resources.yaml
+++ b/resources.yaml
@@ -1,7 +1,7 @@
Expand All @@ -15,6 +15,6 @@ index c0c871e..cd75f56 100644
metadata:
name: ns
environments: # kpt-set: ${env}
-- dev
+- prod
- stage
- - dev
+ - prod
- stage
12 changes: 12 additions & 0 deletions examples/apply-setters/simple/Kptfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: kpt.dev/v1alpha2
kind: Kptfile
metadata:
name: example
pipeline:
mutators:
- image: gcr.io/kpt-fn/apply-setters:unstable
configMap:
env: |
- prod
- stage
name: my-new-map
21 changes: 11 additions & 10 deletions examples/apply-setters/simple/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# apply-setters: Simple Example

### Overview

Setters provide a solution for template-free setting of field values. The
`apply-setters` KRM config function applies setter values to resource fields
with setter references.
Expand All @@ -23,7 +25,7 @@ environments: # kpt-set: ${env}
- stage
```
We use ConfigMap to configure the `apply-setters` function. The desired
We use `ConfigMap` to configure the `apply-setters` function. The desired
setter values are provided as key-value pairs using `data` field where key is
the name of the setter(as seen in the reference comments) and value is the new
desired value for the tagged field.
Expand Down Expand Up @@ -59,21 +61,20 @@ environments: # kpt-set: ${env}
- stage
```

## Function invocation
### Function invocation

Get the config example and try it out by running the following commands:

<!-- @getAndRunPkg @test -->
```sh
kpt pkg get https://github.com/GoogleContainerTools/kpt-functions-catalog.git/examples/apply-setters/simple .
kpt fn run simple
```shell
$ kpt pkg get https://github.com/GoogleContainerTools/kpt-functions-catalog.git/examples/apply-setters/simple .
$ kpt fn render simple
```

## Expected result
### Expected result

Check the value of setter `name` is set to `my-new-map`.
Check the value of setter `env` is set to array value `[prod, stage]`.

```sh
$ kpt cfg cat simple/
```
#### Note:

Refer to the `create-setters` example in `search-replace` function examples for creating setters.
14 changes: 0 additions & 14 deletions examples/apply-setters/simple/fn-config.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions examples/apply-setters/simple/resources.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ kind: MyKind
metadata:
name: ns
environments: # kpt-set: ${env}
- dev
- stage
- dev
- stage
1 change: 0 additions & 1 deletion examples/contrib/analyze-istio/.expected/config.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
exitCode: 1
runCount: 2
37 changes: 19 additions & 18 deletions examples/contrib/analyze-istio/.expected/results.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
- message: 'Istioctl analyze command results in error: function toString() { [native
code] }'
severity: error
file:
path: ''
- message: 'Schema validation error: gateway must have at least one server'
severity: error
tags:
documentation_url: 'https://istio.io/docs/reference/config/analysis/IST0106?ref=istioctl-analyze'
origin: Gateway httpbin-gateway.default
code: IST0106
resourceRef:
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
namespace: ''
name: httpbin-gateway
file:
path: istio-config.yaml
apiVersion: kpt.dev/v1alpha2
kind: FunctionResultList
metadata:
name: fnresults
exitCode: 1
items:
- image: gcr.io/kpt-fn-contrib/analyze-istio:unstable
exitCode: 1
results:
- message: 'Istioctl analyze command results in error: function toString() { [native code] }'
severity: error
- message: 'Schema validation error: gateway must have at least one server'
severity: error
resourceRef:
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
name: httpbin-gateway
file:
path: istio-config.yaml
Loading

0 comments on commit 26884e3

Please sign in to comment.