{
  "name": "run-shell-tests",
  "title": "Run a test command",
  "category": "CI/CD",
  "tags": [
    "ci-cd",
    "node"
  ],
  "version": "1.0.2",
  "date": "2026-09-12",
  "notes": "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.",
  "latest": true,
  "installable": true,
  "url": "https://catalog.dagweave.com/api/v1/items/run-shell-tests/1.0.2.json",
  "templateUrl": "https://catalog.dagweave.com/api/v1/items/run-shell-tests/1.0.2/template.yaml",
  "entrypoint": "test",
  "parameters": [
    {
      "name": "test-command",
      "title": "Test command",
      "description": "The test command to run. Runs on Node 24 (node:24-alpine).",
      "type": "string",
      "required": true,
      "example": "npm ci \u0026\u0026 npm test"
    },
    {
      "name": "work-dir",
      "title": "Working directory",
      "description": "Directory to run the test command in (the checked-out repo root).",
      "type": "string",
      "required": false,
      "default": "."
    }
  ],
  "images": [
    {
      "ref": "node@sha256:c6ad9e9c1d80f6eb607c26b4b0a132ff7a2344fad1c78ea3baa2a7d4c8de6d94",
      "repository": "node",
      "digest": "sha256:c6ad9e9c1d80f6eb607c26b4b0a132ff7a2344fad1c78ea3baa2a7d4c8de6d94"
    }
  ],
  "install": {
    "kubectl": "kubectl apply -n argo -f https://catalog.dagweave.com/api/v1/items/run-shell-tests/1.0.2/template.yaml",
    "argo": "argo template create -n argo https://catalog.dagweave.com/api/v1/items/run-shell-tests/1.0.2/template.yaml"
  },
  "template": "apiVersion: argoproj.io/v1alpha1\nkind: WorkflowTemplate\nmetadata:\n  name: run-shell-tests\n  labels:\n    dagweave.io/catalog-item: run-shell-tests\n  annotations:\n    # The catalog semver this manifest was authored at. The dagweave app records\n    # (catalog-item-id, semver) -\u003e content-hash -\u003e base-vN when it mints the tenant\n    # cluster name via ResolveOrMint. Keep in sync with metadata.yaml `version`.\n    dagweave.io/catalog-version: \"1.0.2\"\n    dagweave.io/catalog-category: \"CI/CD\"\nspec:\n  entrypoint: test\n  templates:\n    - name: test\n      inputs:\n        parameters:\n          # Directory to run the test command in (the checked-out repo root).\n          - name: work-dir\n            default: \".\"\n          # The test command to run, e.g. \"npm ci \u0026\u0026 npm test\". Runs on Node 24\n          # (node:24-alpine); swap the image for a different toolchain if needed.\n          - name: test-command\n      container:\n        # Pinned by digest per the catalog convention: an image rebuild can never\n        # silently change the behaviour of an already-released item version.\n        # node:26-alpine — a generic toolchain image; the item stays language-agnostic\n        # by taking the test command verbatim.\n        image: node@sha256:c6ad9e9c1d80f6eb607c26b4b0a132ff7a2344fad1c78ea3baa2a7d4c8de6d94\n        command: [sh, -c]\n        # The work-dir and test-command are passed as env vars (below), never\n        # interpolated from Argo into the shell, so they carry no injection risk. The\n        # test command is *meant* to be executed as a shell command — that is the point\n        # of this item — so it is run via `sh -c \"$TEST_COMMAND\"` after cd'ing in.\n        args:\n          - |\n            set -eu\n            cd \"$WORK_DIR\"\n            sh -c \"$TEST_COMMAND\"\n        env:\n          - name: WORK_DIR\n            value: \"{{inputs.parameters.work-dir}}\"\n          - name: TEST_COMMAND\n            value: \"{{inputs.parameters.test-command}}\"\n",
  "templateSha256": "c347bf364f72a9f09c754b37414feb2fdadb0058685b07ccd12868eed9535755",
  "source": "https://github.com/dagweave/catalog/tree/67458f74dbbf913b03177f3cefc69424be85eb1d/catalog/run-shell-tests",
  "catalogSha": "67458f74dbbf913b03177f3cefc69424be85eb1d"
}
