I have a gitlab pipeline split in two jobs but unfortunately the second job complains /bin/sh: eval: pip: not found
.
Below is the .gitlab-ci.yml
file.
stages:
- build
- test
default:
image: docker:24.0
build_image:
stage: build
script:
- docker build .
test:
stage: test
script:
- pip install .[dev]
- pytest
The build_image
job is doing a build on my Dockerfile but despite that the next job does not find pip. The contents of the Dockerfile looks as follows:
FROM python:3.12-slim
WORKDIR /usr/src/template_repository
COPY ./requirements.txt .
RUN apt-get update
RUN pip install --upgrade pip
RUN pip install -r requirements.txt
How can I get the test job to find pip and install all the requirements?