Comments (4)
Hi thanks for your feedback. I'm hearing a few questions:
- How can I get this to work?
- Why did you choose the pattern you did for this action?
Assuming that's right:
-
How:
- Action inputs are specified in action.yml, and documented in the README
- There are a number of public helm repos using
@helm/chart-testing-action
, following this example. This is just to say it does work - Chart testing configuration for this action should be done by specifying a config file. You can see a working example in the
helm/charts-repo-actions-demo
Lint and Test Charts workflow - In your example above, you'll also want to specify the action ref (see using versioned actions). Again see how this is done in the
helm/charts-repo-actions-demo
workflows
-
Why:
- We chose the JavaScript option option for
@helm/chart-testing-action
because – while somect
commands can be run independently (likelint
) – somect
commands (install
,lint-and-install
) require a working Kubernetes cluster - Note: we encourage using @helm/kind-action, as it was built for this purpose)
- Because this action must interact with a cluster, it must be able to interact with the functional k8s cluster through a KUBECONFIG. When we built this action there wasn't a clear path on how to do that using the Dockerfile option
- There may be another reason I'm forgetting. If so, @unguiculus may remember
- I'm not sure how plausible it could be to refactor this action to use the Dockerfile option. But even if it were, given that we're very close to a full stable release, what would be the advantages?
- We chose the JavaScript option option for
from chart-testing-action.
Hi @scottrigby
Thanks for getting back to me regarding my rant :-)
I will give it another try to see if I can get it to work.
As to your question. You will be able to get all the features you need. The entire workspace is mounted directly inside the docker container. therefore the kubeconf and ct.conf will be available.
Further more you will be able to get rid of the complexity of the current call path going through js and shell scripts (including all the docker container management that is being done). it should possible to get all logs as well
If you like i would be more then happy to make a pull request to show how it can be implemented.
from chart-testing-action.
You can either use JavaScript or a Docker. Unfortunately, there's no other choice. As @scottrigby pointed out, the only way for us is JavaScript because we need to create Kubernetes clusters for testing using kind. Docker actions have a number of limitations which don't allow that.
We use as little JavaScript as possible just calling a shell script which can be indepenently run and tested. Most actions out there are based on GitHub's action starters which require an NPM build. IMHO this is a pain to develop and test because it requires running an NPM build and committing build artifacts.
The whole logic is in a shell script which IMHO should be easier to understand than a lot of JavaScript code that needs to be compiled and that calls out to the shell instead.
The script ct.sh
is to be seen as an independent shell script that can be run and tested in isolation and is just called by the GitHub action. As such, it has a set of parameters that the script has to parse.
The script main.sh
is only there to parse action inputs so they can be passed to ct.sh
. One could certainly merge the scripts but then ct.sh
would incorporate GH action logic which I rather have decoupled and the script would be harder to test in isolation.
The script main.js
is the entrypoint and pretty much the minimal amount of JavaScript need to call main.sh
. It can be used as is. It does not use any dependencies and, thus, does not require an NPM build.
from chart-testing-action.
Closing this now. Feel free to open a new issue if you still have questions.
from chart-testing-action.
Related Issues (20)
- Error: failed installing charts: failed identifying charts to process: failed running process: exit status 128 HOT 5
- Document how to test charts that contains a CRD HOT 1
- No chart changes detected HOT 9
- gzip: stdin: not in gzip format
- The `changed` in step `list-changed` will always be true HOT 1
- Example in README.md does not work
- Script download wrong binary
- Add support for github.com authentication token
- failed to set up chart-testing with pip3 install failiure HOT 1
- Version 2.5.0? HOT 4
- Setting up a imagePullSecrets for a private github repo to fetch the Docker image HOT 2
- Unable to validate cosign version: 'v2.0.0' HOT 17
- v2.5.0 is giving an error of `targetBranch main does not exist` HOT 11
- Using helm-extra-args: --timeout 600s in config file causes "unknown flag" HOT 3
- v2 still points to v2.6.0 and not v2.6.1
- Option to use global Python install HOT 1
- Are there plans to create a security policy?
- directory is not a valid chart directory
- list-changed step result is not taken care of any other steps. How can I check what it returns?
- README: uses: helm/[email protected] HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chart-testing-action.