Browse Source

Update 02_05

02_06
Michael Jenkins 4 years ago
parent
commit
9d15431b0f
3 changed files with 26 additions and 9 deletions
  1. +12
    -3
      02_05.md
  2. +7
    -3
      MAC_LINUX_DOCKER.md
  3. +7
    -3
      WINDOWS.md

02_01.md → 02_05.md View File

@ -1,5 +1,5 @@
# Learning Jenkins, 02-01: Your First Jenkins Job
In this lesson you create your first job.
# Learning Jenkins, 02-05: Run and Monitor Jobs
In this lesson you will monitor a job that runs long enough for you to interact with the console output in real time.
Use the console to create a freestyle job with one build step. Use the console to create a freestyle job with one build step.
@ -9,6 +9,11 @@ If you are running Jenkins on a Windows system:
1. Select the `Execute Windows batch command` build step 1. Select the `Execute Windows batch command` build step
2. Enter the following for the command: 2. Enter the following for the command:
``` ```
@echo off
for /L %%i in (1,1,30) do (
@echo %%i
@ping localhost -n 2 >NUL
)
``` ```
[Follow this link for more details on Windows](WINDOWS.md) [Follow this link for more details on Windows](WINDOWS.md)
@ -19,7 +24,11 @@ If you are running Jenkins on MacOS, Linux, or Docker:
1. Select the `Execute shell` build step. 1. Select the `Execute shell` build step.
2. Enter the following for the command: 2. Enter the following for the command:
``` ```
echo "Hello, Jenkins"
#!/bin/bash
for i in {1..30}; do
echo $i;
sleep 1;
done
``` ```
[Follow this link for more details on MacOS, Linux, and Docker](MAC_LINUX_DOCKER.md) [Follow this link for more details on MacOS, Linux, and Docker](MAC_LINUX_DOCKER.md)

+ 7
- 3
MAC_LINUX_DOCKER.md View File

@ -1,4 +1,4 @@
# Learning Jenkins, 02-01: Your First Jenkins Job
# Learning Jenkins, 02-05: Run and Monitor Jobs
In this lesson you create your first job. In this lesson you create your first job.
Use the console to create a freestyle job with one build step. Use the console to create a freestyle job with one build step.
@ -9,10 +9,14 @@ If you are running Jenkins on MacOS, Linux, or Docker:
1. Select the `Execute shell` build step. 1. Select the `Execute shell` build step.
2. Enter the following for the command: 2. Enter the following for the command:
``` ```
echo "Hello, Jenkins"
#!/bin/bash
for i in {1..30}; do
echo $i;
sleep 1;
done
``` ```
# Getting an Error in the First Job
# Troubleshooting Errors
If you select the `Execute Windows batch command` build step, you will see an error similar to the following: If you select the `Execute Windows batch command` build step, you will see an error similar to the following:
``` ```
Building in workspace /var/jenkins_home/workspace/hello Building in workspace /var/jenkins_home/workspace/hello


+ 7
- 3
WINDOWS.md View File

@ -1,4 +1,4 @@
# Learning Jenkins, 02-01: Your First Jenkins Job
# Learning Jenkins, 02-05: Run and Monitor Jobs
In this lesson you create your first job. In this lesson you create your first job.
Use the console to create a freestyle job with one build step. Use the console to create a freestyle job with one build step.
@ -9,10 +9,14 @@ If you are running Jenkins on a Windows system:
1. Select the `Execute Windows batch command` build step 1. Select the `Execute Windows batch command` build step
2. Enter the following for the command: 2. Enter the following for the command:
``` ```
echo "Hello, Jenkins"
@echo off
for /L %%i in (1,1,30) do (
@echo %%i
@ping localhost -n 2 >NUL
)
``` ```
# Getting an Error in the First Job
# Troubleshooting Errors
If you select the `Execute shell` build step, you will see an error similar to the following: If you select the `Execute shell` build step, you will see an error similar to the following:
``` ```
Building in workspace C:\Windows\system32\config\systemprofile\AppData\Local\Jenkins\.jenkins\workspace\hello-jenkins Building in workspace C:\Windows\system32\config\systemprofile\AppData\Local\Jenkins\.jenkins\workspace\hello-jenkins


Loading…
Cancel
Save