Jenkins Assignment– 2

Source Code Management & Build Tools

Basic Questions

  1. Connect Jenkins to a public GitHub repository without credentials.
  2. Clone a GitHub repository using a Freestyle job and print its files.
  3. Create a Jenkins job that pulls the latest code from GitHub.
  4. Connect Jenkins to a GitLab repository using HTTPS.
  5. Connect Jenkins to a GitLab repository using SSH keys.
  6. Integrate Jenkins with a Bitbucket repository using HTTPS.
  7. Integrate Jenkins with a Bitbucket repository using SSH keys.
  8. Configure Jenkins to connect to a private GitHub repository using credentials.
  9. Create a parameterized job that clones different Git branches based on input.
  10. Test connection between Jenkins and GitHub in job configuration.
  11. Clone a repository and build it using the default mvn clean install command.
  12. Create a job that runs gradle build on a sample Gradle project.
  13. Create a job that runs ant compile on a sample Ant project.
  14. Configure Jenkins to use system Git installation instead of the embedded one.
  15. Set up Git global configuration (name and email) inside Jenkins.
  16. Create a Jenkins job that checks out a specific commit ID from Git.
  17. Create a job that checks out a tag from Git.
  18. Configure Jenkins to ignore SSL verification when connecting to Git (for testing).
  19. Clone a repository and print the commit history using Jenkins.
  20. Create a Freestyle job that automatically pulls code every 10 minutes.

Intermediate Questions

  1. Configure a GitHub webhook to trigger a Jenkins job when code is pushed.
  2. Configure a GitLab webhook to trigger a Jenkins job when code is pushed.
  3. Configure a Bitbucket webhook to trigger a Jenkins job when code is pushed.
  4. Create a pipeline job that builds automatically on GitHub push.
  5. Create a pipeline job that builds automatically on GitLab push.
  6. Configure Jenkins to run builds on pull requests in GitHub.
  7. Configure Jenkins to run builds on merge requests in GitLab.
  8. Create a pipeline job that runs mvn test whenever code is pushed.
  9. Create a pipeline job that runs gradle test whenever code is pushed.
  10. Create a pipeline job that runs ant test whenever code is pushed.
  11. Configure Jenkins to build different branches automatically using GitHub webhook.
  12. Configure Jenkins to build feature branches automatically using GitLab webhook.
  13. Create a Jenkins pipeline that runs build → test → package using Maven.
  14. Create a Jenkins pipeline that runs build → test → package using Gradle.
  15. Create a Jenkins pipeline that runs build → test → package using Ant.
  16. Create a pipeline that prints commit author and commit message after build.
  17. Configure Jenkins to trigger a job only if the commit message contains “[build]”.
  18. Configure Jenkins to trigger a job only if code is pushed to the main branch.
  19. Set up a pipeline to run unit tests automatically on every Git commit.
  20. Set up a pipeline to package a project into a JAR/WAR file automatically on Git push.

Advanced Questions

  1. Create a multibranch pipeline project for a GitHub repository.
  2. Create a multibranch pipeline project for a GitLab repository.
  3. Create a multibranch pipeline project for a Bitbucket repository.
  4. Configure Jenkins to build pull requests from GitHub using webhooks.
  5. Configure Jenkins to build merge requests from GitLab using webhooks.
  6. Create a Jenkins pipeline that builds a Maven project and archives artifacts.
  7. Create a Jenkins pipeline that builds a Gradle project and archives artifacts.
  8. Create a Jenkins pipeline that builds an Ant project and archives artifacts.
  9. Configure Jenkins to trigger multiple jobs in sequence after a Git commit.
  10. Configure Jenkins to trigger multiple jobs in parallel after a Git commit.