Dagweave catalog

Run a test command

run-shell-testsv1.0.2updated 2026-09-123 versions

Run a test command in a working directory on a generic Node 24 image. Swap the image for a different toolchain.

Install v1.0.2

Installs the template into your Argo namespace. The URL is pinned to this version.

kubectl apply -n argo -f https://catalog.dagweave.com/api/v1/items/run-shell-tests/1.0.2/template.yaml

Or with the Argo CLI:

argo template create -n argo https://catalog.dagweave.com/api/v1/items/run-shell-tests/1.0.2/template.yaml

Facts

Category
CI/CD
Tags
ci-cd node
Entrypoint
test
Template SHA-256
c347bf364f72a9f09c754b37414feb2fdadb0058685b07ccd12868eed9535755
Source
run-shell-tests at catalog commit 67458f7
API
item document, latest template.yaml

Images and provenance

Every image is pinned by digest, so a rebuilt tag can never change what this version runs.

RepositoryTagDigest
nodenone recordedsha256:c6ad9e9c1d80f6eb607c26b4b0a132ff7a2344fad1c78ea3baa2a7d4c8de6d94

Parameters

NameDescriptionDefault
test-command required The test command to run. Runs on Node 24 (node:24-alpine).
Example npm ci && npm test
none
work-dir Directory to run the test command in (the checked-out repo root). .

WorkflowTemplate

Download template.yaml

apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
  name: run-shell-tests
  labels:
    dagweave.io/catalog-item: run-shell-tests
  annotations:
    # The catalog semver this manifest was authored at. The dagweave app records
    # (catalog-item-id, semver) -> content-hash -> base-vN when it mints the tenant
    # cluster name via ResolveOrMint. Keep in sync with metadata.yaml `version`.
    dagweave.io/catalog-version: "1.0.2"
    dagweave.io/catalog-category: "CI/CD"
spec:
  entrypoint: test
  templates:
    - name: test
      inputs:
        parameters:
          # Directory to run the test command in (the checked-out repo root).
          - name: work-dir
            default: "."
          # The test command to run, e.g. "npm ci && npm test". Runs on Node 24
          # (node:24-alpine); swap the image for a different toolchain if needed.
          - name: test-command
      container:
        # Pinned by digest per the catalog convention: an image rebuild can never
        # silently change the behaviour of an already-released item version.
        # node:26-alpine — a generic toolchain image; the item stays language-agnostic
        # by taking the test command verbatim.
        image: node@sha256:c6ad9e9c1d80f6eb607c26b4b0a132ff7a2344fad1c78ea3baa2a7d4c8de6d94
        command: [sh, -c]
        # The work-dir and test-command are passed as env vars (below), never
        # interpolated from Argo into the shell, so they carry no injection risk. The
        # test command is *meant* to be executed as a shell command — that is the point
        # of this item — so it is run via `sh -c "$TEST_COMMAND"` after cd'ing in.
        args:
          - |
            set -eu
            cd "$WORK_DIR"
            sh -c "$TEST_COMMAND"
        env:
          - name: WORK_DIR
            value: "{{inputs.parameters.work-dir}}"
          - name: TEST_COMMAND
            value: "{{inputs.parameters.test-command}}"

Version history

Read from the item's changelog. Each version has its own JSON document; the pinned catalogue vendors the manifest of the latest one, so that is the version that installs.

  1. 1.0.2 latest 2026-09-12

    Repin node:24-alpine to the digest the tag now points at. The old pin had fallen behind its tag, which the CVE gate reads as an OS record whose reason is spent. The new bytes carry the same openssl advisory and the same four npm advisories as the old ones, so a test command sees the same Node 24.

    kubectl apply -n argo -f https://catalog.dagweave.com/api/v1/items/run-shell-tests/1.0.2/template.yaml
    argo template create -n argo https://catalog.dagweave.com/api/v1/items/run-shell-tests/1.0.2/template.yaml

    version document, template.yaml

  2. 1.0.1 2026-08-02

    Move node from 20-alpine to 24-alpine. Fixable CRITICAL/HIGH drops from 18 to 5. This crosses majors: Node 20 left maintenance and no 20.x rebuild carries the fixes, so a test command that relies on Node 20 behaviour needs rechecking.

    This release is documented, but its manifest is not vendored here, so it has no install command. Version document

  3. 1.0.0 2026-07-17

    Initial release.

    This release is documented, but its manifest is not vendored here, so it has no install command. Version document

Run it once

After installing, from the command line.

argo submit -n argo --from workflowtemplate/run-shell-tests \
  -p test-command='npm ci && npm test'

Workflow that references it

A Workflow with the required parameters filled from the examples.

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: run-shell-tests-
spec:
  workflowTemplateRef:
    name: run-shell-tests
  arguments:
    parameters:
      - name: test-command
        value: "npm ci \u0026\u0026 npm test"

As a step of a larger workflow

steps:
  - - name: run-shell-tests
      templateRef:
        name: run-shell-tests
        template: test