- Lets create a jenkins job which clones a git repository and lets execute pwd
- Build the project
- Now lets login into the jenkins master as jenkins user and see what happened
ls ~/jobs ls ~/workspace ls ~/workspace/scmunderstanding
- Jenkins Plugins are used to make jenkins extensible. The plugins enhance jenkins functionality by providing UI elements & declarative elements for easier usage.
git clone <url>
- In the above screenshot we are seeing the git plugin showing us git options. This plugin was installed as part of jenkins installation.
- Jenkins plugins are stored in
JENKINS_HOME/plugins. Jenkins plugins have the extension of
- hpi (hudson plugin interface)
- jpi (jennkins plugin interface)
- Installing Plugins:
- Lets install a plugin called as greenballs
- Lets create sudo previleges for jenkins user and make it passwd less.
- Lets create a jenkins freestyle project to build a java project (spring pet clinic)
- To build this project we need (git, java, maven)
- Lets install maven
- After installation to configure jenkins job to build maven and check the results
- Day builds & Night Builds
- How to configure the Day or Night Builds in Jenkins
- Use Build Triggers
- Build Trigger Options
- Poll SCM: Jenkins will poll SCM if there are any new changes, when there are new changes build will trigger automatically
- Build Periodically: This will trigger jenkins build on schedule. for creating schedules using crontab expression Refer Here
- While we build the project we execute unit tests, So test results should be shown to the user
- After we have succesful test results we might need jenkins to show the user the artifact (package) that is built on the ui. Jenkins calls this archiving the artifacts. This is a post build action.
Jenkins Adminsitrative Activites
- Backups & Restore Jenkins
- Using Jenkins from the CLI
- Monitoring Jenkins Jobs
- Monitoring Jenkins Systems
- Configuring email notifications