0
0
Jenkinsdevops~15 mins

Jenkins WAR file execution - Mini Project: Build & Apply

Choose your learning style9 modes available
Jenkins WAR File Execution
📖 Scenario: You want to run Jenkins on your local machine using the Jenkins WAR file. This is a common way to start Jenkins without installing it as a service. You will learn how to download the WAR file, set a port configuration, run Jenkins, and verify it is running.
🎯 Goal: Learn to execute the Jenkins WAR file with a custom port and confirm Jenkins is running by checking the output.
📋 What You'll Learn
Have Java installed on your machine
Download the Jenkins WAR file
Run Jenkins WAR file on a specified port
Verify Jenkins startup output
💡 Why This Matters
🌍 Real World
Running Jenkins from the WAR file is a quick way to start Jenkins without full installation. It is useful for testing or temporary setups.
💼 Career
Understanding how to run Jenkins WAR files helps DevOps engineers manage Jenkins servers and automate CI/CD pipelines efficiently.
Progress0 / 4 steps
1
Download the Jenkins WAR file
Create a variable called jenkins_war_url and set it to the exact string "https://get.jenkins.io/war-stable/latest/jenkins.war".
Jenkins
Need a hint?

Use a string variable to store the exact Jenkins WAR file URL.

2
Set the Jenkins server port
Create a variable called jenkins_port and set it to the integer 8080 to specify the port Jenkins will run on.
Jenkins
Need a hint?

Use an integer variable to hold the port number 8080.

3
Run the Jenkins WAR file with the port configuration
Write a command string called run_command that uses java -jar jenkins.war --httpPort=8080 to run Jenkins on the port stored in jenkins_port. Use an f-string to insert the port number.
Jenkins
Need a hint?

Use an f-string to insert the port number variable into the command string.

4
Print the Jenkins run command
Write a print statement to display the exact run_command string.
Jenkins
Need a hint?

Use print(run_command) to show the command that runs Jenkins.