Please help fill in this template with all the details to help others help you more efficiently. Use formatting blocks for code, config, logs and ensure to remove sensitive data.
Problem to solve
Describe your question in as much detail as possible:
I would like to have a pipeline that performs priviliged operations with secrets on behalf of users. To do that, I want to have a child pipeline that will only run its pipeline on a protected branch, and only be triggered from trusted sources.
I can make my child pipeline run only on main, and make sure that the repository has rules set up to limit who can modify the pipeline.
I can trigger this pipeline from some parent repository. But what I want to do is make sure the parent pipeline is from a specific repository, on a protected branch. Is it possible to do this?
- What are you seeing, and how does that differ from what you expect to see?
I’m not seeing anything, nor do I expect to see anything in specific
- Consider including screenshots, error messages, and/or other helpful visuals
Steps to reproduce
Which troubleshooting steps have you already taken? Can you link to any docs or other resources so we know where you have been?
I’ve looked at Predefined CI/CD variables reference | GitLab to see if there are any pre-defined variables that can give me a guarantee of what the parent projectid and branch is.
I’ve looked at Add new CI variables: PARENT_PIPELINE_ID and PIPELINE_START_TIME to CI. (#323569) · Issues · GitLab.org / GitLab · GitLab
Configuration
Add the CI/CD configuration from .gitlab-ci.yml
and other configuration if relevant (e.g. docker-compose.yml). Alternatively, create a public GitLab.com
example project that provides all necessary files to reproduce the question.
Versions
Please select whether options apply, and add the version information.
- Self-managed
-
GitLab.com
SaaS - Dedicated
- Self-hosted Runners
Versions
- GitLab (Web:
/help
or self-managed system informationsudo gitlab-rake gitlab:env:info
): - GitLab Runner, if self-hosted (Web
/admin/runners
or CLIgitlab-runner --version
):
Helpful resources
- Check the FAQ for helpful documentation, issues/bugs/feature proposals, and troubleshooting tips.
- Before opening a new topic, make sure to search for keywords in the forum search
- Check the GitLab and GitLab Runner projects for existing issues. If you encounter a bug, please create a bug report issue.
- Review existing troubleshooting docs.
Thanks for taking the time to be thorough in your request, it really helps!