Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
otb
otb
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 298
    • Issues 298
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 14
    • Merge Requests 14
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Main Repositories
  • otbotb
  • Merge Requests
  • !558

Merged
Opened Jul 18, 2019 by Guillaume Pasero@gpaseroOwner

CI: fixing cdash links on forks

  • Overview 0
  • Commits 1
  • Pipelines 2
  • Changes 1

The cdash links are a bit tricky when doing MR between a fork and the official repo:

  • normally, the statuses API should be used on the target project (because it is the one carrying the MR)
  • however, the personal API token of the contributor may not allow to use Gitlab API on the official repository.
  • but, it appears that using the fork ID and the default CI_COMMIT_REF_NAME as the ref parameter of statuses will send the links to the MR pipeline, maybe because in this particular case it also has the tag latest ...

Anyway, to illustrate this obscure issue, some example with different id and ref parameters for the statuses API:

  • https://gitlab.orfeo-toolbox.org/atalon/otb/commit/64d95abbffc94732908588436e4636bbd9a78708/pipelines : pipeline 2090 with id = fork's ID and ref = refs/merge-requests/541/head : the MR is unknown in the fork project, so a blank pipeline is created (n° 2092) and received all the CDash links from pipeline 2090.

  • https://gitlab.orfeo-toolbox.org/atalon/otb/commit/a15d589d8e4d438360874c89476e6f61f8d5632e/pipelines : pipeline 2262 with id = main repo ID and ref = refs/merge-requests/555/head : I get a HTTP Error 403, the user can't post statuses on the main repo. I manually ran the pipeline 2261 (id = fork's ID and ref= $CI_COMMIT_REF_NAME ) to see where the cdash link would go, and it went into pipeline 2262.

  • https://gitlab.orfeo-toolbox.org/atalon/otb/commit/b77b5d957aa01f14ceb6af89211390097f46f2ff/pipelines : pipeline 2264 with id = fork's ID and ref= $CI_COMMIT_REF_NAME , the links are posted in the right pipeline.

Assignee
Assign to
Reviewer
Request review from
7.0.0
Milestone
7.0.0
Assign milestone
Time tracking
Reference: orfeotoolbox/otb!558
Source branch: ci_cdash_on_forks