Overview
This walkthrough helps you understand how simple shell-driven Freestyle jobs compare to scripted Pipelines, which is useful when planning migrations (for example, to GitHub Actions).
Generate ASCII Artwork (Freestyle)
This Freestyle job calls the adviceslip API to fetch an advice message, validates the message length usingjq and shell tests, and—if the message is long enough—renders it as ASCII art using the cowsay utility.

- No Source Code Management (job is configured without SCM).
- No automated triggers.
- Single build step: Execute shell, which performs three logical phases: build, test, deploy.

- Build: fetch an advice message from adviceslip API and save it to
advice.json. - Test: extract message with
jqand assert it contains more than 5 words; otherwise exit non‑zero to mark the build as failed. - Deploy: install and run
cowsay(Debian/Ubuntu example) and pipe the advice into a randomly-selected cowfile.
The script assumes
jq and cowsay are available or can be installed with sudo. Installing packages on shared agents can have security and stability implications—prefer pre-baked agent images or containerized runners when possible.- How simple shell logic can control build success/failure.
- How external APIs and small utility tools (
jq,cowsay) are often used in quick demo jobs. - Why migrating these jobs may require translating shell steps into equivalent workflow actions or containerized steps.
Scripted Pipeline
Next, inspect a scripted Pipeline job that contains a small hardcoded pipeline script in the Jenkins job configuration (again, no SCM and no triggers). The pipeline shows a simple three-stage flow: Greet, Build, and Results. The pipeline activity page with recent runs:
sleep, and Results prints the completion time.

- The console shows the greeting, a simulated build pause (5 seconds), and the completion timestamp.
- The stage view makes it easy to visualize progress and success/failure per stage.
Next steps and migration considerations
- Later lessons will cover how to migrate these Jenkins jobs (Freestyle and scripted Pipeline) to GitHub Actions and how to express the same logic in workflow files.
- When planning migration, consider:
- Translating shell-driven Freestyle steps to individual CI actions or container steps.
- Replacing inline package installs with prebuilt images or setup actions to avoid privileged operations on runners.
- Converting scripted Pipeline stages into YAML-based workflows and grouping steps into reusable actions.