Dagweave catalog

Publish a build artifact

publish-artifactv1.0.1updated 2026-08-022 versions

Upload a build artifact to an artifact registry with an HTTP PUT via curl, using credentials read from a Kubernetes Secret.

Install v1.0.1

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/publish-artifact/1.0.1/template.yaml

Or with the Argo CLI:

argo template create -n argo https://catalog.dagweave.com/api/v1/items/publish-artifact/1.0.1/template.yaml

Facts

Category
CI/CD
Tags
ci-cd curl
Entrypoint
publish
Template SHA-256
a1e32bb1582ba652c0815fcfc51de4d73ed672acb4837833001120ef6d44aee3
Source
publish-artifact 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
curlimages/curl8.23.0sha256:3fb7e13e5d179a845c97d78204f3f1064d1907037f26a3ebf91710571151fd93

Parameters

NameDescriptionDefault
file-path required Path to the file to upload (in the run's filesystem / mounted volume).
Example /workspace/dist/app-1.2.3.tgz
none
registry-url required Destination URL to PUT the artifact to.
Example https://artifacts.internal/repo/app-1.2.3.tgz
none
credentials-secret-key Key within the Secret that holds the credentials. credentials
credentials-secret-name Name of the Kubernetes Secret holding the registry credentials, formatted as "user:password". artifact-registry-credentials

WorkflowTemplate

Download template.yaml

apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
  name: publish-artifact
  labels:
    dagweave.io/catalog-item: publish-artifact
  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.1"
    dagweave.io/catalog-category: "CI/CD"
spec:
  entrypoint: publish
  templates:
    - name: publish
      inputs:
        parameters:
          # Path to the file to upload (in the run's filesystem / mounted volume).
          - name: file-path
          # Destination URL to PUT the artifact to.
          - name: registry-url
          # Name of the Kubernetes Secret holding the registry credentials, formatted
          # as "user:password" for HTTP basic auth. Defaults let a user leave them
          # blank in the Inspector.
          - name: credentials-secret-name
            default: artifact-registry-credentials
          - name: credentials-secret-key
            default: credentials
      container:
        # Pinned by digest per the catalog convention: an image rebuild can never
        # silently change the behaviour of an already-released item version.
        # curlimages/curl:8.23.0
        image: curlimages/curl@sha256:3fb7e13e5d179a845c97d78204f3f1064d1907037f26a3ebf91710571151fd93
        command: [sh, -c]
        # The file path, URL and credentials are passed as env vars (below), never
        # interpolated from Argo into the shell, so values with quotes or shell
        # metacharacters are safe. -sSf makes a non-2xx response fail the step.
        args:
          - |
            set -eu
            curl -sSf -u "$CREDENTIALS" --upload-file "$FILE_PATH" "$REGISTRY_URL"
        env:
          - name: FILE_PATH
            value: "{{inputs.parameters.file-path}}"
          - name: REGISTRY_URL
            value: "{{inputs.parameters.registry-url}}"
          - name: CREDENTIALS
            valueFrom:
              secretKeyRef:
                name: "{{inputs.parameters.credentials-secret-name}}"
                key: "{{inputs.parameters.credentials-secret-key}}"

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.1 latest 2026-08-02

    Move curlimages/curl from 8.11.1 to 8.21.0. Fixable CRITICAL/HIGH drops from 26 to 1.

    kubectl apply -n argo -f https://catalog.dagweave.com/api/v1/items/publish-artifact/1.0.1/template.yaml
    argo template create -n argo https://catalog.dagweave.com/api/v1/items/publish-artifact/1.0.1/template.yaml

    version document, template.yaml

  2. 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/publish-artifact \
  -p file-path=/workspace/dist/app-1.2.3.tgz \
  -p registry-url=https://artifacts.internal/repo/app-1.2.3.tgz

Workflow that references it

A Workflow with the required parameters filled from the examples.

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: publish-artifact-
spec:
  workflowTemplateRef:
    name: publish-artifact
  arguments:
    parameters:
      - name: file-path
        value: "/workspace/dist/app-1.2.3.tgz"
      - name: registry-url
        value: "https://artifacts.internal/repo/app-1.2.3.tgz"

As a step of a larger workflow

steps:
  - - name: publish-artifact
      templateRef:
        name: publish-artifact
        template: publish