Tools
Tools: Jenkins Runs Commands For Me
2026-02-06
0 views
admin
🛠 Task Rules (IMPORTANT) ## 🧩 Step 1: Create Freestyle Job ## 🧩 Step 2: Add Shell Build Step ## ✍️ Step 3: Write This Script (Line by Line) ## Line 1 ## Line 2 ## Line 3 ## Line 4 ## Line 5 ## Line 6 ## Line 7 ## ▶️ Step 4: Run the Job ## ✅ What Should See ## 🧠 DevOps Concepts They Just Learned ## Ask them: ## ❌ Result Open Jenkins: http://localhost:9090 “What do you think will happen?” “Jenkins is stupid but honest. If a command fails, Jenkins stops everything.” Templates let you quickly answer FAQs or store snippets for re-use. Are you sure you want to ? It will become hidden in your post, but will still be visible via the comment's permalink. as well , this person and/or CODE_BLOCK: devops-first-script CODE_BLOCK: devops-first-script CODE_BLOCK: devops-first-script CODE_BLOCK: echo "Hello from Jenkins" CODE_BLOCK: echo "Hello from Jenkins" CODE_BLOCK: echo "Hello from Jenkins" CODE_BLOCK: whoami CODE_BLOCK: pwd CODE_BLOCK: ls COMMAND_BLOCK: echo "This file was created by Jenkins" > jenkins.txt COMMAND_BLOCK: echo "This file was created by Jenkins" > jenkins.txt COMMAND_BLOCK: echo "This file was created by Jenkins" > jenkins.txt CODE_BLOCK: cat jenkins.txt CODE_BLOCK: cat jenkins.txt CODE_BLOCK: cat jenkins.txt CODE_BLOCK: echo "Script completed successfully" CODE_BLOCK: echo "Script completed successfully" CODE_BLOCK: echo "Script completed successfully" CODE_BLOCK: exit 1 - Engineer runs commands manually - Forgets steps - Makes mistakes - Cannot repeat reliably - Commands are written once - Jenkins runs them the same way every time - Anyone can click Build Now - ❌ No copy–paste - ✅ Students type each line - ✅ After each line, explain why it exists - Open Jenkins: http://localhost:9090 - Click New Item - Select Freestyle project - Scroll to Build - Click Add build step - Choose Execute shell - echo prints text - Proves Jenkins can execute commands - First validation Jenkins is working - Shows which user Jenkins runs as - Important for permissions (DevOps reality) - Explains why some commands fail later - Shows where Jenkins runs - Introduces the concept of workspace - Jenkins does NOT run in your home folder - Lists files in workspace - Shows workspace starts empty - Important before cloning repos later - Jenkins creates files just like a human - Demonstrates automation creates artifacts - > redirects output into a file - Confirms file exists - Verifies Jenkins work visually - Basic troubleshooting skill - Clear log message - Professional habit in CI/CD - Helps debugging later - Click Build Now - Open Console Output - Text printed - Jenkins workspace path - File created - File content displayed - Build turns RED - Jenkins stops - No further steps run - exit 1 = failure - Jenkins trusts exit codes - This is how bad code blocks deployments
toolsutilitiessecurity toolsjenkinscommandsimportantcreatefreestyle