Skip to content

HOWTO: Run the Packer Image Pipeline via Jenkins

Purpose: Wire the Packer template build into a Jenkins pipeline with Vault credential injection and structured run record capture.

Difficulty: Intermediate

Track: Platform Foundations


Overview

Running the Packer template build through Jenkins converts a manual command into a governed module run: credentials are injected from Vault, pipeline variables map directly to module inputs, and the run record is captured and archived alongside the image records. Downstream VM provisioning modules receive the registered template reference from the pipeline output, closing the traceability chain from base image to deployed VM.


1. Pipeline Definition

  • Jenkinsfile structure for the core/onprem/template-image module run.
  • Parameter definition: template version, Proxmox node, cloud image URL.

2. Credential Injection from Vault

  • Jenkins Vault plugin configuration.
  • Credential binding for Proxmox API token and cloud image checksum key.

3. Pipeline Execution

  • Trigger the build and monitor Packer output in the Jenkins console.
  • Confirm template registration in Proxmox on successful completion.

4. Run Record and Artefact Handoff

  • Run record written to the configured records store.
  • Template reference available as a pipeline output for downstream provisioning jobs.

References


License: MIT-0 for code, CC-BY-4.0 for documentation unless otherwise stated.