Jenkins User Handbook
Total Page:16
File Type:pdf, Size:1020Kb
Jenkins User Handbook [email protected] Table of Contents Getting Started with Jenkins . 1 Installing Jenkins . 2 Prerequisites . 3 Installation platforms . 4 Docker . 4 WAR file . 7 macOS. 8 Linux. 8 Windows . 9 Other operating systems . 9 Post-installation setup wizard . 12 Unlocking Jenkins . 12 Customizing Jenkins with plugins . 12 Creating the first administrator user . 13 Using Jenkins . 14 Pipeline . 15 What is Jenkins Pipeline?. 16 Why Pipeline? . 18 Pipeline Terms . 19 Getting Started with Pipeline. 20 Prerequisites . 21 Defining a Pipeline . 22 Defining a Pipeline in the Web UI . 22 Defining a Pipeline in SCM . 25 Built-in Documentation . 26 Snippet Generator . 26 Global Variable Reference. 27 Further Reading . 28 Additional Resources . 28 Using a Jenkinsfile . 29 Creating a Jenkinsfile . 30 Build . 31 Test . 32 Deploy . 33 Advanced Syntax for Pipeline. 35 String Interpolation . 35 Working with the Environment. 35 Parameters . 37 Handling Failures . 37 Using multiple agents . 38 Optional step arguments . 40 Advanced Scripted Pipeline . 41 Branches and Pull Requests . 43 Creating a Multibranch Pipeline . 44 Additional Environment Variables . 47 Supporting Pull Requests. 47 Using Organization Folders . 48 Using Docker with Pipeline . 49 Customizing the execution environment. 50 Caching data for containers . 50 Using multiple containers . ..