8 Commits

Author SHA1 Message Date
Shubhika Garg
f63c444bb7 ci: ensure maintainer approval job is evaluated correctly on push events
- The require-maintainer-approval job was being skipped on push event
    when upstream jobs (verify-signed-commits and check-labels) were skipped,
    even though detect-changes job successfully marked protected files as changed.
  - GitHub Actions may skip dependent jobs due to upstream skipped states before
    evaluating custom conditions.
  - Adding always() ensures the job condition is evaluated regardless of
    the status of upstream jobs, while still enforcing the rule that the job
    only runs when protected_files_changed == true.

Signed-off-by: Shubhika Garg <shubhika.garg@openairinterface.org>
2026-07-03 13:19:58 +02:00
Shubhika Garg
328968cecf ci: ensure retrigger-ci label is cleaned up after every CI run
- Previously the label was only removed when it was the labeled event
    that triggered the workflow. If a PR was synchronized or reopened
    while the label was already present, it would not be removed by
    the workflow.
  - Created a dedicated cleanup job that depends on all other jobs
    with if: always(), ensuring it runs regardless of whether upstream
    jobs succeeded, failed, or were skipped.
  - Now the cleanup runs on every pull_request_target event and removes
    the label if present, ensuring it is always cleared after CI completes.

Co-authored-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
Signed-off-by: Shubhika Garg <shubhika.garg@openairinterface.org>
2026-06-26 13:56:32 +02:00
Shubhika Garg
840abd0048 ci: Add check for unsigned commits in the PR
- Add verify-signed-commits job that runs on PR
  - check-labels and all downstream jobs are skipped
    if signed commmit verifications fails
  - Fetch all commits in the PR via GitHub API
    and check verification status
  - Fail and print the unsigned commit SHAs if any
    unsigned commits are found.

Co-authored-by: Shubhika Garg <shubhika.garg@openairinterface.org>
Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-06-26 13:56:30 +02:00
Shubhika Garg
910f8cef33 ci: skip ci when no mandatory ci label present on PR
- Add check-labels job that runs first on the PR events
  - Fail early if none of the mandatory CI labels are present
    (BUILD-ONLY, documentation, 4G-LTE, 5G-NR, nrUE, CI, retrigger-ci)
  - Skip detect-changes, require-maintainer-approval and trigger-jenkins
    when no mandatory CI label is found
  - Push events are unaffected by the label check
  - For labeled events, only retrigger-ci triggers the pipeline;
    any other label addition is skipped

Co-authored-by: Shubhika Garg <shubhika.garg@openairinterface.org>
Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-06-18 14:20:59 +02:00
Shubhika Garg
29be39948c ci: protect deployment/build files and update maintainer contact
- Add ci-approval protection for docker/, charts/, openshift/,
    and build_oai and build_helper files
  - Update oai email contact to `oaicicdteam@openairinterface.org`
  - Change GitLab to GitHub in `GET_SOURCES.md`

Signed-off-by: Shubhika Garg <shubhika.garg@openairinterface.org>
2026-06-10 10:15:45 +02:00
Shubhika Garg
62846a9311 ci: remove first-time contributor job in workflow and update Jenkins badges
- Remove the automated welcome message for first-time contributors.
    Contributor related information will be maintained in project
    announcements instead, avoiding additional bot activity on PRs.
  - Update badge links for the Jenkins image builder jobs.

Signed-off-by: Shubhika Garg <shubhika.garg@openairinterface.org>
2026-06-09 09:22:15 +02:00
Shubhika Garg
8e30ec8031 ci: migrate Jenkins dispatch to pull_request_target
Migrate the Jenkins dispatch workflow from `pull_request` to
`pull_request_target` so that secrets are available for PRs from forks,
enabling CI to run on external contributions.

- Switch trigger from `pull_request` to `pull_request_target`
- Add `github.event.action` to concurrency group to prevent the `opened`
  event from cancelling in-progress CI runs, which caused `detect-changes`
  to be skipped on new PRs
- Remap `pull_request_target` back to `pull_request` in the
  `X-Github-Event` header for Jenkins compatibility
- Remove `pr-retrigger-ci-instructions`

Co-authored-by: Sagar Arora <sagar.arora@openairinterface.org>
Co-authored-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
Signed-off-by: Shubhika Garg <shubhika.garg@openairinterface.org>
2026-06-08 17:40:47 +02:00
Jaroslava Fiedlerova
ce6a54ab94 CI: Use GitHub Actions workflow for CI build trigger
Add GitHub Actions workflow with 5 jobs:
- detect-changes: uses dorny/paths-filter to check whether files under
  ci-scripts/ or .github/ were modified
- welcome-first-time-contributor: getting started and useful links for
  first time contributors
- pr-retrigger-ci-instructions: instructions on how to retrigger the CI
  without any PR changes
- require-maintainer-approval: requires manual approval via the
  ci-approval GitHub environment when protected files changed,
  preventing untrusted changes from triggering Jenkins automatically
- trigger-jenkins: triggers Jenkins by forwarding the GitHub event
  payload via curl, skipping the approval gate when no protected files
  changed

Add support for retriggering CI by adding a label to a PR. The label is
removed automatically after Jenkins is triggered, regardless of success
or failure, so it can be re-added at any time for subsequent retriggers.

Assisted-By: Claude:claude-sonnet-4-6
Co-authored-by: Sagar Arora <sagar.arora@openairinterface.org>
Co-authored-by: Shubhika Garg <shubhika.garg@openairinterface.org>
Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-06-05 16:28:13 +02:00