The following plugin provides functionality available through Pipeline-compatible steps. Read more about how to integrate steps into your Pipeline in the Steps section of the Pipeline Syntax page.

For a list of other such plugins, see the Pipeline Steps Reference page.

Portainer

portainerHelm: Portainer Helm Deployment

Installs or upgrades a Helm chart through Portainer on a Kubernetes environment. Values from Git are shallow-cloned on a Jenkins agent (git on PATH); this step requires a workspace / node.

  • endpointId : String

    Portainer Kubernetes environment numeric ID.

  • releaseName : String

    Helm release name (DNS-1123 label, max 53).

  • chart : String

    Chart name within the repository (e.g. nginx).

  • repo : String

    Helm chart repository URL. Schemes: https://, http://, or oci:// (e.g. https://charts.example/helm, oci://registry.example/charts, https://gitlab.example/api/v4/projects/{id}/packages/helm/stable).

    Portainer fetches the chart (HTTP index or OCI). This step does not send registry credentials — configure private OCI access in Portainer (registries / namespace access). The host must be reachable from Portainer, not only from Jenkins.

    Do not put credentials in the URL (https://user:token@… / oci://user:token@… is rejected).

  • atomic : boolean (optional)

    When checked, pass atomic: true to Portainer Helm install (rollback on failure when supported).

  • ensureNamespace : boolean (optional)

    On by default. Creates the Namespace field via Portainer if it is missing, before install or upgrade. Existing namespaces are left unchanged. Requires cluster permission to create namespaces. Uncheck or set ensureNamespace: false to skip. Skipped when Validate only is checked.

  • forceReinstall : boolean (optional)

    When checked, uninstall the release (if present) then install.

    Destructive — prefer the default upgrade path (re-POST install) unless you need a clean reinstall.

  • namespace : String (optional)

    Kubernetes namespace for the release. Default: default.

  • portainerConnectionMode : String (optional)

    Inherit from System: This setting is made in the System tab of Manage Jenkins.

    Manual: set Portainer URL and Secret text Access token on this step.

  • portainerCredentialsId : String (optional)

    Secret text credential holding the Portainer Access token.

  • portainerUrl : String (optional)

    Portainer API base URL (e.g. https://portainer.example:9443).

  • validateOnly : boolean (optional)

    When checked, run connection resolve, Kubernetes preflight, and Values source checks (Manual YAML soft-parse; Repository URL/credentials/fetch), then log what would be installed — without Helm list, install, uninstall, or ensure-namespace. Build succeeds when checks pass.

  • values : String (optional)

    Inline Helm values YAML when Values source is Manual YAML. Build logs record length and a short hash only.

  • valuesFilePath : String (optional)

    Path to the values file relative to the repository root. Default values.yaml.

  • valuesGitCredentialsId : String (optional)

    Optional Username/Password or Secret text for private Git repositories used to fetch the values file. Credentials are passed via GIT_ASKPASS on the agent (not embedded in the clone URL).

  • valuesRepositoryReferenceName : String (optional)

    Git reference for the values repository. Default: refs/heads/main.

    Examples:

    • refs/heads/main
    • refs/tags/v1.2.0
    • refs/heads/${BRANCH_NAME}

    Jenkins maps heads/tags to a short name for shallow clone on the agent.

  • valuesRepositoryUrl : String (optional)

    In Repository mode: Git repository URL hosting the values file (not the chart repo).

    Do not put credentials in the URL (no user:pass@host). Use Git credentials for private repos.

    Example:

    https://gitlab.example/group/helm-values.git

  • valuesSource : String (optional)

    No source (default): omit values — chart defaults only.

    Repository: Jenkins shallow-clones the Git repo and reads the values file, then sends string values to Portainer (no Git values API).

    Manual YAML: paste values content; required when this mode is selected. Logs length and a short hash only.

  • verboseLogging : boolean (optional)

    When enabled, debug-level logs for HTTP requests will be duplicated in the build console.

  • version : String (optional)

    Optional chart version. Empty uses the repository default / latest as resolved by Portainer.

  • waitTimeoutSeconds : String (optional)

    Maximum seconds to wait after deploy until Kubernetes workloads are Ready (default 300). Always on — there is no opt-out flag.

    On timeout the build fails and may include a short pods hint. Secrets and values are never written to the log.

portainerManifest: Portainer Manifest Deployment

Applies a Kubernetes manifest through Portainer. Requires a Kubernetes Portainer environment. Namespace comes from the YAML (or Git file); the step does not send a Namespace field.

  • endpointId : String

    Portainer Kubernetes environment numeric ID.

  • stackName : String

    Optional Portainer Kubernetes stack name (lowercase alphanumeric, _ or -). Used only for Portainer bookkeeping and upsert-by-name; Kubernetes object names come from the manifest.

    When empty, the create body omits StackName.

  • gitCredentialsId : String (optional)

    Optional Username/Password or Secret text for private Git repositories.

  • manifestFilePath : String (optional)

    Path to the manifest YAML inside the repository (relative; default manifest.yaml).

  • portainerConnectionMode : String (optional)

    Inherit from System: This setting is made in the System tab of Manage Jenkins.

    Manual: set Portainer URL and Secret text Access token on this step.

  • portainerCredentialsId : String (optional)

    Secret text credential holding the Portainer Access token.

  • portainerUrl : String (optional)

    Portainer API base URL (e.g. https://portainer.example:9443).

  • repositoryReferenceName : String (optional)

    Git reference Portainer uses when cloning the manifest repository. Default: refs/heads/main.

    Examples:

    • refs/heads/main
    • refs/tags/v1.2.0
    • refs/heads/${BRANCH_NAME}
  • repositoryUrl : String (optional)

    Git repository URL (https://gitlab.example/…). No userinfo in the URL — use Git credentials.

  • stackFileContent : String (optional)
  • stackSource : String (optional)

    Repository: Portainer clones Git and applies the manifest file.

    Manual YAML: paste manifest content; updates use Portainer file-content API.

  • validateOnly : boolean (optional)

    When checked, run connection resolve, Kubernetes preflight, and Manual YAML checks, then log what would be applied — without create, stack update, or ensure-namespace.

    Build succeeds when checks pass.

  • verboseLogging : boolean (optional)

    When enabled, debug-level logs for HTTP requests will be duplicated in the build console.

  • waitTimeoutSeconds : String (optional)

    Maximum seconds to wait after apply until workloads are Ready (default 300). Always on.

    Manual YAML: polls Deployment / StatefulSet / DaemonSet / Job from the YAML. ConfigMap / Secret-only manifests skip the wait. Git source: polls Portainer applications for the stack.

    On timeout the build fails and may include a short pods hint.

portainerStack: Portainer Stack Deployment

Portainer Stack Deployment — deploy or update a Docker Compose or Swarm stack on a Portainer endpoint. Runs on the Jenkins controller (no agent workspace); Pipeline may call it outside node.

  • endpointId : String

    Portainer environment (endpoint) numeric ID.

  • stackType : String

    Stack types:

    • compose for Docker standalone Compose stacks;
    • swarm for Swarm stacks.
  • stackName : String

    Used on create and to locate the stack for redeploy.

    Must match Portainer naming rules: lowercase alphanumeric characters, _ or - (for example my-name or abc-123).

  • composeFilePath : String (optional)

    Path to the Compose file inside the Git repository (relative path ending in .yml or .yaml; no .. segments). Default: docker-compose.yml.

  • env : String (optional)

    Optional environment variables for the stack, one per line.

    • KEY=VALUE — literal or with ${VAR} from the build environment
    • KEY alone — same as KEY=${KEY} (copy from the build environment)

    Blank lines and lines starting with # are ignored.

    RABBITMQ_ERLANG_COOKIE
    RABBITMQ_DEFAULT_USER
    IMAGE_TAG=1.2.3

    If Vault overlay is configured (Inherit or Manual), Vault values win for the same keys. When Vault is Not connected, only these step variables are sent (unless Merge with existing stack env is enabled on update — then Portainer’s current Env is the base and step keys overlay it).

  • gitCredentialsId : String (optional)

    Optional. Username/Password or Secret text used by Portainer to clone a private repository.

  • mergeEnvWithExisting : boolean (optional)

    When updating an existing stack, load current Portainer Env[] and overlay this step’s environment variables (step wins on the same keys). Vault overlay, if any, still wins last.

    Default: disabled (step Env replaces Portainer Env). Enable to keep keys not listed in the step.

    Create (stack not found) never merges; there is no existing Env yet.

  • portainerConnectionMode : String (optional)

    Portainer connection types:

    • Inherit from System (default) — Manage Jenkins → System → Portainer
    • Manual (optional): set Portainer URL and API key credentials on this step.
  • portainerCredentialsId : String (optional)

    Secret text credentials with the Portainer Access token.

  • portainerUrl : String (optional)

    Manual Portainer API base URL. Example: https://portainer.example:9443.

    TLS uses the JDK truststore (no skip-SSL).

  • prune : boolean (optional)

    When checked, Portainer prunes services removed from the Compose file.

  • repositoryReferenceName : String (optional)

    Git reference Portainer uses when cloning the stack repository. Default: refs/heads/main.

    Examples:

    • refs/heads/main
    • refs/tags/v1.2.0
    • refs/heads/${BRANCH_NAME}
  • repositoryUrl : String (optional)

    Git repository URL hosting the YAML file.

    Do not put credentials in the URL (no user:pass@host). Use Git credentials for private repos.

    Example:

    https://gitlab.example/group/stack.git

  • repullImageAndRedeploy : boolean (optional)

    When checked, Portainer force-repulls images and redeploys the stack.

  • stackFileContent : String (optional)

    Inline Docker Compose / Swarm stack file content sent to Portainer as StackFileContent. Must be a YAML mapping with a non-empty services section.

    Do not put secrets in the YAML when you can use step env or Vault overlay instead. Build logs record only YAML length and a short content hash.

  • stackSource : String (optional)

    Stack source types:

    • Repository — Create the stack from Git if it does not exist on the endpoint; otherwise pull and redeploy the existing Git-backed stack.
    • Manual YAML — Create the stack from inline Compose/Swarm YAML if it does not exist on the endpoint; otherwise update and redeploy the existing file-based stack. Content is validated (YAML mapping with a non-empty services section) before Portainer is called. Git-backed stacks cannot be converted this way.
  • validateOnly : boolean (optional)

    When checked, run connection resolve, Portainer preflight, and Vault preflight (when Vault is connected), plus Manual YAML checks. Then log what would be deployed — without create, Git redeploy, file update, or Vault overlay. Build succeeds when checks pass.

  • vault (optional)

    Vault connection types:

    • Not connected (default): disable Vault. No Vault HTTP or Vault Plugin calls. Stack Env[] uses step env only.
    • Inherit from System: use the official HashiCorp Vault Plugin System configuration. Soft dependency — install the Vault Plugin for Inherit.
    • Manual: self-contained HTTP AppRole on this step (vaultUrl + Username/Password). Vault Plugin is not required.

    Path and KV mount are on Inherit/Manual only. Vault wins over step text env on key collisions.

      Nested Choice of Objects
    • vaultInherit
      • vaultMount : String (optional)

        KV secrets engine mount path.

        Default: secret.

        Must be a single segment. Combined with Vault path as /v1/{mount}/data/{path}.

      • vaultNamespace : String (optional)

        Vault Enterprise only. Sent as the X-Vault-Namespace header.

        Leave empty for Vault OSS, or for the Enterprise root namespace.

      • vaultPath : String (optional)

        Path within the KV v2 secrets engine mount.

        Example: myapp/prod with mount secret reads /v1/secret/data/myapp/prod (Manual) or Vault Plugin path secret/myapp/prod.

        Do not include a leading data/ segment.

      • vaultVersion : String (optional)

        Optional KV v2 secret version number. Leave empty to read the latest version.

        Applies to Manual Vault. Inherit (HashiCorp Vault Plugin) always reads the latest version.

    • vaultManual
      • vaultUrl : String

        Manual Vault base URL. Example: https://vault.example:8200.

        TLS uses the JDK truststore (no skip-SSL). Private CA certificates must be trusted by Jenkins.

      • vaultAppRoleCredentialsId : String

        Single Jenkins Username/Password credential for Manual Vault AppRole authentication — username = AppRole role_id, password = AppRole secret_id.

        Treat the username as a secret.

      • vaultMount : String (optional)

        KV secrets engine mount path.

        Default: secret.

        Must be a single segment. Combined with Vault path as /v1/{mount}/data/{path}.

      • vaultNamespace : String (optional)

        Vault Enterprise only. Sent as the X-Vault-Namespace header.

        Leave empty for Vault OSS, or for the Enterprise root namespace.

      • vaultPath : String (optional)

        Path within the KV v2 secrets engine mount.

        Example: myapp/prod with mount secret reads /v1/secret/data/myapp/prod (Manual) or Vault Plugin path secret/myapp/prod.

        Do not include a leading data/ segment.

      • vaultVersion : String (optional)

        Optional KV v2 secret version number. Leave empty to read the latest version.

        Applies to Manual Vault. Inherit (HashiCorp Vault Plugin) always reads the latest version.

    • vaultNone
    • verboseLogging : boolean (optional)

      When checked, mirror HTTP method/path and timing detail to the build console. By default that detail is only available via a Jenkins Log Recorder at FINE for this plugin.

    portainerStackConfig: Portainer Stack Config

    Creates Docker Swarm configs on a Portainer Swarm environment from files in a Git folder. Docker Swarm only. Each config is named {filename}-{hash} from the file bytes. If that name already exists, the step skips it. Shallow-clones on a Jenkins agent (git on PATH); this step requires a workspace / node.

    Run this step before Portainer Stack Deployment. The step sets build environment variables from file names (uppercase, -_, no extension): rabbitmq-config.jsonRABBITMQ_CONFIG (value = Docker config name on Swarm). In the Stack step env field use RABBITMQ_CONFIG=${RABBITMQ_CONFIG}. In compose: name: ${RABBITMQ_CONFIG} with external: true.

    • endpointId : String

      Portainer environment ID for the Docker Swarm cluster (same as for Portainer Stack Deployment with stackType: swarm).

    • configPath : String (optional)

      Directory in the repository containing config files, e.g. configs/swarm. Relative to the repo root.

    • fileGlob : String (optional)

      Which files under Config path become Docker configs. Ant glob, relative to that folder (not the repo root).

      Examples:

      **/*        all files in that folder and subfolders (default)
      *.json      only .json files in that folder (not subfolders)
      **/*.conf   all .conf files, including subfolders

      Folders themselves are not uploaded. Files whose names start with a dot (for example .gitignore) are skipped.

    • gitCredentialsId : String (optional)
    • namingStrategy : String (optional)
    • portainerConnectionMode : String (optional)

      Portainer connection types:

      • Inherit from System (default) — Manage Jenkins → System → Portainer
      • Manual (optional): set Portainer URL and API key credentials on this step.
    • portainerCredentialsId : String (optional)
    • portainerUrl : String (optional)
    • pruneOld : boolean (optional)

      After all configs are ensured, delete older configs on the same Swarm that share the jenkins.portainer.config/base label but a different content-hash name. Deletion failures are logged as warnings.

    • repositoryReferenceName : String (optional)

      Git reference Portainer uses when cloning the repository. Default: refs/heads/main.

      Examples:

      • refs/heads/main
      • refs/tags/v1.2.0
      • refs/heads/${BRANCH_NAME}
    • repositoryUrl : String (optional)

      Git repository URL (http/https). No credentials in the URL — use Git credentials for private repos.

    • validateOnly : boolean (optional)

      When checked, preflight and Git read run; the build log shows planned config names and env keys without creating or deleting Docker configs.

    • verboseLogging : boolean (optional)

    portainerStackSecret: Portainer Stack Secret

    Creates Docker Swarm secrets from selected HashiCorp Vault KV v2 keys. The secret is created with a name pattern of {key}-{hash} of the value bytes.

    Statuses:

    • created — the secret has been created.
    • skipped — the secret already exists, skipping the step.

    Secret values are never written to the build log.

    The step sets build environment variables (uppercase, -_):

    • rabbitmq-signing-keyRABBITMQ_SIGNING_KEY
    • rabbitmq_default_userRABBITMQ_DEFAULT_USER

    Use these variables later in the Portainer Stack Deployment step.

    • endpointId : String

      Portainer environment ID for the Docker Swarm cluster.

    • portainerConnectionMode : String (optional)

      Portainer connection types:

      • Inherit from System (default) — Manage Jenkins → System → Portainer
      • Manual (optional): set Portainer URL and API key credentials on this step.
    • portainerCredentialsId : String (optional)
    • portainerUrl : String (optional)
    • pruneOld : boolean (optional)

      After secrets are ensured, delete older secrets with the same jenkins.portainer.secret/base label but a different hash name.

      Failures (secret still in use) are logged; the step does not fail.

    • secretKeys : String (optional)

      The names of the Vault KV v2 keys to copy. Enter one per line.

      rabbitmq-erlang-cookie
      rabbitmq_default_user
      RABBITMQ_DEFAULT_PASS

      Listed keys must exist at the path; the key set at the path must match this list. Lines starting with # are skipped. Values are never logged.

    • validateOnly : boolean (optional)

      When checked, Portainer preflight, Vault preflight, and Vault read run; planned secret names are logged without creating or deleting Docker secrets. Values are not logged.

    • vault (optional)

      Inherit uses the HashiCorp Vault Plugin System configuration. Manual uses AppRole on this step (vaultUrl + Username/Password). Not connected is not available — secrets require Vault.

        Nested Choice of Objects
      • vaultInherit
        • vaultMount : String (optional)

          KV secrets engine mount path.

          Default: secret.

          Must be a single segment. Combined with Vault path as /v1/{mount}/data/{path}.

        • vaultNamespace : String (optional)

          Vault Enterprise only. Sent as the X-Vault-Namespace header.

          Leave empty for Vault OSS, or for the Enterprise root namespace.

        • vaultPath : String (optional)

          Path within the KV v2 secrets engine mount.

          Example: myapp/prod with mount secret reads /v1/secret/data/myapp/prod (Manual) or Vault Plugin path secret/myapp/prod.

          Do not include a leading data/ segment.

        • vaultVersion : String (optional)

          Optional KV v2 secret version number. Leave empty to read the latest version.

          Applies to Manual Vault. Inherit (HashiCorp Vault Plugin) always reads the latest version.

      • vaultManual
        • vaultUrl : String

          Manual Vault base URL. Example: https://vault.example:8200.

          TLS uses the JDK truststore (no skip-SSL). Private CA certificates must be trusted by Jenkins.

        • vaultAppRoleCredentialsId : String

          Single Jenkins Username/Password credential for Manual Vault AppRole authentication — username = AppRole role_id, password = AppRole secret_id.

          Treat the username as a secret.

        • vaultMount : String (optional)

          KV secrets engine mount path.

          Default: secret.

          Must be a single segment. Combined with Vault path as /v1/{mount}/data/{path}.

        • vaultNamespace : String (optional)

          Vault Enterprise only. Sent as the X-Vault-Namespace header.

          Leave empty for Vault OSS, or for the Enterprise root namespace.

        • vaultPath : String (optional)

          Path within the KV v2 secrets engine mount.

          Example: myapp/prod with mount secret reads /v1/secret/data/myapp/prod (Manual) or Vault Plugin path secret/myapp/prod.

          Do not include a leading data/ segment.

        • vaultVersion : String (optional)

          Optional KV v2 secret version number. Leave empty to read the latest version.

          Applies to Manual Vault. Inherit (HashiCorp Vault Plugin) always reads the latest version.

      • vaultNone
      • verboseLogging : boolean (optional)

      Was this page helpful?

      Please submit your feedback about this page through this quick form.

      Alternatively, if you don't wish to complete the quick form, you can simply indicate if you found this page helpful?

          


      See existing feedback here.