Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: deprecate args #475

Merged
merged 23 commits into from
May 3, 2023
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
155 changes: 147 additions & 8 deletions charts/testkube-api/executors.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@
"executor": {
"executorType": "job",
"image": "kubeshop/testkube-playwright-executor:1.11.5",
"command": [
"<depManager>"
],
"args": [
"<depCommand>",
"playwright",
"test"
],
"types": [
"playwright/test"
],
Expand All @@ -25,6 +33,22 @@
"executor": {
"executorType": "job",
"image": "kubeshop/testkube-jmeter-executor:1.11.5",
"command": [
"<entryPoint>"
],
"args": [
"-n",
"-j",
"<logFile>",
"-t",
"<runPath>",
"-l",
"<jtlFile>",
"-e",
"-o",
"<reportFile>",
"<envVars>"
],
"types": [
"jmeter/test"
],
Expand All @@ -49,6 +73,21 @@
"executor": {
"executorType": "job",
"image": "kubeshop/testkube-ginkgo-executor:1.11.5",
"command": [
"ginkgo"
],
"args": [
"-r",
"-p",
"--randomize-all",
"--randomize-suites",
"--keep-going",
"--trace",
"--junit-report",
"<reportFile>",
"<envVars>",
"<runPath>"
],
"types": [
"ginkgo/test"
],
Expand All @@ -74,6 +113,16 @@
"executor": {
"executorType": "job",
"image": "kubeshop/testkube-maven-executor:1.11.5",
"command": [
"mvn"
],
"args": [
"--settings",
"<settingsFile>",
"<goalName>",
"-Duser.home",
"<mavenHome>"
],
"types": [
"maven/project",
"maven/test",
Expand All @@ -83,7 +132,9 @@
"git-dir",
"git"
],
"features": [],
"features": [
"artifacts"
],
"meta": {
"iconURI": "maven",
"docsURI": "https://kubeshop.github.io/testkube/test-types/executor-maven"
Expand All @@ -95,6 +146,15 @@
"executor": {
"executorType": "job",
"image": "kubeshop/testkube-gradle-executor:1.11.5",
"command": [
"gradle"
],
"args": [
"--no-daemon",
"<taskName>",
"-p",
"<projectDir>"
],
"types": [
"gradle/project",
"gradle/test",
Expand All @@ -104,7 +164,9 @@
"git-dir",
"git"
],
"features": [],
"features": [
"artifacts"
],
"meta": {
"iconURI": "gradle",
"docsURI": "https://kubeshop.github.io/testkube/test-types/executor-gradle"
Expand All @@ -116,6 +178,14 @@
"executor": {
"executorType": "job",
"image": "kubeshop/testkube-kubepug-executor:1.11.5",
"command": [
"kubepug"
],
"args": [
"--format=json",
"--input-file",
"<runPath>"
],
"types": [
"kubepug/yaml",
"kubepug/json"
Expand All @@ -127,7 +197,9 @@
"git-dir",
"git"
],
"features": [],
"features": [
"artifacts"
],
"meta": {
"iconURI": "kubepug",
"docsURI": "https://kubeshop.github.io/testkube/test-types/executor-kubepug"
Expand All @@ -139,6 +211,13 @@
"executor": {
"executorType": "job",
"image": "kubeshop/testkube-soapui-executor:1.11.5",
"command": [
"/bin/sh",
"/usr/local/SmartBear/EntryPoint.sh"
],
"args": [
"<runPath>"
],
"types": [
"soapui/xml"
],
Expand All @@ -162,6 +241,14 @@
"executor": {
"executorType": "job",
"image": "kubeshop/testkube-k6-executor:1.11.5",
"command": [
"k6"
],
"args": [
"<k6Command>",
"<envVars>",
"<runPath>"
],
"types": [
"k6/script"
],
Expand All @@ -172,7 +259,9 @@
"git-dir",
"git"
],
"features": [],
"features": [
"artifacts"
],
"meta": {
"iconURI": "k6",
"docsURI": "https://kubeshop.github.io/testkube/test-types/executor-k6"
Expand All @@ -184,6 +273,20 @@
"executor": {
"executorType": "job",
"image": "kubeshop/testkube-cypress-executor:1.11.5",
"command": [
"./node_modules/cypress/bin/cypress"
],
"args": [
"run",
"--reporter",
"junit",
"--reporter-options",
"mochaFile=<reportFile>,toConsole=false",
"--project",
"<projectPath>",
"--env",
"<envVars>"
],
"types": [
"cypress/project"
],
Expand All @@ -206,6 +309,12 @@
"executor": {
"executorType": "job",
"image": "kubeshop/testkube-curl-executor:1.11.5",
"command": [
"curl"
],
"args": [
"-is"
],
"types": [
"curl/test"
],
Expand All @@ -215,7 +324,9 @@
"git-file",
"git"
],
"features": [],
"features": [
"artifacts"
],
"meta": {
"iconURI": "curl",
"docsURI": "https://kubeshop.github.io/testkube/test-types/executor-curl"
Expand All @@ -226,7 +337,20 @@
"name": "postman-executor",
"executor": {
"executorType": "job",
"image": "kubeshop/testkube-postman-executor:1.11.5",
"image": "kubeshop/testkube-postman-executor",
"command": [
"newman"
],
"args": [
"run",
"<runPath>",
"-e",
"<envFile>",
"--reporters",
"cli,json",
"--reporter-json-export",
"<reportFile>"
],
"types": [
"postman/collection"
],
Expand All @@ -236,7 +360,9 @@
"git-file",
"git"
],
"features": [],
"features": [
"artifacts"
],
"meta": {
"iconURI": "postman",
"docsURI": "https://kubeshop.github.io/testkube/test-types/executor-postman"
Expand All @@ -248,6 +374,17 @@
"executor": {
"executorType": "job",
"image": "kubeshop/testkube-artillery-executor:1.11.5",
"command": [
"artillery"
],
"args": [
"run",
"<runPath>",
"--dotenv",
"<envFile>",
"-o",
"<reportFile>"
],
"types": [
"artillery/test"
],
Expand All @@ -258,7 +395,9 @@
"git-dir",
"git"
],
"features": [],
"features": [
"artifacts"
],
"meta": {
"iconURI": "artillery",
"docsURI": "https://kubeshop.github.io/testkube/test-types/executor-artillery"
Expand Down
6 changes: 6 additions & 0 deletions charts/testkube-api/job-container-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ spec:
mountPath: /etc/certs
{{- end }}
{{- if .ArtifactRequest }}
{{- if .ArtifactRequest.VolumeMountPath }}
- name: artifact-volume
mountPath: {{ .ArtifactRequest.VolumeMountPath }}
{{- end }}
{{- end }}
{{- range $configmap := .EnvConfigMaps }}
{{- if and $configmap.Mount $configmap.Reference }}
Expand Down Expand Up @@ -76,8 +78,10 @@ spec:
mountPath: /etc/certs
{{- end }}
{{- if .ArtifactRequest }}
{{- if .ArtifactRequest.VolumeMountPath }}
- name: artifact-volume
mountPath: {{ .ArtifactRequest.VolumeMountPath }}
{{- end }}
{{- end }}
{{- range $configmap := .EnvConfigMaps }}
{{- if and $configmap.Mount $configmap.Reference }}
Expand All @@ -100,9 +104,11 @@ spec:
secretName: {{ .CertificateSecret }}
{{- end }}
{{- if .ArtifactRequest }}
{{- if and .ArtifactRequest.VolumeMountPath .ArtifactRequest.StorageClassName }}
- name: artifact-volume
persistentVolumeClaim:
claimName: {{ .Name }}-pvc
{{- end }}
{{- end }}
{{- range $configmap := .EnvConfigMaps }}
{{- if and $configmap.Mount $configmap.Reference }}
Expand Down
4 changes: 4 additions & 0 deletions charts/testkube-api/job-scraper-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,19 @@ spec:
- "/bin/runner"
- '{{ .Jsn }}'
{{- if .ArtifactRequest }}
{{- if .ArtifactRequest.VolumeMountPath }}
volumeMounts:
- name: artifact-volume
mountPath: {{ .ArtifactRequest.VolumeMountPath }}
{{- end }}
{{- end }}
{{- if .ArtifactRequest }}
{{- if and .ArtifactRequest.VolumeMountPath .ArtifactRequest.StorageClassName }}
volumes:
- name: artifact-volume
persistentVolumeClaim:
claimName: {{ .Name }}-pvc
{{- end }}
{{- end }}
restartPolicy: Never
{{- if .ServiceAccountName }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ spec:
description: ExecutorSpec defines the desired state of Executor
properties:
args:
description: container executor binary arguments
description: executor binary arguments
items:
type: string
type: array
command:
description: container executor default binary command
description: executor default binary command
items:
type: string
type: array
Expand Down
20 changes: 11 additions & 9 deletions charts/testkube-operator/templates/tests.testkube.io_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -459,27 +459,29 @@ spec:
items:
type: string
type: array
argsMode:
description: usage mode for arguments
enum:
- append
- override
type: string
artifactRequest:
description: artifact request body for container executors with
test artifacts
description: artifact request body with test artifacts
properties:
dirs:
description: artifact directories
description: artifact directories for scraping
items:
type: string
type: array
storageClassName:
description: artifact storage class name
description: artifact storage class name for container executor
type: string
volumeMountPath:
description: artifact volume mount path
description: artifact volume mount path for container executor
type: string
required:
- storageClassName
- volumeMountPath
type: object
command:
description: container executor binary command
description: executor binary command
items:
type: string
type: array
Expand Down