-
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.
chore: Add policy bundle kpt fn (#338)
* Add kpt fn to get a policy bundle and write to sink dir. Fn is working locally. * Add kpt function to get a policy bundle. Add shared code from generateDocs to common, will remove from generateDocs function. Add tests for the core functionality. Add dockerfile for policy bundle function. * Update generate docs kpt fn to use common code, add kpt fn documentation. * Remove comment from common. Fix cmek settings sample. * Add cloudbuild config for testing kpt functions. Add docs for tests. * Update target name for kpt tests * Update build command for kpt tests. * Update kpt test cmd. Merge master * Revert inadvertent changes to cmek test constraint. * Try running npm install before npm test * Add tslint config, fix lint errors, and add lint step to cloud build. * Use safeDump for writing yaml * Addressed PR feedback. Removed ability for getPolicyBundle meeting to write files. Simplified some of the tests. Fixed issue with markdown-table import. Updated docs.
- Loading branch information
1 parent
19ae992
commit e869e1a
Showing
158 changed files
with
3,440 additions
and
1,438 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
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,33 @@ | ||
FROM node:10-alpine as builder | ||
|
||
RUN mkdir -p /home/node/app && \ | ||
chown -R node:node /home/node/app | ||
|
||
USER node | ||
|
||
WORKDIR /home/node/app | ||
|
||
# Install dependencies and cache them. | ||
COPY --chown=node:node package*.json ./ | ||
RUN npm ci | ||
|
||
# Build the source. | ||
COPY --chown=node:node tsconfig.json . | ||
COPY --chown=node:node src src | ||
RUN npm run build && \ | ||
npm prune --production && \ | ||
rm -r src tsconfig.json | ||
|
||
############################################# | ||
|
||
FROM node:10-alpine | ||
|
||
# Run as non-root user as a best-practices: | ||
# https://github.com/nodejs/docker-node/blob/master/docs/BestPractices.md | ||
USER node | ||
|
||
WORKDIR /home/node/app | ||
|
||
COPY --from=builder /home/node/app /home/node/app | ||
|
||
ENTRYPOINT ["node", "/home/node/app/dist/get_policy_bundle_run.js"] |
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.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.