1 of 68

Jenkins

Google Summer of Code 2023

Final Phase - Demos

Jenkins Online Meetup, September 14, 2023

2 of 68

Jenkins Online Meetup

  • Community-driven virtual meetups
    • Anything about Jenkins: Case studies, success stories, etc.
    • Jenkins developer meetups
    • https://www.meetup.com/Jenkins-online-meetup
  • Looking for speakers!

2

3 of 68

Questions & Answers

// Code of Conduct:

https://jenkins.io/project/conduct/

3

4 of 68

Agenda

  • Jenkins in GSoC 2023 Overview
  • Project Demos by GSoC Contributors
  • Questions and Answers

4

5 of 68

Jenkins In GSoC 2023

5

GitLab Plugin Modernization

Add Probes to “Plugin Health Score”

Building Jenkins.io with Alternative Tools

Docker-based Jenkins Quickstart Examples

  • 2023 - 7th year in GSoC
  • 4 projects, 4 new contributors, 12 mentors

6 of 68

2023 Jenkins GSoC Contributors

6

Jagruti Tiwari

Harsh Pratap Singh

Vandit Singh

Ashutosh Saxena

7 of 68

7

Project Presentations

by GSoC Contributors

8 of 68

Docker-based Jenkins

Quick Start Examples

GSoC Contributor :

  • Ashutosh Saxena

Mentors :

  • Bruno Verachten
  • Bervianto Leo Pratama
  • Jean-Marc Meessen

9 of 68

What’s the Problem?

01

10 of 68

Let Me Paint a Picture

11 of 68

Let’s See What Users First Experience of Jenkins Looks Like: -

  • docker network create jenkins

  • docker run --name jenkins-docker --rm --detach --privileged --network jenkins --network-alias docker --env DOCKER_TLS_CERTDIR=/certs --volume jenkins-docker-certs:/certs/client --volume jenkins-data:/var/jenkins_home --publish 2376:2376 docker:dind

12 of 68

  • docker build -t myjenkins-blueocean:1.1 .

  • docker run --name jenkins-blueocean --rm --detach --network jenkins --env DOCKER_HOST=tcp://docker:2376 --env DOCKER_CERT_PATH=/certs/client --env DOCKER_TLS_VERIFY=1 --publish 8080:8080 --publish 50000:50000 --volume jenkins-data:/var/jenkins_home --volume jenkins-docker-certs:/certs/client:ro myjenkins-blueocean:1.1

Problems?

  • Intimidating steps
  • Tutorials
  • Security risks

Goal?

  • Simplify the user experience Specially for beginners

13 of 68

What We Did in the First Half of GSoC?

14 of 68

  • During Phase 1, we aimed to accomplish this objective using scripts. We developed jenkins_init.sh and jenkins_teardown.sh scripts to initiate and stop the containers.

  • Additionally, we crafted keygen.sh script for SSH key generation and other for cloning/forking of repositories.

  • We Integrated the scripts to take a keyword input and setup the containers for specific tutorials, so the tutorials could be run with jenkins_init.sh maven

Phase 1

15 of 68

Let’s See What We Accomplished in Phase 2

16 of 68

Phase 2

  • Using Docker Compose Profiles for Integrating windows

  • Integrating The remaining Tutorials

  • Testing Using Github Actions

17 of 68

And Yes, Everything works with Gitpod, with just a click

18 of 68

Demo Time!!

19 of 68

What I Learned?

  • Git, Github best practices
  • Resolve merge conflicts
  • A lot about The Jenkins file system
  • Writing docker-compose files
  • Writing Shell Scripts
  • Github Actions
  • The Jenkins Remote Access API
  • Writing Dockerfiles
  • How ssh-keys works
  • How gitpod works
  • How to write technical documentation

20 of 68

What’s Next?

  • Transitioning from GitHub Actions to ci.jenkins.io

  • Full integration into jenkins.io.

  • Incorporating the repository into Hacktoberfest with "good first issues" to engage beginner contributors.

  • As a stretch goal, expanding the project with additional tutorials.

21 of 68

Thank You

  • Mentors

  • Jenkins Community

22 of 68

Questions?

23 of 68

Thank you

For listening. You can find more info about the project here�You can follow project’s progress on gitter and github

24 of 68

BUILDING JENKINS.IO WITH ALTERNATIVE TOOLS

<gsoc-contributor>

By Vandit Singh

</gsoc-contributor>

Mentors: Mark Waite, Kris Stern,

Yiming Gong, Rajiv Singh

25 of 68

HELLO! I’m

<p> Vandit Singh </p>

Hi, I’m Vandit Singh, a computer science engineering undergraduate student from India. In July 2022, I began Contributing to Jenkins. Technologies that interests me are DevOps, Web Development and building things. I mostly talk with computers using Java, C, and C++ and Golang.

i love opensource since it will take over proprietary software in the near future and i love working with strangers around the world ;)

26 of 68

PROJECT DESCRIPTION

<p> Why are we re-building jenkins.io when it is working properly right now? </p>

27 of 68

AWESTRUCT AND JENKINS.IO?

<p> Jenkins.io is made with Awestruct </p>

Awestruct is used to bake static sites but It is under maintained since 2021. People from Jenkins are maintaining it to keep it alive.

But that’s not the only reason. Versioned Documentation is another feature we want but can’t implement with Awestruct out-of-the-box

28 of 68

06

TABLE OF CONTENTS.

01

02

03

04

05

Project Description.

Why are we using Antora and Gatsby.

Demo.

Problems we faced.

Achieved Milestones.

Key Takeaways.

29 of 68

WE’LL BE USING ANTORA AND GATSBY TO REBUILD JENKINS.IO

30 of 68

WHY ANTORA & GATSBY

<p> But Why are we using these two tools</p>

31 of 68

WE ARE USING THEM BECAUSE?

Another major section of the site is Continuous Blog and some leftover pages which are created with Gatsby.�Why Gatsby?

  • Gatsby is famous for its fast builds, secure, and powerful websites using a React-based framework

We’re using Antora to create the major part of the site which is documentation.

Why Antora?

  • Versioning out-of-the-box
  • It is created for Asciidoc files

32 of 68

ACHIEVED MILESTONES.

Documentation Site

With Antora

Blogs with Gatsby

Some pages are still yet to be done with Gatsby which will be done by 20 September

Documentation site is complete.

Blogs are on the verge to be done

33 of 68

DEMO.

34 of 68

PROBLEMS WE FACED

Using

Strapi

Interpage Linking

Datatable API

was not working

We have tried using Gatsby + Strapi after community feedback but that was just not the right tool for us

The links that are linked to some other page on the doc site gave us a hard time fixing them.

We have it working now due to Kris’s help

35 of 68

KEY TAKEAWAYS.

  • Migrating a large codebase like that of jenkins.io helped me to get better with planning and execution.
  • While I’m working on this project I learnt a lot about Antora, Gatsby, GraphQl, scripting and regex and many more things.
  • I’ve come to realize the importance of community feedback as well

36 of 68

THANK YOU!

Do you have any questions?

Gitter

37 of 68

GitLab Plugin Modernization

Contributor - Harsh Pratap Singh

Mentors - Mark Waite, Basil Crow, Kris Stern, Freyam Mehta

38 of 68

About Me :i

Hi! I am HARSH PRATAP SINGH, an Open Source enthusiast.

My interests lie in rapidly evolving Computer Science fields like Cloud-native computing, Modular Blockchains, and non technical fields like Economics, Philosophy and many more interesting stuff :) A lover of books!

Currently a Sophomore at Indian Institute of Technology, Kanpur.

Started contributing to Jenkins in my Freshman year from February 2023 and got hooked since then.

Check me out! - GitHub and Twitter

y

39 of 68

About the Project

What?

The GitLab Plugin enables seamless interaction between

Jenkins and GitLab. This project replaces

the usage of very old RESTEasy library with GitLab4J-API

via Jenkins GitLab API Library Plugin.

Why?

  • This migration greatly reduced future maintenance issues
  • Made the plugin more lightweight due to reduced dependencies
  • Improved consistency with other Jenkins plugins, and
  • Improved documentation.

How?

Let me walk you through my adventurous journey!

40 of 68

The Journey……

From being a curious newbie kid to becoming a maintainer. I think i have come a long way!!

What I learned? Quite a lot

  • Git, GitHub and GitLab
  • Extensive Debugging, even inside Docker containers
  • Stronger grasp on core programming concepts of JAVA and OOPs
  • Docker-based Functional Testing
  • Nginx Forward and Reverse Proxy
  • REST API and HTTP requests with Networking Concepts
  • UML diagrams

More importantly I learnt about owning a Project end-to-end with its maintenance over the long term, which gave me a great insight in the Software Development world! Jenkins community taught me the art of empathy and strong mentorship which I am extremely thankful for.

41 of 68

What Has Changed?

Migration should be like MAGIC, in which the end-user doesn’t

even feel that something inside has changed. Ideally! But…

Over the years GitLab has evolved, thus

during the migration we found out that the plugin will have

Removal of GitLab API V3 support soon as GitLab has dropped V3

and only supports V4 of its API currently.

Thus, we encourage V3 users to switch to V4 as soon as possible.

Also, GitLab has introduced some breaking changes which will be accomodated

in the plugin soon.

For using the modernized GitLab Plugin :

Minimum Jenkins version - 2.387.3

42 of 68

Demo

Let’s see if it works LIVE or not!!

43 of 68

References

Learn more about the project - Project Page

Join us for project discussions - Gitter Channel

Project meetings - Notes and Recordings

See code, file an issue or request - GitHub Repository Link

44 of 68

THANK YOU!

especially to my lovely mentors and org-admins,

the supportive community,

and for your patient listening

45 of 68

Questions?

46 of 68

46

Add Probes to "Plugin Health Score"

GSoC Contributor:

  • Jagruti Tiwari

Mentors:

  • Adrien Lecharpentier
  • Antoine Neveux
  • Dheeraj Singh Jodha
  • Jake Leon
  • Pierre Beitz

47 of 68

Agenda

  • Who am I?
  • What is Plugin Health Scoring System?
  • Why picking this project for GSoC 2023?
  • What did I do?
  • What did I learn?
  • Future plans?

47

48 of 68

Who am I?

Work

  • A senior project engineer with 4.5 yrs experience

Open Source

  • Started contributing in 2022
  • Was afraid of getting stagnant at work

GSoC

  • Learning leadership skills from my mentors.
  • Grateful to the Jenkins community.
  • Fortunate to have five active mentors.

48

49 of 68

What is the Plugin Health Score Project?

49

  • An automated system that rates plugins based on how much they respect the good practices and rules defined by the community.

  • A probe collects data about each plugin.

  • Probe data is used to compute a score.

  • A higher quality plugin is given a good score.

  • An obsolete or outdated plugin is given a lower score.

50 of 68

Why did I pick the PHS project for GSoC 2023?

  • Dig deeper into what I already know.

  • Interested in a core Java project.

  • Jenkins community helped me understand the project better.

  • Interested in learning and implementing OOPs concepts.

50

51 of 68

Quick Summary of First-Half of GSoC

  • Unreleased production changes probe
    • Looks for production code that is not released yet.

  • Third-party repository detection probe
  • Security Scan workflow detection probe
    • Checks whether the GitHub actions specified by Jenkins security team is configured.

51

52 of 68

Renovate Probe

Introduction

  • Dependabot or Renovate help dependencies update.

Importance of the probe

  • Tracks the usage of the bots in a plugin repository.

Details

  • Need to take care on the PRs they create.
  • Probe takes cares that they are not too many unmerged bot PRs.

52

53 of 68

Renovate Probe

Challenges and Learning

  • Code refactoring
  • Avoid duplication
  • Improve code readability
  • Writing maintainable code

Probe Status

  • The PR is merged.

53

54 of 68

Number of Open Issues Probe

Introduction

  • Open issues send a bad signal to the contributors:
    • The plugin needs maintenance
    • It is inactive or dead
  • Tracks two issues trackers: GitHub and JIRA.

Challenges and Learning

  • Accomplishing same goals with different APIs.
  • Identifying the right level of factorization.

54

55 of 68

Number of Open Issues Probe

Importance

  • Helps maintainers and contributors identify which plugins are:
    • Ready for adoption
    • Have active users

Probe Status

  • Under review. Functionality is completed.
  • Improving the code for better maintenance.

55

56 of 68

Incremental Build Detection Probe

Introduction

  • Developing components in parallel is burdensome.
  • A tooling to help with this issue.
  • Deploys only the modules affected by new commits.

Challenges and learning

  • Identifying how incrementals are produced.
  • Probe checks if the incrementals are configured correctly.

Probe status

  • The PR is merged.

56

57 of 68

Detecting Deprecated JSR-305 Imports Probe

Introduction

  • Recommended to use annotations that:
    • Enhance code quality
    • Not deprecated
  • The @Nonnull and @CheckForNull annotations have been deprecated since 2016.

Importance and Details

  • The outdated annotations are identified and highlighted.

Probe Status

  • The PR is merged.

57

58 of 68

What difference did I make?

58

59 of 68

What Other Things Did I Work On?

  • Fixed bugs:
    • Removed Regex expression to detect folder in SCMLinkValidationProbe.

  • Wrote blogs.

  • Working on the prototype of the new service that will generate effective-pom files.

59

60 of 68

Future Plans

  • Work on the new service that generates effective-pom file.
    • Would want to host and maintain it in future.

  • Want to be active in the community and project as long as possible.

  • Explore different Jenkins repositories.

  • Mentor and guide new contributors.

60

61 of 68

What did I learn in Open Source?

  • Clear communication
  • Met people from different corner of the world.
  • Async collaborations on channels like Gitter, Slack.
  • Being autonomous.
  • Researching and understanding topics.
  • Wrote readable and maintainable code.
  • Asking questions.
  • Handling criticism.
  • Adapting to unexpected collaboration.
  • Learned new approaches like:
    • Thinking of test cases before coding.

61

62 of 68

3 things I would tell myself

as a new open source contributor

  • Don’t let impostor syndrome win.

  • GSoC is a journey not the end.

  • It is all about the community.

62

63 of 68

63

Questions?

64 of 68

64

65 of 68

GSoC 2024

  • We will apply!
  • Mentors
  • Project ideas
  • Project ideas discussion starting soon, eta Oct/Nov 2023
  • https://jenkins.io/projects/gsoc/

65

66 of 68

More Resources

66

67 of 68

Jenkins Upcoming Events

67

Virtual

Date: TBD

  • New York City - September 13-14, 2023
  • Chicago, IL - September 27, 2023
  • Santa Clara, CA - October 18-19, 2023
  • Singapore, SG - October 26, 2023
  • London, UK - November 29, 2023
  • Discount code: DW23JENKINS

68 of 68

Thank You!

68