Чтобы протестировать приложение, Schemathesis запрашивает работающее приложение, поэтому я создал задание start-api для запуска приложения в .gitlab-ci.yml:
Код: Выделить всё
start-api:
stage: test
image: maven:3.6.3-jdk-11
script:
- mvn spring-boot:run &
- sleep 60
tags:
- aks
Код: Выделить всё
api-tests:
stage: test
image:
name: schemathesis/schemathesis:stable
entrypoint: ['']
needs:
- job: start-api
tags:
- aks
script:
- sleep 30
- st run ./api.yml --checks=all --report --base-url=http://127.0.0.1:8081/api/v3/
Код: Выделить всё
Running with gitlab-runner 16.10.0 (...)
on gitlab-runner-(...), system ID: (...)
feature flags: FF_KUBERNETES_HONOR_ENTRYPOINT:true
Resolving secrets
Preparing the "kubernetes" executor
Using Kubernetes namespace: helm-gitlabrunners
Using Kubernetes executor with image schemathesis/schemathesis:stable ...
Using attach strategy to execute scripts...
Preparing environment
Using FF_USE_POD_ACTIVE_DEADLINE_SECONDS, the Pod activeDeadlineSeconds will be set to the job timeout: 1h0m0s...
Waiting for pod helm-gitlabrunners/runner-(...) to be running, status is Pending
Waiting for pod helm-gitlabrunners/runner-(...) to be running, status is Pending
ContainersNotReady: "containers with unready status: [build helper]"
ContainersNotReady: "containers with unready status: [build helper]"
ERROR: Job failed (system failure): prepare environment: setting up trapping scripts on emptyDir: unable to upgrade connection: container not found ("build"). Check https://docs.gitlab.com/runner/shells/index.html#shell-profile-loading for more information
Подробнее здесь: https://stackoverflow.com/questions/786 ... i-pipeline
Мобильная версия