CICD

Jenkins Playground

Jenkins LTS with JDK 21 — the leading open-source automation server for building, testing, and deploying pipelines..

Get access to the Jenkins playground with one click

Welcome to the Jenkins Playground!

Jenkins LTS on JDK 21 — the world’s most widely-deployed CI/CD automation server. Practice pipeline syntax, Groovy scripting, and the Jenkins CLI.

What’s Pre-installed

  • Jenkins LTS (latest LTS, starts in background automatically)
  • JDK 21 (Eclipse Temurin)
  • Shell: bash (running as jenkins user)

Quick Start

# Jenkins starts in background (~60s). Monitor progress:
tail -f /tmp/jenkins.log

# Once started, get the admin password:
cat /var/jenkins_home/secrets/initialAdminPassword

# Test the REST API
curl -s http://localhost:8080/api/json | python3 -m json.tool | head -20

Common Workflows

# Download jenkins-cli
curl -sO http://localhost:8080/jnlpJars/jenkins-cli.jar

# List CLI commands
java -jar jenkins-cli.jar -s http://localhost:8080 help

# Create a pipeline job via XML
java -jar jenkins-cli.jar \
  -s http://localhost:8080 \
  -auth admin:$(cat /var/jenkins_home/secrets/initialAdminPassword) \
  create-job mypipeline < pipeline.xml

# List installed plugins
java -jar jenkins-cli.jar -s http://localhost:8080 list-plugins

Advanced Tips

# Write a Jenkinsfile
cat > Jenkinsfile <<'EOF'
pipeline {
  agent any
  stages {
    stage('Build') { steps { echo 'Building...' } }
    stage('Test')  { steps { echo 'Testing...'  } }
    stage('Deploy') { steps { echo 'Deploying...' } }
  }
}
EOF

# Groovy scripting (Jenkins uses Groovy DSL)
groovysh <<'EOF'
def items = [1,2,3]
items.each { println "Item: ${it}" }
EOF

Session Notes

  • Session lasts 1 hour.
  • Jenkins web UI at localhost:8080 is accessible via curl only (no browser tab in this playground).
  • Running as the jenkins user; home directory is /var/jenkins_home.