Skip to content

Commit

Permalink
fix: 1.15.3 (#4506)
Browse files Browse the repository at this point in the history
* fix: wrong struct used to marshal body into (#4127)

* fix: map test suite YAML to proper update structure (#4129)

* chore: fix local build (#4097)

* fix: check config if it is base64 before decoding it (#4088)

* fix: add hashtag to shebang in example script (#4137)

* feat: add test labels to jobs and pods (#4134)

* docs: update example to be appliable on copy-paste (#4142)

* Testsuites switched to CRDs and v3, run script updated, k6 test fixed after workingdir changes (#4143)

* fix: dep update (#4145)

* feat: Tests/TestSuites - namespaces removed, run script updated (#4148)

* Test/TestSuite CRDs - namespaces removed, run script updated (namespace support)

* run script updated

* run script updated

* docs: add needed permissions for the S3 IAM role (#4151)

* fix: use dedicated function to test minio availability (#4149)

* fix: use dedicated function to test minio availability

* fix: make as bool the IsConnectionPossible func

* docs: add support to executor kubent (#4008)

* docs: add support to executor kubent

* docs: apply suggestions from code review

Co-authored-by: Dawid Rusnak <[email protected]>

---------

Co-authored-by: Lilla Vass <[email protected]>
Co-authored-by: Dawid Rusnak <[email protected]>

* ci: update kubepug version (#4163)

* Improved webhooks.mdx and added section on how to develop and test (#4159)

* fix: reconciler scraper (#4174)

* fix: reconcile execution with scraper

* fix: add executor client

* fix: change reconciliation interval

* fix: use proper Playwright version in its executor (#4171)

* ci: fail job on unsuccessful push to apt (#4179)

* feat: use entrypoint sh for container executor (#4162)

* feat: use entrypoint sh for container executor

* feat: add container shell field

* feat: create dynamically entrypoint

* fix: script paths

* feat: add docker inspection

* feat: add secret creds to skopeo

* Revert "Auxiliary commit to revert individual files from b2b1282"

This reverts commit e0c9f0ff94756e81de76139429a1bef665995ebe.

* fix: generate mock

* fix: pass registry parameter

* fix: add const for script names

* feat: add const for entrypoint

* feat: add unit tests for skopeo secrets

* dashboard-e2e-tests removed from testsuite, will be run seperately (#4186)

* fix: start telemetry async (#4189)

* fix: output parsing test (#4196)

* fix: successful output parsing test

* fix: check if executor log is already in json output

* fix: ignore queued

* fix: change container logs

* fixL ignore scraper result

* fix: add nil checks

* fix: add unit tests

* fix: golint

* fix: change condition

* fix: update execution result on failure

* feat: compress artifacts feature (#4198)

* feat: pytest executor (#4203)

* feat: sample python test

* feat: pytest sample test

* feat: pytest executor crd

* feat: passed and failed test samples

* fix: 2 test crds

* fix: test branch

* feat: docs

* feat: junit xml (#4202)

* feat: junit xml

* feat: xml jtl format support

* fix: condition tuning

* fix: test fake site

* fix: unit tests

* Revert "fix: test fake site"

This reverts commit 03a3242.

* Revert "Revert "fix: test fake site""

This reverts commit 2697568.

* Revert "Revert "Revert "fix: test fake site"""

This reverts commit 00fe235.

* feat: disable analytics.testkube.io calls (#4207)

* update install script (#4209)

* feat: helm chart version (#4215)

* feat: tostring method (#4220)

* feat: add tostring to template

* feat: vartypeptrtostring template method

* feat: add tmp method to job ext

* feat: add helper method for template

* fix: spelling

* fix: doc format

* fix: switch to warning on telemetry error (#4222)

* fix: switch to warning on telemetry error

* fix: change condition

* fix: golint

* fix: doc

* Revert "fix: doc"

This reverts commit a6da7d3.

* Playwright custom container executor - CI=1 (#4213)

* fix: more cypress statuses (#4098)

* fix: more cypress statuses

* Update contrib/executor/cypress/pkg/runner/cypress.go

Co-authored-by: Lilla Vass <[email protected]>

---------

Co-authored-by: Lilla Vass <[email protected]>

* fix: install script (#4230)

* fix: install script

* fix: remove special chas for yaml (#4239)

* ci: remove beta flow (#4242)

* Update Step 3 of creating Tests (#4244)

* Update Step 3 of creating Tests

* Update docs/docs/articles/step3-creating-first-test.md

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/articles/step3-creating-first-test.md

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/articles/step3-creating-first-test.md

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/articles/step3-creating-first-test.md

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/articles/step3-creating-first-test.md

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/articles/step3-creating-first-test.md

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/articles/step3-creating-first-test.md

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/articles/step3-creating-first-test.md

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/articles/step3-creating-first-test.md

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/articles/step3-creating-first-test.md

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/articles/step3-creating-first-test.md

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/articles/step3-creating-first-test.md

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/articles/step3-creating-first-test.md

Co-authored-by: Julianne Fermi <[email protected]>

---------

Co-authored-by: Julianne Fermi <[email protected]>

* fix: make <img> tags self-closing in docs (#4246)

* Docs - CI/CD overview - Testkube run action, additional examples (#4252)

* Executor tests - edge cases - expected failures (#4251)

* feat: test execution crd (#4206)

* feat: test execution crd

* fix: add basic test execution map

* fix: map test execution model

* feat: change execution model

* feat: update test execution crd

* fix: add param to api spce

* feat: test suite execution model

* feat: dep update

* fix: dep update

* fix: mapper for test suite execution

* fix: mapper for test suite execution

* fix: map var typo

* fix: store test suite execution name

* fix: add generation field

* fix: save generation

* fix: dep update

* fixL execution crds docs

* fix: dep update

* Update docs/docs/articles/test-executions.md

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/articles/test-executions.md

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/articles/test-executions.md

Co-authored-by: Julianne Fermi <[email protected]>

---------

Co-authored-by: Julianne Fermi <[email protected]>

* fix: skip empty step (#4264)

* fix: add aws s3 bucket examples (#4265)

* fix: pytest docs (#4267)

* fix: pytest docs

* fix: spelling

* fix: syntax

* fix: change menu (#4268)

* fix: add ci=1 for all jobs (#4269)

* feat: add error tracking for cloud init (#4266)

* fix: streaming logs not working (#4212)

* fix: streaming logs not working

* fix: use only one condition wait when waiting for logs

* feat: webhook patch (#4272)

* feat: webhook patch method

* fix: update webhook cli

* fix: update doc

* fix: golint

* fix: use go 1.21 (#4273)

* fix: debug command and cypress showing failed steps (#4276)

* Revert "fix: streaming logs not working (#4212)"

This reverts commit 74501d9.

* fix: remove deprecated rand seed

* feat: Tests - resource requests added (#4286)

* Tests - resource requests added

* Tests - cypress, playwright, gradle, maven, postman - resource requests added

* fix: Tests - missing ginkgo job template added (resource requests) (#4288)

* Tests - resource requests added

* Tests - cypress, playwright, gradle, maven, postman - resource requests added

* Tests - ginkgo - missing jobTemplate added

* feat: envs vars for webhook (#4284)

* feat: envs vars for webhook

* doc: webhook template

* doc: webhook template

* test run script - cron triggers for yaml testsuites (#4291)

* Add UI Images (#4263)

For Test Triggers and Scheduling Tests

* feat: artifact bucket (#4277)

* feat: artifact bucket model

* fix: ignore empty folder

* fix: rename folder per execution

* fix: replace runner bucket

* fix: use custom storage for bucket

* fix: rename template field

* fix: filename calculation

* fix: fmt

* fix: check for storage class

* fix: listing files for custom bucket

* fix: scaping params docs

* fix: spelling

* fix: typo

* fix: dep update

* fix: remove waiting on tailing log (#4290)

* feat: test description field (#4293)

* feat: test description field

* fix: dep update

* Test timeouts added (#4300)

* feat: add pprof server (#4304)

* docs: fix default commands format (#4307)

* docs: Webhook docs extended (#4310)

* Webhook docs extended

* Update docs/docs/articles/webhooks.mdx

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/articles/webhooks.mdx

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/articles/webhooks.mdx

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/articles/webhooks.mdx

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/articles/webhooks.mdx

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/articles/webhooks.mdx

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/articles/webhooks.mdx

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/articles/webhooks.mdx

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/articles/webhooks.mdx

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/articles/webhooks.mdx

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/articles/webhooks.mdx

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/articles/webhooks.mdx

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/articles/webhooks.mdx

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/articles/webhooks.mdx

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/articles/webhooks.mdx

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/articles/webhooks.mdx

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/articles/webhooks.mdx

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/articles/webhooks.mdx

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/articles/webhooks.mdx

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/articles/webhooks.mdx

Co-authored-by: Julianne Fermi <[email protected]>

* Updated after CR

---------

Co-authored-by: Julianne Fermi <[email protected]>

* fix: use regexp for checks testing (#4314)

* fix: Test timeouts increased (#4317)

* Test timeouts increased

* Test timeouts increased

* Test timeouts increased

* feat: Cypress test - multi files case (#4321)

* Cypress tests - multi files

* Cypress tests - multi files - without envs

* feat: add orgid and env to agent context (#4320)

* feat: template api model

* feat: template references

* feat: api methods for templates

* feat: quote fields

* feat: using template reference

* feat: using template reference

* feat: template cli

* fix: get executor template by reference

* fix: rename alias

* fixL list templates

* fix: refactor quoting

* fix: refactor field quoting

* fix: refactor field merging

* fix: merge pvc template

* fix: refactor file reading

* fix: refacto run command

* fix: refactor common module

* fix: sync docs

* fix: webhook payload template reference

* fix: var name typo

* fix: add warning for template type

* Update docs/docs/cli/testkube_create_template.md

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/cli/testkube_create_template.md

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/cli/testkube_delete_template.md

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/cli/testkube_get_template.md

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/cli/testkube_delete_template.md

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/cli/testkube_get_template.md

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/cli/testkube_update_template.md

Co-authored-by: Julianne Fermi <[email protected]>

* fix: templates doc

* fix: dep update

* Update docs/docs/articles/templates.mdx

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/articles/templates.mdx

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/articles/templates.mdx

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/articles/templates.mdx

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/articles/templates.mdx

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/articles/templates.mdx

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/articles/templates.mdx

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/articles/templates.mdx

Co-authored-by: Julianne Fermi <[email protected]>

* feat: list secrets and keys

* fix: list all secrets

* fix: doc syntax

* feat: add jmeter docker image build which will be used by the jmeter executors (#4308)

* add jmeter docker image build which will be used by the jmeter executors

* update jmeter with latest requirements

* update readme for jmeter docker

* feat: suuport golang temolate for webhook uri

* fix: golang template for headers

* fix: golint

* chore: remove refs to deprecated io/ioutil

Signed-off-by: guoguangwu <[email protected]>

* fix: improve abortion check to use nats events (#4345)

* fix: improve abortion check to use nats events

* fix: remove global bus var

* fix: use interfaces instead of bus object

* fix: synchronize using channels instead of atomic and move logic from event handler

* fix: show cli context

* fix: doc typo

* docs: Webhooks - docs extended with supported event, testexecution and test… (#4338)

* Webhooks - docs extended with supported event, testexecution and testsuiteexecution variables, example for microsoft teams added

* docs - templates.mdx links fixed

* Update docs/docs/articles/webhooks.mdx

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/articles/webhooks.mdx

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/articles/webhooks.mdx

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/articles/webhooks.mdx

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/articles/webhooks.mdx

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/articles/webhooks.mdx

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/articles/webhooks.mdx

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/articles/webhooks.mdx

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/articles/webhooks.mdx

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/articles/webhooks.mdx

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/articles/webhooks.mdx

Co-authored-by: Julianne Fermi <[email protected]>

* Update docs/docs/articles/webhooks.mdx

Co-authored-by: Julianne Fermi <[email protected]>

---------

Co-authored-by: Julianne Fermi <[email protected]>

* Create scorecard.yml

* test: add config.Get()

* refactor(template): extract parseJobTemplate to test it

chore: cleanup

* feat: add Sprig to templates for additional templating capabilities

Signed-off-by: Adrien Fillon <[email protected]>

* cleanup: config and makefile (#4355)

* fix: use multiple junit reports for cypress

* fix: error logs

* fix: report path

* fix: change id and uri

* fix: unit test

* fix: unit test

* fix: remove typo

* feat: Initial changes for distributed jmeter (#4289)

* feat: Initial changes for distributed jmeter

Signed-off-by: hiteshwani <[email protected]>

* Added jmeter slaves script and Dockerfile

Signed-off-by: hiteshwani <[email protected]>

* Removed duplicate files and imported from existing jmeter executor

Signed-off-by: hiteshwani <[email protected]>

* Add secret refs for git username and token for slave pods

Signed-off-by: hiteshwani <[email protected]>

* Support for user provided plugins (#2)

* Support for user provided plugins

* Add secret refs for git username and token for slave pods

Signed-off-by: hiteshwani <[email protected]>

* Modified logic for adding JMETER_USER_PLUGINS_FOLDER  env var

Signed-off-by: hiteshwani <[email protected]>

* Support for user provided plugins

Signed-off-by: Aman Parauliya <[email protected]>

* Add secret refs for git username and token for slave pods

Signed-off-by: hiteshwani <[email protected]>

* Modified logic for adding JMETER_USER_PLUGINS_FOLDER  env var

Signed-off-by: hiteshwani <[email protected]>

---------

Signed-off-by: hiteshwani <[email protected]>
Signed-off-by: Aman Parauliya <[email protected]>
Co-authored-by: hiteshwani <[email protected]>

* Update README file for Jmeterd

Signed-off-by: Aman Parauliya <[email protected]>

* Changed base image to kubeshop/jmeter and removed  tests (#5)

* Changed base image to kubeshop/jmeter and removed tests

Signed-off-by: hiteshwani <[email protected]>

* modify slaves script so it will not exited on error

Signed-off-by: hiteshwani <[email protected]>

---------

Signed-off-by: hiteshwani <[email protected]>

* Support for user.properties file (#3)

* Support for user provided plugins

Signed-off-by: Aman Parauliya <[email protected]>

* Add secret refs for git username and token for slave pods

Signed-off-by: hiteshwani <[email protected]>

* Modified logic for adding JMETER_USER_PLUGINS_FOLDER  env var

Signed-off-by: hiteshwani <[email protected]>

* Added the support for user.properties file

---------

Signed-off-by: Aman Parauliya <[email protected]>
Signed-off-by: hiteshwani <[email protected]>
Co-authored-by: hiteshwani <[email protected]>

* Addressed review comments

Signed-off-by: Aman Parauliya <[email protected]>

* Fixed review comments of Dejan

Signed-off-by: Aman Parauliya <[email protected]>

* Refactored slaves pod configuration and added validation for pod name (#8)

Signed-off-by: hiteshwani <[email protected]>

* Update README file of Distributor JMeter

Signed-off-by: Aman Parauliya <[email protected]>

* Adding a new example in a new folder named giflow under the examples folder

Signed-off-by: Aman Parauliya <[email protected]>

* Remove plugins from /lib

Signed-off-by: hiteshwani <[email protected]>

---------

Signed-off-by: hiteshwani <[email protected]>
Signed-off-by: Aman Parauliya <[email protected]>
Co-authored-by: Aman Parauliya <[email protected]>
Co-authored-by: Aman Parauliya <[email protected]>

* docs: Add Dashboard and CLI Tabs (#4297)

* Add Dashboard and CLI Tabs

To scheduling tests and test triggers pages.

* conflicts resolved

* Update scheduling-tests.mdx

* Update test-triggers.mdx

* Update scheduling-tests.mdx

* Update test-triggers.mdx

* docs - schedule-test-suites.png added

---------

Co-authored-by: Tomasz Konieczny <[email protected]>

* testsuites for dev/staging/demo updated (#4369)

* ci: jmeterd executor and slave (#4371)

* add jmeterd ci

* docs: Advanced Test Orchestration, AI Insights, Add advantages to Overview … (#4370)

* Advanced Test Orchestration, AI Insights, Add advantages to Overview page

* docs - index.mdx - colors build issue fixed

---------

Co-authored-by: Tomasz Konieczny <[email protected]>

* fix: change jmeterd docker versions (#4372)

* fix: typo in jmeterd slave image (#4373)

* feat: concurrency policy model

* fix: map for concurrency policy

* fix: support allow and forbid options

* feat: replace trigger executions

* fix: unit test

* fix: lint

* fix: enable caching

* fix: return concurrency policies

* fix: dep update

* fix: increase retry

* update jmeterd docs

* docs: fix bright mode logo (#4380)

* feat: cd event log output

* fix: send logs at the end of tests

* fix: event condition

* fix: url address

* Add labels to the slave pods (#4384)

Signed-off-by: Aman Parauliya <[email protected]>

* feat: allow to pass multi namespace flags for testkube cloud init command (#4388)

* feat: add ReadOnly flag to test (#4389)

* fix: remove duplicated code executor.ExecuteSync (#4393)

* fix: update execution status in watcher

* fix: change log message

* fix: change log parameter

* fix: check for exit code

* fix: replace timer by ticker

* fix: change error message

* fix: add events to messages

* fix: filter pod events

* fix: update error message

* feat: test and test suite --update flag

* feat: additional update flags

* feat: update docs

* fix: check if update flag was chaged

* feat: update operator reference (#4399)

* feat: jmeterd test updates

* feat: Slave configuration in Executor CRD and ownerReferences changes in slaves pod (#4385)

* Added slaves filed in Executor CRD to add slaves configs

Signed-off-by: hiteshwani <[email protected]>

* OwnerRefs changes for slaves pod

Signed-off-by: hiteshwani <[email protected]>

* removed the local path from go.mod file

Signed-off-by: Aman Parauliya <[email protected]>

* Fixed linters issue

Signed-off-by: Aman Parauliya <[email protected]>

---------

Signed-off-by: hiteshwani <[email protected]>
Signed-off-by: Aman Parauliya <[email protected]>
Co-authored-by: Aman Parauliya <[email protected]>

* feat: refactor jmeterd slaves module (#4408)

* feat: refactor jmeterd slaves module

* fix flaky slaves unit test

* ci: add arm64 (#4374)

* add arm64 for jmeterd

* feat: add labels to count metrics

* fix: metric fields

* feat: support dirs for soap, postman, curl

* fix: flaky jmeterd test (#4412)

* feat: allow skipping execution deletion on test deletion (#4411)

* add latest tag to jmeterd slave (#4414)

* docs: fix default commands format (#4415)

* feat: metric uri

* fix: add test and testsuite uri

* fix: sort labels

* fix: format labels

* fix: update openapi schema (#4417)

* fix: do not store output in test suite execution result (#4409)

* fix: do not store output in test suite execution result

* fix: clean execution result in the BatchResults as well

* fix: add apis spec note and check for nil

* fix: batch output clean (#4423)

* Distributed JMeter and Misc Editing (#4404)

* docs: add status pages (#4376)

* docs: add status pages without images

* docs: remove pro reference

* docs: apply suggestions from code review

Co-authored-by: Julianne Fermi <[email protected]>

* docs: more detailed description of the pages

* docs: add suggestion from review

* docs: apply suggestions from code review

Co-authored-by: Julianne Fermi <[email protected]>

* docs: add example curl test

* docs: add screenshots

* docs: apply review suggestion

* docs: update images

* docs: update example to use UI instead of CLI

* docs: review suggestions

---------

Co-authored-by: Julianne Fermi <[email protected]>

* docs: add sp to sidebars (#4426)

* feat: slack dashboard uri

* fix: slack template

* fix: slack template

* feat: add dashbaord uris for executions

* fix: make error verbose

* Update docker-build-develop.yaml

* ci: fix goreleaser build (#4429)

* Turn off cache for api

* Image Updates for 1.14 Part 1 (#4434)

* update docs (#4436)

* feat: execute post run script before scraping

* fix: unit test

* fix: update docs

* fix: dep  update

* docs: add cached test result docs (#4441)

* docs: add cached test result docs

* Apply suggestions from code review

Co-authored-by: Julianne Fermi <[email protected]>

---------

Co-authored-by: Julianne Fermi <[email protected]>

* docs: update installation video with cloud (#4442)

* docs: update installation video with cloud

* docs: update installation video with cloud

* docs: update installation video with cloud

* fix: replace deprecated method

* feat: add readonly flag to test-suites (#4448)

* ci: fix cache (#4449)

* fix cache

* fix: update CRD for Dashboard tests to match mono-repository setup (#4451)

* fix: test artifacts failing due to empty file placement (#4444) (#4445)

* tests - expected failures extended - oomkilled, timeout (#4452)

* tests - curl directory (#4454)

* tests - expected failures extended - oomkilled for Cypress (#4453)

* feat: evaluate environment variables in the args of gradle (#4457)

* fix: error message

* fix: get error message

* fix: remove condition

* [Docs] Getting started - Fix Step 1 link (#4463)

* fix: remove secrets endpoint

* fix: exit code and mongo transaction

* fix: missed init

* fix: missed db init

* fix: remove transaction

* fix: remove transaction options

* fix: clean error message

* docs: update images for sp (#4466)

* feat: add output stream functions and mocks (#4431)

* feat: add output stream functions and mocks

* fix: implement size reading and improve interfaces

* fix: literal to const

* fix: nil context

* docs: guide on how to deploy TK from private registry (#4468)

add guide on how to deploy TK from private registry

* add category to docs

* fix jmeterd slave build

* docs: fix navbar not showing on small screens (#4490)

* feat: add Testkube Cloud announcement in docs (#4492)

* feat: move announcement bar below the navigation bar
* feat: add announcement bar for Testkube Cloud
* fix: adjust the search button on mobile devices
* fix: adjust sign in link to match existing [id^=sign] GTM trigger

* ci: fix kubepug installation (#4495)

fix kubepug installation

* feat: resource regex (#4480)

* feat: name regex for trigger selectors

* fix: dep update

* fix: regex test

* doc: add example for regex

* fix: select tests and test suites for name reg ex

* fix: dep update

* fix: enable secrets endpoint (#4469)

* fix: enable secrets endpoint

* fix: env mame typo

* fix: visibility label for secrets

* fix: dep update

* fix: dep update

* fix: expand env for args (#4481)

* feat: run scripts in working dir (#4489)

* feat: run scripts in working dir

* fix: add default working dir

* feat: working dir env var

* use: working dir param

* fix: fmt option

* fix: don't check stdin piping

* fix: use env param

* fix: use working dir env var

* fix: use env working dir

* feat: Maven jdk 8 test, example (based on the one for 11) (#4501)

* Maven example for jdk8

* Maven example for jdk8, tests

* fix: Maven 8 test - branch fixed (#4502)

* Maven example for jdk8

* Maven example for jdk8, tests

* maven test - branch

* Testkube OSS page and additional screenshot updates (#4493)

* fix: wrong link (#4504)

* feat: minor jmeterd updates (#4503)

* minor updated to jmeterd

* remove more redundant logic in jmeterd

* fix: merge confflict

* fix: merge

* fix: remove var

* fix: dep update

---------

Signed-off-by: guoguangwu <[email protected]>
Signed-off-by: Adrien Fillon <[email protected]>
Signed-off-by: hiteshwani <[email protected]>
Signed-off-by: Aman Parauliya <[email protected]>
Co-authored-by: Lilla Vass <[email protected]>
Co-authored-by: Dawid Rusnak <[email protected]>
Co-authored-by: nicufk <[email protected]>
Co-authored-by: Tomasz Konieczny <[email protected]>
Co-authored-by: Abdallah Abedraba <[email protected]>
Co-authored-by: Ankit Jain <[email protected]>
Co-authored-by: Jacek Wysocki <[email protected]>
Co-authored-by: ypoplavs <[email protected]>
Co-authored-by: Édouard Lopez <[email protected]>
Co-authored-by: Bruno Lopes <[email protected]>
Co-authored-by: Julianne Fermi <[email protected]>
Co-authored-by: Povilas Versockas <[email protected]>
Co-authored-by: Ale <[email protected]>
Co-authored-by: Dejan Zele Pejchev <[email protected]>
Co-authored-by: guoguangwu <[email protected]>
Co-authored-by: Édouard Lopez <[email protected]>
Co-authored-by: Adrien Fillon <[email protected]>
Co-authored-by: hiteshwani <[email protected]>
Co-authored-by: Aman Parauliya <[email protected]>
Co-authored-by: Aman Parauliya <[email protected]>
Co-authored-by: Tomasz Konieczny <[email protected]>
Co-authored-by: fivenp <[email protected]>
Co-authored-by: PepperKick <[email protected]>
Co-authored-by: jmorante-ks <[email protected]>
Co-authored-by: ypoplavs <[email protected]>
  • Loading branch information
1 parent 2a9fac7 commit 7302616
Show file tree
Hide file tree
Showing 72 changed files with 723 additions and 368 deletions.
4 changes: 4 additions & 0 deletions api/v1/testkube.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5473,6 +5473,10 @@ components:
type: string
description: kubernetes resource name selector
example: nginx
nameRegex:
type: string
description: kubernetes resource name regex
example: nginx.*
namespace:
type: string
description: resource namespace
Expand Down
12 changes: 1 addition & 11 deletions cmd/api-server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package main

import (
"context"
"encoding/base64"
"encoding/json"
"flag"
"fmt"
Expand Down Expand Up @@ -436,6 +435,7 @@ func main() {
cfg.TestkubeHelmchartVersion,
mode,
eventBus,
cfg.EnableSecretsEndpoint,
)

if mode == common.ModeAgent {
Expand Down Expand Up @@ -608,16 +608,6 @@ func newSlackLoader(cfg *config.Config, envs map[string]string) (*slack.SlackLoa
testkube.AllEventTypes, envs), nil
}

func isBase64Encoded(base64Val string) bool {
decoded, err := base64.StdEncoding.DecodeString(base64Val)
if err != nil {
return false
}

encoded := base64.StdEncoding.EncodeToString(decoded)
return base64Val == encoded
}

// getMongoSSLConfig builds the necessary SSL connection info from the settings in the environment variables
// and the given secret reference
func getMongoSSLConfig(cfg *config.Config, secretClient *secret.Client) *storage.MongoSSLConfig {
Expand Down
9 changes: 7 additions & 2 deletions cmd/kubectl-testkube/commands/tests/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package tests

import (
"fmt"
"os"
"strconv"
"time"

Expand Down Expand Up @@ -111,8 +112,12 @@ func NewCreateTestsCmd() *cobra.Command {
ui.Failf("Test with name '%s' already exists in namespace %s, ", testName, namespace)
}
} else {
ok := ui.Confirm(fmt.Sprintf("Test with name '%s' already exists in namespace %s, ", testName, namespace) +
"do you want to overwrite it?")
var ok bool
if stat, _ := os.Stdin.Stat(); (stat.Mode() & os.ModeCharDevice) != 0 {
ok = ui.Confirm(fmt.Sprintf("Test with name '%s' already exists in namespace %s, ", testName, namespace) +
"do you want to overwrite it?")
}

if !ok {
ui.Failf("Test creation was aborted")
}
Expand Down
8 changes: 4 additions & 4 deletions cmd/kubectl-testkube/commands/tests/renderer/test_obj.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ func TestRenderer(client client.Client, ui *ui.UI, obj interface{}) error {
ui.Warn(" Args mode: ", test.ExecutionRequest.ArgsMode)
}

if test.ExecutionRequest.ArgsMode != "" {
ui.Warn(" Args mode: ", test.ExecutionRequest.ArgsMode)
}

if len(test.ExecutionRequest.Envs) > 0 {
ui.NL()
ui.Warn("(deprecated) Envs: ", testkube.MapToString(test.ExecutionRequest.Envs))
Expand Down Expand Up @@ -158,10 +162,6 @@ func TestRenderer(client client.Client, ui *ui.UI, obj interface{}) error {
ui.Warn(" Cron job template reference: ", test.ExecutionRequest.CronJobTemplateReference)
}

if test.ExecutionRequest.CronJobTemplate != "" {
ui.Warn(" Cron job template: ", "\n", test.ExecutionRequest.CronJobTemplate)
}

if test.ExecutionRequest.PreRunScript != "" {
ui.Warn(" Pre run script: ", "\n", test.ExecutionRequest.PreRunScript)
}
Expand Down
9 changes: 7 additions & 2 deletions cmd/kubectl-testkube/commands/testsources/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package testsources

import (
"fmt"
"os"
"strconv"

"github.com/spf13/cobra"
Expand Down Expand Up @@ -58,8 +59,12 @@ func NewCreateTestSourceCmd() *cobra.Command {
ui.Failf("TestSource with name '%s' already exists in namespace %s, ", testsource.Name, namespace)
}
} else {
ok := ui.Confirm(fmt.Sprintf("TestSource with name '%s' already exists in namespace %s, ", testsource.Name, namespace) +
"do you want to overwrite it?")
var ok bool
if stat, _ := os.Stdin.Stat(); (stat.Mode() & os.ModeCharDevice) != 0 {
ok = ui.Confirm(fmt.Sprintf("TestSource with name '%s' already exists in namespace %s, ", testsource.Name, namespace) +
"do you want to overwrite it?")
}

if !ok {
ui.Failf("TestSource creation was aborted")
}
Expand Down
9 changes: 7 additions & 2 deletions cmd/kubectl-testkube/commands/testsuites/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package testsuites

import (
"fmt"
"os"
"strconv"

"github.com/robfig/cron"
Expand Down Expand Up @@ -66,8 +67,12 @@ func NewCreateTestSuitesCmd() *cobra.Command {
ui.Failf("TestSuite with name '%s' already exists in namespace %s, ", testSuite.Name, namespace)
}
} else {
ok := ui.Confirm(fmt.Sprintf("TestSuite with name '%s' already exists in namespace %s, ", testSuite.Name, namespace) +
"do you want to overwrite it?")
var ok bool
if stat, _ := os.Stdin.Stat(); (stat.Mode() & os.ModeCharDevice) != 0 {
ok = ui.Confirm(fmt.Sprintf("TestSuite with name '%s' already exists in namespace %s, ", testSuite.Name, namespace) +
"do you want to overwrite it?")
}

if !ok {
ui.Failf("TestSuite creation was aborted")
}
Expand Down
4 changes: 3 additions & 1 deletion contrib/executor/artillery/pkg/runner/artillery.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ func (r *ArtilleryRunner) Run(ctx context.Context, execution testkube.Execution)
if args[i] == "<runPath>" {
args[i] = path
}

args[i] = os.ExpandEnv(args[i])
}

runPath := testDir
Expand All @@ -126,7 +128,7 @@ func (r *ArtilleryRunner) Run(ctx context.Context, execution testkube.Execution)
if execution.PostRunScript != "" && execution.ExecutePostRunScriptBeforeScraping {
output.PrintLog(fmt.Sprintf("%s Running post run script...", ui.IconCheckMark))

if err = agent.RunScript(execution.PostRunScript); err != nil {
if err = agent.RunScript(execution.PostRunScript, r.Params.WorkingDir); err != nil {
output.PrintLogf("%s Failed to execute post run script %s", ui.IconWarning, err)
}
}
Expand Down
5 changes: 4 additions & 1 deletion contrib/executor/curl/pkg/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ func (r *CurlRunner) Run(ctx context.Context, execution testkube.Execution) (res
}

args = append(args, execution.Args...)
for i := range args {
args[i] = os.ExpandEnv(args[i])
}

runPath := workingDir
outputPkg.PrintLogf("%s Test run command %s %s", ui.IconRocket, command, strings.Join(args, " "))
Expand All @@ -149,7 +152,7 @@ func (r *CurlRunner) Run(ctx context.Context, execution testkube.Execution) (res
if execution.PostRunScript != "" && execution.ExecutePostRunScriptBeforeScraping {
outputPkg.PrintLog(fmt.Sprintf("%s Running post run script...", ui.IconCheckMark))

if err = agent.RunScript(execution.PostRunScript); err != nil {
if err = agent.RunScript(execution.PostRunScript, r.Params.WorkingDir); err != nil {
outputPkg.PrintLogf("%s Failed to execute post run script %s", ui.IconWarning, err)
}
}
Expand Down
4 changes: 3 additions & 1 deletion contrib/executor/cypress/pkg/runner/cypress.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ func (r *CypressRunner) Run(ctx context.Context, execution testkube.Execution) (
if args[i] == "<envVars>" {
args[i] = strings.Join(envVars, ",")
}

args[i] = os.ExpandEnv(args[i])
}

// run cypress inside repo directory ignore execution error in case of failed test
Expand All @@ -162,7 +164,7 @@ func (r *CypressRunner) Run(ctx context.Context, execution testkube.Execution) (
if execution.PostRunScript != "" && execution.ExecutePostRunScriptBeforeScraping {
output.PrintLog(fmt.Sprintf("%s Running post run script...", ui.IconCheckMark))

if err = agent.RunScript(execution.PostRunScript); err != nil {
if err = agent.RunScript(execution.PostRunScript, r.Params.WorkingDir); err != nil {
output.PrintLogf("%s Failed to execute post run script %s", ui.IconWarning, err)
}
}
Expand Down
4 changes: 3 additions & 1 deletion contrib/executor/ginkgo/pkg/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ func (r *GinkgoRunner) Run(ctx context.Context, execution testkube.Execution) (r
if execution.PostRunScript != "" && execution.ExecutePostRunScriptBeforeScraping {
output.PrintLog(fmt.Sprintf("%s Running post run script...", ui.IconCheckMark))

if err = agent.RunScript(execution.PostRunScript); err != nil {
if err = agent.RunScript(execution.PostRunScript, r.Params.WorkingDir); err != nil {
output.PrintLogf("%s Failed to execute post run script %s", ui.IconWarning, err)
}
}
Expand Down Expand Up @@ -296,6 +296,8 @@ func BuildGinkgoArgs(params map[string]string, path, runPath, reportFile string,
if args[i] == "<reportFile>" {
args[i] = reportFile
}

args[i] = os.ExpandEnv(args[i])
}

output.PrintLogf("%s Ginkgo arguments from params built: %s", ui.IconCheckMark, args)
Expand Down
7 changes: 6 additions & 1 deletion contrib/executor/gradle/pkg/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ func (r *GradleRunner) Run(ctx context.Context, execution testkube.Execution) (r
if args[i] == "<projectDir>" {
args[i] = project
}

args[i] = os.ExpandEnv(args[i])
}

Expand Down Expand Up @@ -163,7 +164,11 @@ func (r *GradleRunner) Run(ctx context.Context, execution testkube.Execution) (r
if execution.PostRunScript != "" && execution.ExecutePostRunScriptBeforeScraping {
output.PrintLog(fmt.Sprintf("%s Running post run script...", ui.IconCheckMark))

if err = agent.RunScript(execution.PostRunScript); err != nil {
if runPath == "" {
runPath = r.params.WorkingDir
}

if err = agent.RunScript(execution.PostRunScript, runPath); err != nil {
output.PrintLogf("%s Failed to execute post run script %s", ui.IconWarning, err)
}
}
Expand Down
24 changes: 11 additions & 13 deletions contrib/executor/init/pkg/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,16 @@ const (

// NewRunner creates init runner
func NewRunner(params envs.Params) *InitRunner {
dir := os.Getenv("RUNNER_DATADIR")
return &InitRunner{
Fetcher: content.NewFetcher(dir),
Fetcher: content.NewFetcher(params.DataDir),
Params: params,
dir: dir,
}
}

// InitRunner prepares data for executor
type InitRunner struct {
Fetcher content.ContentFetcher
Params envs.Params
dir string
}

var _ runner.Runner = &InitRunner{}
Expand All @@ -60,7 +57,7 @@ func (r *InitRunner) Run(ctx context.Context, execution testkube.Execution) (res

if execution.VariablesFile != "" {
output.PrintLogf("%s Creating variables file...", ui.IconWorld)
file := filepath.Join(r.dir, "params-file")
file := filepath.Join(r.Params.DataDir, "params-file")
if err = os.WriteFile(file, []byte(execution.VariablesFile), 0666); err != nil {
output.PrintLogf("%s Could not create variables file %s: %s", ui.IconCross, file, err.Error())
return result, errors.Errorf("could not create variables file %s: %v", file, err)
Expand All @@ -82,7 +79,7 @@ func (r *InitRunner) Run(ctx context.Context, execution testkube.Execution) (res
command += "\n"

if execution.PreRunScript != "" {
command += filepath.Join(r.dir, preRunScriptName) + "\n"
command += filepath.Join(r.Params.WorkingDir, preRunScriptName) + "\n"
}

if len(execution.Command) != 0 {
Expand All @@ -91,25 +88,26 @@ func (r *InitRunner) Run(ctx context.Context, execution testkube.Execution) (res
}

if execution.PostRunScript != "" {
command += filepath.Join(r.dir, postRunScriptName) + "\n"
command += filepath.Join(r.Params.WorkingDir, postRunScriptName) + "\n"
}

var scripts = []struct {
dir string
file string
data string
comment string
}{
{preRunScriptName, execution.PreRunScript, "prerun"},
{containerexecutor.EntrypointScriptName, command, "entrypoint"},
{postRunScriptName, execution.PostRunScript, "postrun"},
{r.Params.WorkingDir, preRunScriptName, execution.PreRunScript, "prerun"},
{r.Params.DataDir, containerexecutor.EntrypointScriptName, command, "entrypoint"},
{r.Params.WorkingDir, postRunScriptName, execution.PostRunScript, "postrun"},
}

for _, script := range scripts {
if script.data == "" {
continue
}

file := filepath.Join(r.dir, script.file)
file := filepath.Join(script.dir, script.file)
output.PrintLogf("%s Creating %s script...", ui.IconWorld, script.comment)
if err = os.WriteFile(file, []byte(script.data), 0755); err != nil {
output.PrintLogf("%s Could not create %s script %s: %s", ui.IconCross, script.comment, file, err.Error())
Expand All @@ -130,8 +128,8 @@ func (r *InitRunner) Run(ctx context.Context, execution testkube.Execution) (res
output.PrintLogf("%s Copy files functionality is currently not supported in cloud mode", ui.IconWarning)
}

output.PrintLogf("%s Setting up access to files in %s", ui.IconFile, r.dir)
_, err = executor.Run(r.dir, "chmod", nil, []string{"-R", "777", "."}...)
output.PrintLogf("%s Setting up access to files in %s", ui.IconFile, r.Params.DataDir)
_, err = executor.Run(r.Params.DataDir, "chmod", nil, []string{"-R", "777", "."}...)
if err != nil {
output.PrintLogf("%s Could not chmod for data dir: %s", ui.IconCross, err.Error())
}
Expand Down
8 changes: 6 additions & 2 deletions contrib/executor/jmeter/pkg/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func (r *JMeterRunner) Run(ctx context.Context, execution testkube.Execution) (r
}
// recreate output directory with wide permissions so JMeter can create report files
if err = os.Mkdir(outputDir, 0777); err != nil {
return *result.Err(errors.Errorf("could not create directory %s: %v", runPath, err)), nil
return *result.Err(errors.Errorf("could not create directory %s: %v", outputDir, err)), nil
}

jtlPath := filepath.Join(outputDir, "report.jtl")
Expand Down Expand Up @@ -151,6 +151,10 @@ func (r *JMeterRunner) Run(ctx context.Context, execution testkube.Execution) (r
}
}

for i := range args {
args[i] = os.ExpandEnv(args[i])
}

output.PrintLogf("%s Using arguments: %v", ui.IconWorld, args)

entryPoint := getEntryPoint()
Expand Down Expand Up @@ -200,7 +204,7 @@ func (r *JMeterRunner) Run(ctx context.Context, execution testkube.Execution) (r
if execution.PostRunScript != "" && execution.ExecutePostRunScriptBeforeScraping {
output.PrintLog(fmt.Sprintf("%s Running post run script...", ui.IconCheckMark))

if err = agent.RunScript(execution.PostRunScript); err != nil {
if err = agent.RunScript(execution.PostRunScript, r.Params.WorkingDir); err != nil {
output.PrintLogf("%s Failed to execute post run script %s", ui.IconWarning, err)
}
}
Expand Down
10 changes: 7 additions & 3 deletions contrib/executor/jmeterd/pkg/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func (r *JMeterDRunner) Run(ctx context.Context, execution testkube.Execution) (
//Skip JVM ARGS to be appended in the command
continue
}
params = append(params, fmt.Sprintf("-J%s=%s", value.Name, value.Value))
params = append(params, fmt.Sprintf("-G%s=%s", value.Name, value.Value))

}

Expand Down Expand Up @@ -141,7 +141,7 @@ func (r *JMeterDRunner) Run(ctx context.Context, execution testkube.Execution) (
}
// recreate output directory with wide permissions so JMeter can create report files
if err = os.Mkdir(outputDir, 0777); err != nil {
return *result.Err(errors.Wrapf(err, "error creating directory %s", runPath)), nil
return *result.Err(errors.Wrapf(err, "error creating directory %s", outputDir)), nil
}

jtlPath := filepath.Join(outputDir, "report.jtl")
Expand Down Expand Up @@ -191,6 +191,10 @@ func (r *JMeterDRunner) Run(ctx context.Context, execution testkube.Execution) (
}
}

for i := range args {
args[i] = os.ExpandEnv(args[i])
}

output.PrintLogf("%s Using arguments: %v", ui.IconWorld, args)

entryPoint := getEntryPoint()
Expand Down Expand Up @@ -240,7 +244,7 @@ func (r *JMeterDRunner) Run(ctx context.Context, execution testkube.Execution) (
if execution.PostRunScript != "" && execution.ExecutePostRunScriptBeforeScraping {
output.PrintLog(fmt.Sprintf("%s Running post run script...", ui.IconCheckMark))

if err = agent.RunScript(execution.PostRunScript); err != nil {
if err = agent.RunScript(execution.PostRunScript, r.Params.WorkingDir); err != nil {
output.PrintLogf("%s Failed to execute post run script %s", ui.IconWarning, err)
}
}
Expand Down
13 changes: 0 additions & 13 deletions contrib/executor/jmeterd/scripts/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
#!/bin/bash

EXECUTOR_CUSTOM_PLUGINS_FOLDER="${RUNNER_DATADIR}/uploads/plugins"

if [ -d $EXECUTOR_CUSTOM_PLUGINS_FOLDER ];
then
echo "Copying custom plugins from ${EXECUTOR_CUSTOM_PLUGINS_FOLDER} to ${JMETER_HOME}/lib/ext"
for plugin in ${EXECUTOR_CUSTOM_PLUGINS_FOLDER}/*.jar; do
echo "Copying plugin: $plugin"
cp $plugin ${JMETER_HOME}/lib/ext
done;
else
echo "No custom plugins found at ${EXECUTOR_CUSTOM_PLUGINS_FOLDER}"
fi

if [ -f "/executor_entrypoint_master.sh" ];
then
echo "Executing custom entrypoint script at /entrypoint.sh"
Expand Down
Loading

0 comments on commit 7302616

Please sign in to comment.