I am trying to use needs:project specifying a commit SHA in
ref field. In following way:
job: stage: tests script: - ls needs: - project: namespace/myproject job: build ref: c443c50cee692309518ff624599e3dd2ce367293 artifacts: true
Unfortunately I receive an error:
A similar job definition using tag and branch name in
ref field, works fine for me. Also, I am sure that pipeline/job/artifacts exist for SHA that I’m trying to refer.
I wonder if commit SHA as
needs:project is supported or maybe I’m doing something wrong?
Unfortunately, I can not find information in documentation. However, similar context for
ref field is used for include:project and documentation has a example with commit SHA as
ref value. I wonder if behavior for
needs:project suppose to be similar.
include: - project: 'my-group/my-project' ref: main # Git branch file: '/templates/.gitlab-ci-template.yml' - project: 'my-group/my-project' ref: v1.0.0 # Git Tag file: '/templates/.gitlab-ci-template.yml' - project: 'my-group/my-project' ref: 787123b47f14b552955ca2786bc9542ae66fee5b # Git SHA file: '/templates/.gitlab-ci-template.yml'
We are using self-hosted gitlab v15.8.4-ee. Gitlab runner: 15.2.1