Access GitLab Resources in GitLab Runner Jobs | ATLASSC.NET
Skip to main content
/// .DATA.FRAGMENT_20220114

Access GitLab Resources in GitLab Runner Jobs

1 minAuthor: Z.SHINCHVEN

In complex CI/CD scenarios, we may need to access other resources from GitLab that is out of current project/repository, like cloning another repository, or calling gitlab API to trigger a contiguous job.

These resources are accessible via CI/CD job token.

Clone a Repository Using CI_JOB_TOKEN

git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.example.com/<namespace>/<project>

Trigger a Job Using CI_JOB_TOKEN

curl --request POST --form token=${CI_JOB_TOKEN} https://gitlab.example.com/api/v4/projects/<project_id>/trigger/pipeline
RackNerd Billboard Banner
Share node:
/// .RELATED.DATA_STREAMSShared tags

Related posts

Scanning_database_for_correlations…

/// .UPLINK.SUBSCRIBE

Keep your deck synced with every new transmission from ATLASSC.NET. Subscribe over RSS or Atom, or wire the whole archive straight into your AI assistant with the MCP server.