Building with Jenkins

Now that we have Dockerfile and Jenkinsfile ready, let's build the application with Jenkins.

In case you do not have a Jenkins server up and running, you can use the following steps to spin up one easily:

  1. Download Jenkins from http://mirrors.jenkins.io/war-stable/latest/jenkins.war
  2. Open up a Terminal in the download directory
  3. Run java -jar jenkins.war --httpPort=9090
  4. Browse to http://localhost:9090
  5. Follow the instructions to complete the installation
The preceding steps are copied from the Guided Tour of Jenkins, available at https://jenkins.io/doc/pipeline/tour/getting-started. The port is changed from 8080 to 9090.

The following screenshot shows how the Jenkins server looks after a fresh installation:

Figure 15.9: A fresh installation of Jenkins

You can click the New Item on the left menu, or create new jobs, to create a job. On the New Item page, type in TaskAgile - vuejs.spring-boot.mysql as the name and choose Pipeline, as shown in the following screenshot. Click the OK button to proceed:

Figure 15.10: Creating new item in Jenkins 

Once Jenkins creates the job, you will be redirected to the configuration page. Click the Pipeline tab to go to the Pipeline configuration section, as shown in the following screenshot:

Figure 15.11: Setting up the Pipeline plugin in Jenkins 

Use the following configuration for the Pipeline setup:

Then, click the Apply button to apply the settings, and then click the Save button. Jenkins will redirect you to the Jenkins jobs' page. Click Build Now on the left menu. Once the build has started, you should be able to see the Stage View like the following:

Figure 15.12: The Pipeline Stage View in Jenkins

This is how our TaskAgile application looks in production (https://taskagile.com):

Figure 15.13: The application is launched!
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.125.51