Files
Alex Pelavin f41e9b693c ci: version and release every component by the bare vX.Y.Z tag (#2164)
* ci: version every artifact by the bare v* describe

Every published artifact is now versioned by
`git describe --tags --always --match 'v*' "${GITHUB_SHA}"`, with no
component prefix, so component versions follow the nvke tag rather than
moving independently. The controller image, chart, provisioned provider
image, agent binaries and packages, nvkectl and the OS image resolve
their version this way, and the version is passed to each build so the
binaries report the same version they are published under.

The release registry describes and resolves components against the
bare v* tags, so a beta qualifies the artifacts its tag published.

Signed-off-by: Alex Pelavin <apelavin@nvidia.com>

* ci: build and publish every component on a bare vX.Y.Z tag

Every component build that a vX.Y.Z-beta.N tag runs now runs on a bare
vX.Y.Z tag too: the controller and provisioned provider images, the
controller chart, the agent binaries and packages, the OS image and
nvkectl. The gates that admitted only beta tags admit any bare v* tag,
and nvkectl is versioned by the bare describe for both.

Beta-only behaviour is unchanged: a beta still skips DSX, stays out of
the apt index and bakes non-FDE images only. A release does all three.
promote-dsx now runs on vX.Y.Z, so it tags DSX with the bare describe
the NVCR copy was published under.

The beta flag in tag-publish.yml is removed, so nvkectl is published to
GHCR for every tag it is built for, betas included. cli-artifact.yml
versions it by the bare describe.

Signed-off-by: Alex Pelavin <apelavin@nvidia.com>

* build: version every module by the bare v* describe

The Makefiles, the root cmd_version and the scripts that derive the
agent version described against component tags (agent/v*, controller/v*,
cli/v*, os-image/v*, cluster-api-provider-provisioned/v*,
management-engine/v*). They now use
`git describe --tags --always --dirty --match 'v*'`, the version the
publish workflows already stamp, so a local or CI build reports the same
version as the artifact published from that commit.

The fallbacks for an untagged checkout and a build outside git are
unchanged, as is the agent's 0.0.0- prefix for an untagged .deb. The
e2e VALIDATE_VERSION now pairs with the nvke-validate image, and the
comments and log lines that named the old describe are updated.

Signed-off-by: Alex Pelavin <apelavin@nvidia.com>

* docs: describe one vX.Y.Z tag releasing every component

Components are no longer tagged on their own. The release docs, the
module AGENTS.md and README files and SECURITY.md now say one signed
vX.Y.Z tag releases the repository and every component built from it,
versioned by `git describe --tags --always --match 'v*'`.

docs/artifact-publication.md lists what each workflow publishes for a
release and for a nightly beta, and that an RC publishes nothing of its
own. The prefixed tag instructions, and the go get example that relied
on them, are removed. Mentions of past component tags that remain true
as history are kept.

The qualification docs and the qualify-e2e resolution input now say a
release, an RC and a beta are all qualified with commitDescribe, which
describes the commit the version marks and so resolves every component
to it. gitTag takes the highest v* tag in the repository and is not for
qualification.

Signed-off-by: Alex Pelavin <apelavin@nvidia.com>

* ci: stop publishing artifacts from component release tags

A component release tag (agent/vX.Y.Z, controller/vX.Y.Z,
cluster-api-provider-provisioned/vX.Y.Z, os-image/vX.Y.Z, cli/vX.Y.Z) no
longer starts a publisher; a release is a bare vX.Y.Z tag. Component
release candidate tags still start the same workflows as before.

Signed-off-by: Alex Pelavin <apelavin@nvidia.com>

* ci: publish every GHCR release artifact on vX.Y.Z

agent-artifact.yml, chart-publish.yml and image-validate-nvcr.yml only ran
on component tags, so a release published none of them. Each now runs on a
bare vX.Y.Z tag and versions by the bare v* describe. The controller and
provider GHCR promotions and the agent .deb GHCR push also run on vX.Y.Z
(not betas), since they were gated on component tags too and the GHCR
chart waits for the controller image there.

Signed-off-by: Alex Pelavin <apelavin@nvidia.com>

* ci: name every tag build by its describe version, not the tag

The publishers versioned the build by the bare v* describe but still took
version aliases, GHCR promotion tags, the agent .deb version, the nvkectl
S3 release path and the os-image version from the tag name. On a component
RC tag the two disagreed, and on a vX.Y.Z tag agent-deb's GHCR push would
have been tagged with the commit SHA. Every one now uses the describe
version, which on the tagged commit is the tag itself.

Signed-off-by: Alex Pelavin <apelavin@nvidia.com>

* ci: pass the describe version to build commands through the environment

The version is git describe output, which a tag name controls. It was
interpolated with ${{ }} into the run script of six build steps, so a tag
containing shell syntax would have run in jobs that hold registry
credentials. Each step now reads it from an environment variable.

Signed-off-by: Alex Pelavin <apelavin@nvidia.com>

* ci: give component RC tags no version alias

A component RC tag still starts the agent and nvkectl publishers, and
they name the build by the bare v* describe. On a commit that already
carries a release tag that is the release's version, so the RC run would
move the release's alias to a new manifest. Only a bare v* tag now adds
the version alias; a component RC tag publishes sha-<commit> only.

Signed-off-by: Alex Pelavin <apelavin@nvidia.com>

* ci: resolve every publisher's version through one checked script

Every publisher resolves its version through
release/hack/describe-version.sh instead of calling git describe itself.
A bare v* tag run is published under its own tag; any other run under
the v* describe. Before anything is pushed, the script refuses:

- a describe that is not a v* release, RC or beta, its describe suffix,
  or a bare commit. The describe can name any v* tag on the commit, and
  agent/Makefile passes it to the shell inside -ldflags.
- on a v* tag run, a tag that is not a version or does not name the
  commit being built.
- on a component tag run, a commit a v* tag already names. Its describe
  is that tag, so a component RC there would republish that tag's
  .debs, images, charts and nvkectl.

Naming a tag run by its tag rather than the describe matters when the
commit carries several: git describe prefers the annotated release, and
of two lightweight betas the first by name. A beta re-run on a released
commit, or a second beta on one commit, now publishes under its own
version instead of another tag's.

release/hack/test_describe_version.py covers these cases against fixture
repositories, and runs with next-tag-test in the merge gate.

Signed-off-by: Alex Pelavin <apelavin@nvidia.com>

* ci: let only a release version into the apt index and GHCR

agent-deb-publish.yml chose whether to update index.json, and whether to
push the .debs to GHCR, from the ref: anything but a beta tag did both.
An agent/v* RC tag carries no -beta., but its packages are versioned by
the describe, so on a commit past a beta it made that build installable
from apt and pushed it to GHCR.

The build job now reports whether its version is a bare vX.Y.Z, and both
follow that instead. A release enters the index and GHCR; a beta, a
component RC and anything else is uploaded under releases/<version>/ and
pushed to NVCR only.

Signed-off-by: Alex Pelavin <apelavin@nvidia.com>

* ci: stamp the published version into standalone nvkectl builds

A dispatched cli-artifact, cli-artifact-nvcr or cli-s3-publish run with no
dist_artifact builds nvkectl itself. The build took its version from the
Makefile's own git describe, which on a commit with a beta and a signed
release names the release, while the run publishes under the beta it was
dispatched from. Pass the resolved version as NVKECTL_VERSION, as
tag-publish.yml already does, so the binary reports the version it is
published under.

Signed-off-by: Alex Pelavin <apelavin@nvidia.com>

* ci: skip a beta dispatch of the GHCR chart publisher

A beta's controller image is never promoted to GHCR, so a chart-publish.yml
run dispatched from a beta tag waited up to 30 minutes for an image that
would not appear, then failed. Skip beta refs, as the automatic beta trigger
already does.

Signed-off-by: Alex Pelavin <apelavin@nvidia.com>

* test: cover the triggering-tag check and a bare RC in describe-version.sh

Every invalid tag in the existing test was also the commit's describe, so
the describe check refused it before the check on the triggering tag ran,
and disabling that check left every test passing. Tag the bad names beside a
valid signed release, which wins the describe, so only the tag check can
refuse them.

Also pin that the helper names a bare RC run by its tag: the publishers'
tag filters, not the helper, keep an RC from publishing.

Signed-off-by: Alex Pelavin <apelavin@nvidia.com>

* ci: recover a vX.Y.Z agent package release by dispatch

A failed agent/vX.Y.Z publish could be recovered by dispatching Agent Deb
Publish from that tag with ref set to it. Releases are now vX.Y.Z, which the
ref check refused, and a SHA got past it only for every publish job to skip,
since their bare-tag arm requires a push.

Accept a vX.Y.Z ref when the run is dispatched from that same tag, and let
it into the apt intake, GHCR and NVCR jobs. The tag names the run's version,
so the index.json and GHCR gates still admit only a release. A beta is not
admitted, as before.

Signed-off-by: Alex Pelavin <apelavin@nvidia.com>

---------

Signed-off-by: Alex Pelavin <apelavin@nvidia.com>
2026-11-16 10:05:29 -06:00
..

Note: This component is being migrated from internal repositories. Script names, Makefile targets, and artifact paths will be finalized during migration. The information here reflects the intended state.

build

Scripts for building and publishing NVKE component artifacts — the CLI binary, nvke-agent image, Cloud Workflow Engine image, and node images — into an operator-controlled registry.

These scripts are the operator's entry point into the NKD build pipeline. They wrap the component-specific build tooling and produce the artifacts NVKE consumes.

Scripts

Script What it builds
cli.sh nvkectl binary (multi-arch)
node-agent.sh nvke-agent Debian package and container image
controller.sh Cloud Workflow Engine container image
node-image.sh Node OS image (QCOW2) from an NKD recipe

TODO: Build tooling format (Makefile, Bazel, shell scripts, or a combination) is not yet decided. Finalize during migration and document invocation syntax here.

Kubernetes packages

NVKE node images and pre-provisioned node setup require version-pinned Kubernetes Debian packages (kubeadm, kubelet, kubectl, containerd). These are assembled by the package builder, which produces a versioned apt repository operators can mirror into their own infrastructure.

Supported Kubernetes versions and their package collections are listed in pkg-builder/collections/.