Skip to content

Feat: Add ci-management verify and merge reusable workflows #77

Open
2 of 2 issues completed
Open

Description

Summary

Provide new homes for the ci-management workflows in
lfit/releng-reusable-workflows. Unlike the change-isolation and tox work,
the design here still needs settling, so this issue records the state of
play and the questions, and the design gets agreed in it before any code.

What exists today

Three verify variants and one merge workflow, with three different
structures:

Legacy workflow Structure Consumers (pin)
gerrit-ci-management-verify.yaml Votes inside: clear → actionlint / pre-commit / JJB test → vote onap/ci-management (@main), o-ran-sc/ci-management (@main), FDio/archived-ci-management
gerrit-compose-ci-management-verify.yaml No vote; same three jobs; requires an SSH secret it never uses lfit/ci-management (v0.2.26)
composed-ci-management-verify.yaml Votes inside; calls compose-repo-linting, compose-jjb-verify, compose-packer-verify; comment-only input onap/ci-management non-voting (@main), akraino-edge-stack/ci-management
gerrit-ci-management-merge.yaml Notifies, runs jenkins-jobs update --delete-old, reports onap, o-ran-sc (@main), opendaylight/releng-builder (v0.10.3)

Shared defects: actionlint installed by piping a script from its main
branch into bash; pipx run pre-commit unpinned; JJB version from a
vars.JJB_VERSION with an inline 6.4.3 fallback; Jenkins credentials
written into an ini file via expression interpolation in the merge
workflow.

Proposed shape (to confirm)

Two reusables, voting in the caller like the other Gerrit reusables here:

  • ci-management-verify.yaml — jobs: JJB test (jenkins-jobs test
    against jjb/, version pinned by input), linting via
    standalone-linting-action (which brings actionlint and the repository's
    own hooks), optional packer validation when jjb//packer/ templates
    change. comment-only disappears: advisory vs voting is the caller's
    account choice.
  • ci-management-merge.yaml — JJB update to Jenkins with
    JOBBUILDER_PROD_PSW passed as a secret and written through env, never
    interpolated; notify/report steps move to the caller.

Questions to settle here

  1. Linting lane. linting.yaml in this repository takes no Gerrit
    checkout inputs by design (its docs say so). Do we add them, or does
    ci-management-verify.yaml call standalone-linting-action directly
    after its own Gerrit checkout? The latter keeps linting.yaml's
    contract intact.
  2. Packer validation. Only composed-ci-management-verify has it, via
    compose-packer-verify with cloud credentials. Include it behind an
    packer_verify input, or leave packer to packer-build-action callers?
  3. A JJB action. Nothing under lfreleng-actions wraps
    jenkins-job-builder today. Inline steps in the reusable, or a small
    jjb-action (test + update modes) that the two reusables share?
  4. Caller growth. Moving voting out makes the thin ONAP and O-RAN-SC
    ci-management callers larger (prepare/vote jobs, as their .github
    callers already have). Accept, for consistency with docs-workflows?
  5. Merge safety. --delete-old removes Jenkins jobs no longer in the
    repository. Keep as-is (current behaviour), or gate behind an input?

Deliverables (once the above is agreed)

  • Design recorded in this issue; then the two workflows, examples, docs, self-tests, release
  • Migration notes per consumer, including moving the @main callers to a release SHA

Related

Sub-issues

Sub-issues

2 of 2 Issues completed
Loading 2 sub-issues

Activity

  1. added
    question
    on Oct 16, 2026
  2. ModeSevenIndustrialSolutions commented on Oct 31, 2026

    @ModeSevenIndustrialSolutions
    MemberAuthor

    Design record (2026-10-31)

    Settles the questions in the description. Sources: the legacy workflows at lfit/releng-reusable-workflows@c9fe535, their callers, and the lfreleng-actions actions involved. The work is split into the issues listed under Work, one pull request each.

    Corrections to the description

    • Consumers have moved on. ODL's merge caller pins v0.11.0 (e3bb02d), not v0.10.3. FD.io pins v0.2.25 and is retiring its Jenkins jobs. ONAP's non-voting caller (gerrit-ci-management-novote-verify.yaml, calling composed-ci-management-verify@main) fails at startup on every recorded run: it passes CLOUDS_*_B64, but the workflow has required CLOUDS_*_2XB64 since 97c6925 (2024-08). akraino's caller has never run. So composed-ci-management-verify, comment-only and the reusable packer lane have no working consumer. Migration set: ONAP (verify, merge), O-RAN-SC (verify, merge), ODL (merge), lfit (verify).
    • standalone-linting-action does not run actionlint. It runs the repository's own hooks, and no consumer defines an actionlint hook.
    • The merge credential handling is worse than described. The password is interpolated into an unquoted heredoc, so the shell expands any $ or backtick in it, and the ini is written into the workspace. The job then deploys the mirror's branch tip after sleep 10s, without checking that the tip contains the merged change. Its concurrency group is per change, so two merges can run --delete-old at the same time.
    • JJB 6.4.3 is two releases behind 6.5.0 (2026-05-23). The consumers' own pins range from 5.0.2 to 6.3.0.

    Decisions

    1. Linting lane. ci-management-verify.yaml calls standalone-linting-action after its own Gerrit checkout and credential removal, with no_checkout: 'true', run_all_hooks: 'true' and no token. linting.yaml is unchanged. actionlint comes from each consumer's own hooks: migration adds the actionlint-py hook that this repository uses. Feat: Support no_checkout for caller-prepared trees standalone-linting-action#201 makes no_checkout a supported option.

    2. Packer is out. A repository that wants validation calls packer-build-action (mode: validate) from its own caller. comment-only is dropped: whether a run is advisory or votes is the caller's choice of account.

    3. JJB moves into a new action, lfreleng-actions/jjb-action, with test and update modes, used by both reusables. Each release installs one hash-locked JJB version, starting at 6.5.0, instead of taking the version as an input.

    4. Callers grow. Verify callers become prepare / call / vote and merge callers notify / call / report, as lfit/ci-management and the docs-workflows callers already are. A caller's filename must contain gerrit and verify or merge, and not required, or gerrit_to_platform does not dispatch it.

    5. Merge safety. --delete-old stays on by default, behind a delete_old input. In addition, the merge workflow:

      • deploys only the configured branch; any other branch, including refs/meta/config, skips the update;
      • checks the merged revision is in the tree it deploys, waiting a bounded time for the mirror before failing;
      • refuses to update when the tree generates no jobs.

      The example caller runs one merge at a time per Jenkins (cancel-in-progress: false). The password reaches JJB only through env, in a private ini under RUNNER_TEMP.

    Constraints on both workflows

    • Submodules. Check out with submodules: every consumer keeps global-jjb as a submodule at the repository root, symlinked into jjb/.
    • Credentials. Verify runs the change's own pre-commit hooks, and checkout-gerrit-change-action still persists its token (as of v1.2.1). Remove the credentials before any repository code runs, as tox-verify.yaml does.
    • Inputs instead of vars.*. The implicit variables become inputs: gerrit_url (falling back to vars.GERRIT_URL), jenkins_url, jenkins_user, workers. The password is a secret.
    • Egress. The org allow-list already covers PyPI and the ONAP, O-RAN-SC, ODL, FD.io and EdgeX Jenkins hosts.

    Work

  3. removed
    question
    on Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions