vagrant ssh
into machine- cd to
home/vagrant/data-vagrant/jenkins-ci-cd-server
- then
docker-compose up -d
Or - If container
already started before
then just usedocker ps
to 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-server
server is up and running properly, - Create Credential for
MaxisHub
andDockerHub
- To
Maven
&Docker
Tools setup follow below steps,
Home
->Manage Jenkins
->Global Tool Configuration
Maven
section add [ Name:myMaven
, version:3.5.2
]Docker
section 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.