Skip to content
Snippets Groups Projects

Expose trigger short token to CI

  • Please check this box if this contribution uses AI-generated content as outlined in the GitLab DCO & CLA

What does this MR do and why?

This MR adds the CI_TRIGGER_SHORT_TOKEN variable to the CI as requested in #429449 (closed). This is needed to be able to check if a pipeline was triggered via a trigger token and to check which trigger token was used in a pipeline.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Setup a runner for the dev instance
  2. Create a pipeline in a project. Example:
stages:
  - test

test-job:
  stage: test
  script:
    - echo "$CI_JOB_NAME"
    - echo "$CI_TRIGGER_SHORT_TOKEN"
  1. Create a trigger token by navigating to Settings -> CI/CD -> Pipeline trigger tokens
  2. Create a pipeline by sending a POST request to https://<instance url>/api/v4/projects/<project_id>/ref/<ref_name>/trigger/pipeline?token=<token>
  3. Verify that CI_TRIGGER_SHORT_TOKEN has a value in the job output
Edited by 🤖 GitLab Bot 🤖

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Marcel Amirault changed milestone to %17.0

    changed milestone to %17.0

  • Marcel Amirault requested review from @shampton and removed review request for @marcel.amirault and @ahegyi

    requested review from @shampton and removed review request for @marcel.amirault and @ahegyi

  • added 1 commit

    • a8bc3a3a - Apply 1 suggestion(s) to 1 file(s)

    Compare with previous version

  • Scott Hampton requested review from @dbiryukov and removed review request for @shampton

    requested review from @dbiryukov and removed review request for @shampton

  • Marcel Amirault approved this merge request

    approved this merge request

  • Dmytro Biryukov approved this merge request

    approved this merge request

  • Dmytro Biryukov requested review from @alipniagov and removed review request for @dbiryukov

    requested review from @alipniagov and removed review request for @dbiryukov

  • Aleksei Lipniagov approved this merge request

    approved this merge request

  • Aleksei Lipniagov resolved all threads

    resolved all threads

  • 1 Warning
    :warning: There were no new or modified feature flag YAML files detected in this MR.

    If the changes here are already controlled under an existing feature flag, please add
    the feature flagexists. Otherwise, if you think the changes here don't need
    to be under a feature flag, please add the label feature flagskipped, and
    add a short comment about why we skipped the feature flag.

    For guidance on when to use a feature flag, please see the documentation.

    1 Message
    :book: This merge request adds or changes documentation files. A review from the Technical Writing team before you merge is recommended. Reviews can happen after you merge.

    Documentation review

    The following files require a review from a technical writer:

    The review does not need to block merging this merge request. See the:

    Reviewer roulette

    Category Reviewer Maintainer
    backend @mokhax profile link current availability (UTC-6) @suraj_tripathy profile link current availability (UTC+5.5)
    ~"Verify" Reviewer review is optional for ~"Verify" @hfyngvason profile link current availability (UTC-4)

    Please check reviewer's status!

    • available Reviewer is available!
    • unavailable Reviewer is unavailable!

    Please refer to documentation page for guidance on how you can benefit from the Reviewer Roulette, or use the GitLab Review Workload Dashboard to find other available reviewers.

    If needed, you can retry the :repeat: danger-review job that generated this comment.

    Generated by :no_entry_sign: Danger

  • Hordur Freyr Yngvason requested review from @hfyngvason and removed review request for @alipniagov

    requested review from @hfyngvason and removed review request for @alipniagov

  • Hordur Freyr Yngvason approved this merge request

    approved this merge request

  • E2E Test Result Summary

    allure-report-publisher generated test report!

    e2e-test-on-gdk: :white_check_mark: test report for a8bc3a3a

    expand test summary
    +------------------------------------------------------------------+
    |                          suites summary                          |
    +-------------+--------+--------+---------+-------+-------+--------+
    |             | passed | failed | skipped | flaky | total | result |
    +-------------+--------+--------+---------+-------+-------+--------+
    | Create      | 83     | 0      | 9       | 0     | 92    | ✅     |
    | Monitor     | 7      | 0      | 0       | 0     | 7     | ✅     |
    | Plan        | 51     | 0      | 2       | 0     | 53    | ✅     |
    | Verify      | 35     | 0      | 1       | 0     | 36    | ✅     |
    | Govern      | 66     | 0      | 0       | 0     | 66    | ✅     |
    | Release     | 5      | 0      | 0       | 0     | 5     | ✅     |
    | Package     | 24     | 0      | 6       | 0     | 30    | ✅     |
    | Data Stores | 31     | 0      | 0       | 0     | 31    | ✅     |
    | Manage      | 0      | 0      | 1       | 0     | 1     | ➖     |
    | Analytics   | 2      | 0      | 0       | 0     | 2     | ✅     |
    +-------------+--------+--------+---------+-------+-------+--------+
    | Total       | 304    | 0      | 19      | 0     | 323   | ✅     |
    +-------------+--------+--------+---------+-------+-------+--------+

    e2e-package-and-test: :white_check_mark: test report for a8bc3a3a

    expand test summary
    +------------------------------------------------------------------+
    |                          suites summary                          |
    +-------------+--------+--------+---------+-------+-------+--------+
    |             | passed | failed | skipped | flaky | total | result |
    +-------------+--------+--------+---------+-------+-------+--------+
    | Verify      | 150    | 0      | 30      | 0     | 180   | ✅     |
    | Create      | 152    | 0      | 21      | 2     | 173   | ✅     |
    | Monitor     | 8      | 0      | 0       | 0     | 8     | ✅     |
    | Data Stores | 4      | 0      | 0       | 0     | 4     | ✅     |
    | Govern      | 6      | 0      | 0       | 0     | 6     | ✅     |
    | Plan        | 8      | 0      | 0       | 0     | 8     | ✅     |
    | Package     | 0      | 0      | 2       | 0     | 2     | ➖     |
    +-------------+--------+--------+---------+-------+-------+--------+
    | Total       | 328    | 0      | 53      | 2     | 381   | ✅     |
    +-------------+--------+--------+---------+-------+-------+--------+
  • Greg Myers requested review from @greg

    requested review from @greg

  • Dmytro Biryukov mentioned in merge request !149335 (closed)

    mentioned in merge request !149335 (closed)

  • Greg Myers approved this merge request

    approved this merge request

  • Hordur Freyr Yngvason resolved all threads

    resolved all threads

  • Hordur Freyr Yngvason enabled an automatic merge when the pipeline for a8bc3a3a succeeds

    enabled an automatic merge when the pipeline for a8bc3a3a succeeds

  • @kevin.gosa, how was your code review experience with this merge request? Please tell us how we can continue to iterate and improve:

    1. React with a :thumbsup: or a :thumbsdown: on this comment to describe your experience.
    2. Create a new comment starting with @gitlab-bot feedback below, and leave any additional feedback you have for us in the comment.

    Subscribe to the GitLab Community Newsletter for contributor-focused content and opportunities to level up.

    Thanks for your help! :heart:

    This message was generated automatically. You're welcome to improve it.

  • mentioned in commit 42f4224b

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading