Creating a Jenkins pipeline using JHipster
We can create the Jenkinsfile
for our project using the ci-cd sub-generator
from JHipster:
- In a terminal, navigate to the online-store folder first. Now run the following command:
> jhipster ci-cd
- You will be asked to select from a list of options as follows:
Welcome to the JHipster CI/CD Sub-Generator ? What CI/CD pipeline do you want to generate? (Press <space> to select, <a> to toggle all, <i> to inverse selection) >◯ Jenkins pipeline ◯ Travis CI ◯ GitLab CI ◯ CircleCI
- Let's select
Jenkins pipeline
from it. Next, we will have an option to choose additional stages:
? What CI/CD pipeline do you want to generate? Jenkins pipeline ? Jenkins pipeline: what tasks/integrations do you want to include? >◯ Perform the build in a Docker container ◯ Analyze code with Sonar ◯ Send build status to GitLab ◯ Build and publish a Docker image
- Let's skip this, as we won't be needing these for now, and proceed. Next, we will be asked if...