2021-09-30 23:02:18 +05:30
|
|
|
# To contribute improvements to CI/CD templates, please follow the Development guide at:
|
|
|
|
# https://docs.gitlab.com/ee/development/cicd/templates.html
|
|
|
|
# This specific template is located at:
|
|
|
|
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Verify/Load-Performance-Testing.gitlab-ci.yml
|
|
|
|
|
2023-01-13 00:05:48 +05:30
|
|
|
# Read more about the feature here: https://docs.gitlab.com/ee/ci/testing/code_quality.html
|
2020-07-28 23:09:34 +05:30
|
|
|
|
|
|
|
stages:
|
|
|
|
- build
|
|
|
|
- test
|
|
|
|
- deploy
|
|
|
|
- performance
|
|
|
|
|
|
|
|
load_performance:
|
|
|
|
stage: performance
|
|
|
|
image: docker:git
|
|
|
|
variables:
|
|
|
|
K6_IMAGE: loadimpact/k6
|
2020-10-24 23:57:45 +05:30
|
|
|
K6_VERSION: 0.27.0
|
2023-01-13 00:05:48 +05:30
|
|
|
K6_TEST_FILE: raw.githubusercontent.com/grafana/k6/master/samples/http_get.js
|
2020-07-28 23:09:34 +05:30
|
|
|
K6_OPTIONS: ''
|
2020-11-24 15:15:51 +05:30
|
|
|
K6_DOCKER_OPTIONS: ''
|
2020-07-28 23:09:34 +05:30
|
|
|
services:
|
|
|
|
- docker:stable-dind
|
|
|
|
script:
|
2020-11-24 15:15:51 +05:30
|
|
|
- docker run --rm -v "$(pwd)":/k6 -w /k6 $K6_DOCKER_OPTIONS $K6_IMAGE:$K6_VERSION run $K6_TEST_FILE --summary-export=load-performance.json $K6_OPTIONS
|
2020-07-28 23:09:34 +05:30
|
|
|
artifacts:
|
|
|
|
reports:
|
|
|
|
load_performance: load-performance.json
|