vagrant sshinto machine- cd to
home/vagrant/data-vagrant/jenkins-ci-cd-server - then
docker-compose up -dOr - If container
already started beforethen just usedocker psto show that container Id. then start it usingdocker start <containerId>
Before post configuration read data-vagrant/sample-jenkins-app/Jenkinsfile properly.
- Make Sure
jenkins-ci-cd-serverserver is up and running properly, - Create Credential for
MaxisHubandDockerHub - To
Maven&DockerTools setup follow below steps,
Home->Manage Jenkins->Global Tool ConfigurationMavensection add [ Name:myMaven, version:3.5.2]Dockersection add [ Name:myDocker, Checked:Install automatically, Download from: docker.com:latest]
Note: If you want to change myMaven and myDocker then makes sure Jenkinsfile also has the same label.
- Now setup Docker Hub credential Go ->
Global credentials' ->Manage JenkinsID=dockerHubAccount`, and put username, and password
1.From `General` -> `Branch Sources`
- Project Repository: `git project Url`
- Credentials: `put previous configuration credential`
2.Build Configuration
- Mode: `by Jenkinsfile`
- Script Path: `Jenkinsfile`
Apply, Save Then
- http://localhost:7001 from home page select that pipeline and click
Build Now
Please read data-vagrant/sample-jenkins-app/Jenkinsfile file properly.
If you like to enable sonarqube server then data-vagrant/jenkins-devops-server/docker-compose.yml uncomment and check it.