# devops-packaging-job > Scaffold job packaging configuration. Keywords: packaging, job, devops, scaffolding. - Author: willyu1007 - Repository: willyu1007/AI_First_Template - Version: 20251224182030 - Stars: 0 - Forks: 0 - Last Updated: 2026-02-07 - Source: https://github.com/willyu1007/AI_First_Template - Web: https://mule.run/skillshub/@@willyu1007/AI_First_Template~devops-packaging-job:20251224182030 --- --- name: devops-packaging-job description: "Scaffold job packaging configuration. Keywords: packaging, job, devops, scaffolding." --- # Scaffold: Job Packaging This document is an entrypoint for job packaging scaffolding. The step-by-step flow is in /.system/skills/ssot/repo/scaffolding/devops-packaging-job/SKILL.md. --- ## 1. Purpose & Scope **Purpose**: Generate packaging skeleton for deploying a module as a batch job (cron job, scheduled task, one-off execution). **Scope**: - Creates job packaging configuration files - Sets up Dockerfile template optimized for batch execution - Configures job scripts - Records packaging decisions in workdocs **Out of scope**: - Actual Docker image building - Job scheduler configuration (Kubernetes CronJob, etc.) - HTTP service packaging (see devops_packaging_service.md) - Deployment (see devops_deploy_job.md) --- ## 2. Inputs & Preconditions ### Required Inputs | Parameter | Type | Description | |-----------|------|-------------| | `job_name` | string | Job identifier (used in image tags) | | `module_id` | string | Source module being packaged | | `entrypoint` | string | Job entrypoint script or command | ### Optional Inputs | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | `base_image` | string | `python:3.11-slim` | Docker base image | | `schedule` | string | "" | Cron schedule expression (informational) | | `timeout` | string | `1h` | Job timeout | | `retry_policy` | object | {} | Retry configuration | | `registry` | string | "" | Container registry URL | ### Preconditions 1. Target module exists in `/modules//` 2. Module has a runnable job entrypoint 3. `/ops/packaging/` directory exists 4. Human has container registry credentials (if pushing images) --- ## 3. Step-by-Step Flow (AI + Human) See /.system/skills/ssot/repo/scaffolding/devops-packaging-job/SKILL.md. --- ## 4. Tools & Scripts | Tool | Purpose | |------|---------| | `scripts/devops/scaffold/devops_packaging_job.py` | Orchestrator script | | `/ops/packaging/scripts/build.sh` | Generated build script | --- ## 5. Outputs & Side Effects ### Files Created ``` ops/packaging/jobs// Dockerfile # Docker build configuration run.sh # Job run script config.yaml # Job configuration README.md # Human-facing documentation ``` ### Dockerfile Template ```dockerfile # Auto-generated by devops_packaging_job scaffold FROM python:3.11-slim WORKDIR /app # Install dependencies COPY modules//requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy application code COPY modules//src/ ./src/ # Job entrypoint ENTRYPOINT ["python", "-m", ""] ``` ### Configuration File ```yaml job_name: module_id: entrypoint: base_image: python:3.11-slim schedule: "" # e.g., "0 2 * * *" for daily at 2am timeout: 1h retry_policy: max_retries: 3 backoff: exponential registry: "" ``` --- ## 6. Safety & Rollback ### Safety Measures - `--dry-run` always available for preview - Human approval required before execution - No actual Docker builds during scaffold - Credentials not stored in generated files ### Rollback Procedure If scaffold fails or needs reverting: 1. Delete the packaging directory: ```bash rm -rf ops/packaging/jobs// ``` --- ## 7. Next Steps After Scaffolding 1. Review and customize generated Dockerfile 2. Build image locally: ```bash cd ops/packaging/jobs/ docker build -t :latest . ``` 3. Test job locally: ```bash docker run --rm :latest ``` 4. Push to registry (requires credentials): ```bash docker push /:latest ``` 5. Configure deployment/scheduling (see `/.system/skills/ssot/repo/scaffolding/devops-deploy-job/SKILL.md`) --- ## 8. Related Documents - `/.system/skills/ssot/repo/scaffolding/devops-packaging-job/templates/packaging_template.md` - Packaging knowledge template - `/.system/skills/ssot/repo/scaffolding/devops-packaging-service/SKILL.md` - Service packaging scaffold - `/.system/skills/ssot/repo/scaffolding/devops-deploy-job/SKILL.md` - Job deployment scaffold - `/ops/packaging/AGENTS.md` - Packaging strategy