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:
- Download Jenkins from http://mirrors.jenkins.io/war-stable/latest/jenkins.war
- Open up a Terminal in the download directory
- Run java -jar jenkins.war --httpPort=9090
- Browse to http://localhost:9090
- Follow the instructions to complete the installation
The following screenshot shows how the Jenkins server looks after a fresh installation:
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:
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:
Use the following configuration for the Pipeline setup:
- Definition: Pipeline script from SCM
- SCM: Git
- Repository URL: https://github.com/taskagile/vuejs.spring-boot.mysql
- Credentials: none
- Branch specifier: */master
- Additional behaviors: Clean before checkout
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:
This is how our TaskAgile application looks in production (https://taskagile.com):