docs-v1/design_proposals/integrationtest-command.md
Author(s): Dominic Werner (@daddz)
Design Shepherd: Tejal Desai (@tejal29)
Date: 2019-08-16
Status: Cancelled
Reason:
We discussed this proposal in Skaffold Community Hours and decided at this moment, the design proposal is just an entry point for running a script. It is not built up on Skaffold's run knowledge so far. With that said, the core team agrees Skaffold does not a solution for #2561 and #992 and we want to explore this space.
Currently, skaffold has no support for running integration/unit tests that are part of a built artifact. Since this is a crucial part of a CI/CD pipeline it would be good to support this feature so skaffold can be used in every step of a pipeline.
Proof-of-concept:
Related issues:
integrationtest:
podSelector: 'app=skaffold-integration'
testCommand: 'pytest tests/pass.py'
A top-level key called integrationtest holds the configuration for running
integration tests with skaffold.
podSelector: Define in which pod the tests shall be executed.
The pod will be looked up via the defined label across all namespaces.
testCommand: Define the test command that will be executed in the pod.
The configuration is not required and thus should not impact older versions.
A new command called skaffold integrationtest is implemented that takes
the values from skaffold.yaml to execute the tests and report the output
and outcome.
This command can then be used locally or within the CI pipeline.
The usage within a CI pipeline could look like this:
skaffold build --file-output build.jsonskaffold deploy -n $(pipeline_id) -a build.jsonskaffold integrationtestskaffold delete -n $(pipeline_id)skaffold deploy -a build.jsonDoes this approach make sense for different languages/frameworks?
Resolution: Not Yet Resolved
Should the command look for the pod in all namespaces or shall it require it to be defined since usually one would deploy to a fresh namespace and execute the tests there explicitly?
Resolution: Not Yet Resolved
integrationtest and test schema validationpodSelector and testCommand to integrationtest and test schema validationintegrationtestintegrationtest command