I have a gitlab pipeline with three steps and a template.
First I prepare a git checkout to another repository.
The needed files I add to the artifacts:
artifacts:
paths:
- $CI_PROJECT_DIR/ingo/tests/integration_tests/*
Looks like it works well.
Then I have a job “deploy” that just deploy a pod to a cluster
This have
needs:
- prepare
to make sure that this deploy runs after prepare.
Finaly I have a job “test” that will perform the integration tests:
test:
extends:
- .test_step
stage: test
needs:
- test_deploy
timeout: 20 minutes
variables:
BUILD_VERSION: $BUILD_TIME
TESTING_STAGE: testtemp
TEST_FOLDER: integration_tests
TEST_FILES: "test_simulation.py"
Here I use a template:
.test_step:
tags:
- docker
image: harbor.xxx/cache_dockerhub/python:3.8.19-slim-bookworm
needs:
- job: prepare
artifacts: true
script:
- cd $CI_PROJECT_DIR
- ls
If gitlab runs this template it has always not the needed artifacts inside.
I tried also with the keyword dependencies but this will cause in an error.
jobs:test dependencies the prepare should be part of needs`
Isn’t it possible to use the artifacts inside the template? Or is there something I miss?