Skip to content

STAC-25463 Add GitHub Actions check-test workflow (integrations CI migration phase 1) - #362

Open
LouisParkin wants to merge 3 commits into
stackstate-7.78.2from
STAC-25463-integrations-github-ci
Open

STAC-25463 Add GitHub Actions check-test workflow (integrations CI migration phase 1)#362
LouisParkin wants to merge 3 commits into
stackstate-7.78.2from
STAC-25463-integrations-github-ci

Conversation

@LouisParkin

Copy link
Copy Markdown
Contributor

Jira: https://stackstate.atlassian.net/browse/STAC-25463 (parent: STAC-25142)

First phase of moving stackstate-agent-integrations CI off GitLab. Purely additive.gitlab-ci.yml is untouched and keeps running, so this can land without a cutover.

What moved

GitLab GitHub Actions
the test_<check> job family (20 near-identical jobs) one check-tests matrix
per-job changes: rules .github/scripts/select-checks.sh (plain git diff vs merge base)
checksdev validate * riding inside test_stackstate_checks_base its own validate job
services: docker:24-dind + DOCKER_HOST: tcp://docker:2375 dropped — both public ARC runners already ship a DinD sidecar

Path filtering is done in git rather than a path-filter action because StackVista enforces a strict third-party action allowlist, and git diff against the merge base is precisely what the GitLab rule meant.

Scoped out (each reasoned in the workflow header)

  • The 5 Docker-dependent suitessplunk_{base,health,metric,topology} + stackstate_checks_dev. These are the only suites needing a Docker daemon. Phase 2; the runners already provide DinD, so it is about exercising that path, not provisioning it.
  • test_postgres — dead config. It tests a postgres check that does not exist in this repository. Dropped, not pending.
  • print_env — not ported at any phase. It is a bare printenv, and this repo is public, so it publishes every CI credential in scope to a world-readable log. Same hazard class as the sign_debian_package.sh finding on the agent.
  • No Windows lane exists to port. .gitlab-ci.yml defines a .windows_env anchor that no job has ever referenced, and Windows is not a supported target. The orphaned conda_env.ps1 / windows_*.cmd helpers can retire with the GitLab pipeline (STAC-25464).
  • Publishing + the runner-image docker job stay on GitLab until integrations gets its own publishing role (pulumi-infra section 7.4).
  • Cerberus notify — unlike the agent, this pipeline has never had a notify job, so adding one is new capability, and CERBERUS_LAMBDA_URL is a private-visibility org secret unreadable from a public repo. Follow-up.

Credentials

Phase 1 needs no new secret provisioning: REGISTRY_HOST / REGISTRY_USER / REGISTRY_PASSWORD are org-level visibility: all (STAC-25350) and already reach this public repo. Note the image ref composes vars.REGISTRY_HOST + /docker rather than using vars.REGISTRY_DOCKER_URL, which is private-visibility and not readable here.

Validation

  • actionlint clean — added .github/actionlint.yaml declaring the self-hosted *-public labels

  • zizmor clean (2 suppressed = the documented unpinned-images ignores on the container ref)

  • shellcheck clean

  • Selector exercised against real git history:

    scenario selected
    push / dispatch all 15
    PR touching only zabbix/ ["zabbix"]
    PR touching kubelet/ + vsphere/ ["kubelet","vsphere"]
    PR touching a shared library all 15
    PR touching nothing relevant [] (matrix skips)

This PR self-validates — the workflow runs against this very PR, so the image path and runner labels are proven before merge.

LouisParkin and others added 3 commits August 3, 2026 09:47
…gration phase 1)

Ports the pure-Python half of .gitlab-ci.yml to GitHub Actions as the first
phase of moving stackstate-agent-integrations off GitLab (STAC-25142).

What moved:
  * The `test_<check>` job family -> a single `check-tests` matrix.
  * The per-job `changes:` rules -> .github/scripts/select-checks.sh, which
    reproduces them with `git diff` against the merge base. Done in plain git
    because StackVista enforces a strict third-party action allowlist.
  * The `checksdev validate *` commands that rode inside
    test_stackstate_checks_base -> their own job, so a metadata failure reads
    as its own PR check.

Scoped out, with reasons recorded in the workflow header:
  * The five Docker-dependent suites (splunk x4 + stackstate_checks_dev) are
    phase 2; both public ARC runners ship a DinD sidecar, so this is about
    exercising that path, not provisioning it.
  * test_postgres is dead config - it tests a `postgres` check that does not
    exist in this repository.
  * print_env is not ported at any phase: a bare `printenv` on a PUBLIC repo
    publishes every CI credential in scope to a world-readable log.
  * There is no Windows lane to port. `.gitlab-ci.yml` defines a `.windows_env`
    anchor that no job has ever referenced, and Windows is not a supported
    target.
  * Publishing stays on GitLab until integrations gets its own publishing role
    (pulumi-infra section 7.4), so the GitLab pipeline remains live.

Phase 1 needs no new secret provisioning: REGISTRY_HOST/USER/PASSWORD are
org-level visibility=all (STAC-25350) and so already reach this PUBLIC repo.
The image reference composes vars.REGISTRY_HOST + /docker rather than using
vars.REGISTRY_DOCKER_URL, which is private-visibility and unreadable here.

Validated: actionlint clean (with a new .github/actionlint.yaml declaring the
self-hosted labels), zizmor clean, shellcheck clean, and the selector exercised
against real git history for the push, single-check, multi-check, shared-library
and no-match cases.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…plied

pulumi-infra #262 is merged and applied (~ 1 updated), so docker-public can now
pick up jobs from this repository.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The GitLab `.linux_test` anchor ran .setup-scripts/setup_artifact_registry.sh
immediately before `checksdev test`, and the port dropped it. Fourteen of the
fifteen phase-1 suites resolve everything from public PyPI and did not notice,
but the vsphere suite pins vsphere-automation-sdk==1.82.0, which public PyPI
does not carry (only a 0.0.1 placeholder), so it failed with:

  ERROR: Could not find a version that satisfies the requirement
  vsphere-automation-sdk==1.82.0 (from versions: 0.0.1)

Restores the step in the same position as GitLab had it. The script writes
~/.pip/pip.conf and a 0600 ~/.netrc, so credentials never appear in the index
URL.

The step is guarded on the credentials being present rather than run
unconditionally: only one suite actually needs the private index, so an absent
credential should not fail the fourteen that do not. When it is missing the job
emits a warning annotation naming the consequence, and the affected suite still
fails visibly on its own unresolvable pin.

Requires the pull-only grant in StackVista/pulumi-infra#263.
setup_artifactory_docker.sh stays out; it is a registry docker login that only
the deferred Docker suites need, and it comes across with them in phase 2.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant