代码:
include:
- project: 'testing-parent-pipeline/Testing-child-push'
file: 'script/test.yml'
Run Code Online (Sandbox Code Playgroud)
我收到这个错误
testing-parent-pipeline/Testing-child-push未找到项目或访问被拒绝!确保管道配置中的所有包含内容均已正确定义。
在.gitlab-ci.yml中
stages:
- test-jq
test-jq:
stage: test-jq
image: ruby:2.5
script:
- apt-get update
- apt-get install -y git jq
- git config --global user.email "$GITLAB_USER_EMAIL"
- git config --global user.name "$GITLAB_USER_NAME"
- LAST_COMMIT_SHA=$(
curl -s \
--header "PRIVATE-TOKEN:$CLONE_KEY" \
"$CI_API_V4_URL/projects/$CI_PROJECT_ID/repository/commits/$CI_COMMIT_SHA" |\
jq -r '.parent_ids | del(.[] | select(. == "'$CI_COMMIT_BEFORE_SHA'")) | .[-1]'
)
Run Code Online (Sandbox Code Playgroud)
抛出错误:/bin/bash:第 158 行:jq:找不到命令