I have created a Spring Boot application with a GitLab CI pipeline that builds the Maven jar file, uses Schemathesis to test the API endpoints based on an OpenAPI specification, and deploys to Amazon EKS. However, the job responsible for running Schemathesis is failing.
To test the application, Schemathesis queries the live application, so I created a start-api
job to run the application in .gitlab-ci.yml
:
start-api:
stage: test
image: maven:3.6.3-jdk-11
script:
- mvn spring-boot:run &
- sleep 60
tags:
- aks
Then, I pull the latest Schemathesis Docker image (as per the documentation), and run the test command with an api-tests
job:
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/
The start-api
job passes successfully, but the api-tests
job fails with the following run:
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
What could be causing this error? Any assistance is appreciated!
kmanka is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.