This document discusses scripting plugins for Gerrit code review. It describes how plugins can now be written in Groovy or Scala by creating a simple class file and placing it in the plugins directory. This allows defining new SSH commands or REST APIs with just a few lines of code. The document outlines several examples including creating branches, listing projects, and validating commit messages. It announces plans to further develop scripting plugin support at the next Gerrit hackathon with the goal of merging it into the core Gerrit codebase.
Introduction to GitHub, Open Source and Tech ArticlePRIYATHAMDARISI
The document provides an introduction to Git and GitHub. It begins with an agenda that outlines topics like commands, a demo, open source, and conclusion. It then discusses what Git is, the need to learn version control, and demonstrates some basic Git commands. It also covers topics like open source opportunities and general discussions.
The document provides an introduction to GitOps and Flux. It discusses what GitOps is, how it utilizes version control as a single source of truth for continuous delivery. It then summarizes what Flux is and its key components like the source, kustomize, helm and notification controllers. The document highlights benefits of Flux like reducing developer burden and being extensible. It also briefly mentions new Flux features like OCI support and related tools like the terraform controller, flamingo and Weave GitOps.
Linux'a Giris ve VirtualBox a Ubuntu KurulumuAhmet Gürel
Bu döküman Linux nedir neden tercih edilir gibi sorulara cevap arayanlara kısa bir bilgilendirmeden sonra Sanal makinaya Linux Ubuntu dağıtımının kurulumunu göstererek genel linux terminal ve komutlarının anlatımıyla son bulmaktadır.Lİnux ve özgür yazılım farkındalığını artırmak için giriş seviyesinde bir dökumandır.İşinize yaraması dileğiyle iyi çalışmalar.Soru,görüş ve önerileriniz için ahmet@gurelahmet.com a mail atabilirsiniz.
OpenTelemetry is a set of APIs, SDKs, tooling and integrations that are designed for the creation and management of telemetry data such as traces, metrics, and logs. It aims to enable effective observability by making high-quality, portable telemetry ubiquitous and vendor-agnostic. The OpenTelemetry Collector is an independent process that acts as a "universal agent" to collect, process, and export telemetry data in a highly performant and stable manner, supporting multiple types of telemetry through customizable pipelines consisting of receivers, processors, and exporters.
Gerrit at Eclipse Foundation have really long history. Initially only EGit and JGit projects could use this tool, but starting from February 2012 Gerrit become fist class citizen in Eclipse ecosystem. Every Eclipse Foundation's project can immediately start using its powerful code review capabilities. Capabilities that together with TDD and CI create safety net against bugs for software development.
For quite long time Gerrit features set was pretty closed and adding new functionality required upstream code base changes. That means either you ended up in port and rebase nightmare or contributed your changes back to community... where they could not have been accepted because they solve your domain's problem not something that is vital for the community edition.
Plugin support in Gerrit was initially introduced in version 2.5. Since then amount of available extension points substantially increased. In this presentation we will understand Gerrit plugins architecture. We will discuss extensions and plugins especially differences between them and which one to choose when. We will see how to combine everything together (including WEB UI) to get your first full blown Gerrit plugin.
The monolith to cloud-native, microservices evolution has driven a shift from monitoring to observability. OpenTelemetry, a merger of the OpenTracing and OpenCensus projects, is enabling Observability 2.0. This talk covers the fundamental concepts of observability and then demonstrates how to instrument your applications using the OpenTelemetry libraries.
This document provides an agenda for getting started with git and GitHub. It discusses version control and how git allows tracking changes to files. It explains how to set up git locally and initialize a repository. Basic git commands like add, commit, status, and log are covered. The document also discusses branching in git and what GitHub is. It provides steps for creating a GitHub account and repository and collaborating through forking, cloning, and pull requests. Finally, it discusses the benefits of open source work.
Observability, Distributed Tracing, and Open Source: The Missing PrimerVMware Tanzu
Open source tools like OpenTelemetry, OpenTracing, and W3C Trace Context are helping to standardize distributed tracing and observability. This allows developers to understand problems in microservices architectures by propagating unique trace IDs and collecting metrics and traces across services. While open source tools are useful for development and pre-production, commercial solutions are needed to handle production workloads at scale with additional features like access control and automated instrumentation. Standardization through open source is key to managing today's complexity in distributed systems.
The document provides an overview of GitOps and Flux. It introduces GitOps as an operating model that utilizes a version controlled system like Git as a single source of truth for continuous delivery of cloud native applications like Kubernetes. It describes Flux as a GitOps tool that automates the deployment of Kubernetes workloads by automatically syncing apps and infrastructure from a Git repository to a Kubernetes cluster. The document highlights key benefits and capabilities of Flux such as working with any Kubernetes cluster and tools, multi-tenancy support, notifications, and an active community.
Analytics with Apache Superset and ClickHouse - DoK Talks #151DoKC
Link: https://youtu.be/Y-1uFVKDfgY
https://go.dok.community/slack
https://dok.community/
ABSTRACT OF THE TALK
This talk concerns performing analytical tasks with Apache Superset with ClickHouse as the data backend. ClickHouse is a super fast database for analytical tasks, and Apache Superset is an Apache Software foundation project meant for data visualization and exploration. Performing analytical tasks using this combo is super fast since both the software are designed to be scalable and capable of handling data of petabyte scale.
This document discusses Flux, an open source tool for Kubernetes continuous delivery. It summarizes Flux version 2 updates, how Flux enables GitOps practices, and how Flux can be used by different roles like cluster operators, platform engineers, and app developers to automate infrastructure and application deployments. Key features of Flux discussed include multi-cluster management, observability integrations, and the GitOps toolkit for building custom continuous delivery systems.
Unleash the hidden value of your Gerrit Code Review data. See how to extract statistics from your Git repository and Reviews and update a real-time KPI dashboard with Apache Kafka Stream Events.
Speed up Continuous Delivery with BigData AnalyticsLuca Milanesio
Use Spark, Apache Flume and ElasticSearch-Kibana to unleash the power of your Code Review and Continuous Delivery Pipeline logs. Jenkins and Gerrit Code Review are the sources of your Analytics KPI dashboards.
Mobile Application Lifecycle with Jekins, Trello and CollabNet TeamForgeLuca Milanesio
SmartPhones have revolutionised the way we think and write software: software development on Mobile has and need to be agile ... but how can you make one step further and have actually your SmartPhone to drive your development ?
Can Mobile App development and Continuous Delivery be pushed to the edges?
See how you can follow every step of your development with your SmartPhone end-to-end:
Continuous Integration
Continuous Delivery
Install
Test execution
Issue tracking
Gerrit and Jenkins are used for continuous delivery of big data projects. The document discusses GerritForge, an organization that uses Git, Gerrit, Jenkins, Mesos, Marathon, and Docker to enable continuous integration and deployment of Spark projects onto CDH clusters. A code review lifecycle is presented involving Git, code review in Gerrit, automated builds in Jenkins, and deployment to ephemeral CDH clusters created through Mesos and Marathon for integration testing.
This document discusses various Git concepts and commands. It begins with an introduction to Git and SCM concepts like branches and merging. It then demonstrates how to initialize a Git repository, add files, and commit changes. Different Git states like staged, unstaged, and clean are explained. Commands shown include git add, commit, status, log, and gui tools like gitk and gitgui. Branching, merging, rebasing, cherry-picking and resolving conflicts are demonstrated. The document concludes by discussing reverting and resetting changes in Git, noting the dangers of losing commits if not used carefully.
The document summarizes a presentation on test-driven development (TDD) given by Luca Milanesio. The presentation discusses some of the challenges and downsides of TDD that can occur, such as tests becoming more complex than the code itself, or code being warped to accommodate tests rather than clarity. It also discusses how to rebuild TDD practices to focus on writing accurate, readable tests of appropriate size and scope.
See how GitBlit has been plugged into Gerrit Code Review as repository viewer.
Includes a step-by-step guide on how to clone, build and use GitBlit plugin on Gerrit.
GerritHub.io was launched 2 years ago.
Learnings, problems and new ideas on how to improve the GitHub to Gerrit plugin and hints on Gerrit scalability and replication.
Devoxx 2016 Using Jenkins, Gerrit and Spark for Continuous Delivery AnalyticsLuca Milanesio
Our journey and experience in dealing with the collection/analysis of Continuous Delivery log events using Gerrit Code Review, Jenkins with Apache Flume, ElasticSearch, Kibana and Spark
This document describes Luca Milanesio's presentation on zero downtime upgrades for Gerrit. It discusses the different types of upgrades for Gerrit, including code-only, code and database schema, and code, database schema, and repository upgrades. It then outlines an 8 stage process for performing zero downtime upgrades of Gerrit using HAProxy load balancing to minimize downtime and ensure high availability, redirecting traffic from the old to new upgraded version.
Jenkins User Conference - Continuous Delivery on MobileLuca Milanesio
SmartPhones have revolutionised the way we think and write software: how can you take an additional step and actually have your SmartPhone drive development? With Jenkins, you can drive and integrate every step of your development with your SmartPhone, end-to-end: CI and delivery - Application install - Test execution - Issue tracking. See how to implement mobile plugins for Jenkins on mobile
This document provides an overview of Git and how to install Git software and connect a local repository to a GitHub repository. It discusses what version control systems are, introduces Git as a distributed version control system, lists advantages of Git over SVN, outlines steps to install Git software and configure user settings, and describes commands for creating, exporting, importing, and managing repositories locally and on GitHub. It also provides brief explanations for why Git may be preferable to SVN in terms of security, speed, storage space requirements, and managing branches.
We will learn how to create repository, pushing, cloning and creating branches. Additionally we will talk about various workflows that are used by teams while collaborating in a project.
GitLab CI is a continuous integration service fully integrated with GitLab. It allows users to define build and test workflows directly in the GitLab repository using a .gitlab-ci.yml file. GitLab CI runs jobs defined in the YAML file on GitLab-hosted runners which can be Docker containers. It supports features like artifacts, dependencies between jobs, stages, and secret variables to securely pass credentials to builds.
Matt Gauger - Git & Github web414 December 2010Matt Gauger
Git is a version control system that allows developers to track changes to code over time. The document provides a brief introduction to common Git commands like commit, push, pull, and fetch. It also discusses how GitHub builds on Git by providing a platform for hosting projects and collaborating through features like forking, pull requests, and issue tracking. The overall message is that Git and GitHub optimize the development workflow by making it easy to manage changes, work on projects together, and contribute code back to open source projects.
Git is a version control system that allows tracking changes to code. GitHub is a platform that uses Git to manage codebases in the cloud. Git allows reverting code to previous versions if new changes break an application. It also facilitates collaboration through features like branching and merging. The document provides instructions for initializing a Git repository, committing and pushing changes to GitHub, creating and switching branches, and making pull requests to contribute code. It emphasizes documenting projects with a high-quality README to showcase work and help others understand and use the codebase.
This document provides instructions for setting up Gitlab and generating SSH keys. It demonstrates how to generate an SSH key pair, add the public key to Gitlab, clone a Gitlab project, commit changes and push commits to the remote repository. It also covers initializing Git flow and performing common Git and Gitlab tasks like creating branches, starting a release, and fetching from the remote.
This document provides an introduction to Git and GitHub. It discusses key features of Git including being a distributed version control system designed for speed and efficiency. It covers setting up Git locally and on GitHub, including configuring user information, initializing and cloning repositories, and pushing and pulling changes. The document also provides some basic Git commands and points to additional learning resources for beginners.
The document discusses setting up continuous integration for a JavaScript project using Jenkins. It describes configuring Jenkins to run unit tests with RhinoUnit after checking out the code from a GitHub repository. Jenkins fetches the latest code, runs the unit tests via an Ant target, and reports the results, allowing for continuous integration and automated testing of the JavaScript project.
This document discusses using Terraform and the GitHub provider to manage GitHub repositories and access in a way that is compliant with ISO27001 standards. It outlines problems with the default GitHub UI and access controls. The solution presented is to define infrastructure as code using Terraform to create repositories, teams, users and access management. This satisfies ISO27001 requirements by providing strict access control, audit trails, security policies and a pull request approval process. Atlantis is also introduced to run Terraform plans and apply changes within pull requests for approval before state changes.
Git is a distributed version control system that allows for both local and remote collaboration on code. It provides advantages like speed, simplicity, integrity, and support for parallel development through features like branching. Common Git commands include git init to start a new repository, git add to stage files, git commit to save changes, git push to upload local work to a remote repository, and git pull to download remote changes. GitHub is a popular hosting service for Git repositories that provides a graphical interface and social features.
GIT training - advanced for software projectsThierry Gayet
This document provides an overview of an advanced Git training covering topics like Git commands, DevOps/DevSecOps, GitLab, CI/CD, and using Git in Visual Studio Code. The training will review Git configuration, cloning repositories, inspecting repository details, and branching. Attendees should have basic Git knowledge and need to ensure their SSH keys are set up to access the training GitLab project.
2015-ghci-presentation-git_gerritJenkins_finalMythri P K
This document provides an overview of continuous integration/continuous delivery (CI/CD) using open source tools Git, Gerrit, and Jenkins. It discusses the key principles of DevOps, continuous delivery and continuous deployment. It then describes how Git is used for version control, Gerrit for code reviews, and Jenkins for continuous integration. The rest of the document demonstrates setting up these tools, configuring Jenkins plugins, and walking through the workflow of making a code change in Git, pushing to Gerrit for review, and triggering an automated build in Jenkins.
The document outlines the steps to fix a bug in OpenStack code:
1. Set up your development environment by signing the CLA, creating a Launchpad account, adding yourself to the contributors wiki, and requesting membership in the openstack-cla group.
2. Get the source code of the Tempest project from GitHub and configure it using git-review.
3. Create a topic branch to remove the duplicate line, commit the change with a descriptive message, and submit it for review.
Once submitted, any OpenStack developer can review the change and two +2 reviews are needed for merging, with one additional +1 approval from a core reviewer to trigger automated testing and merging.
The document outlines the steps to fix a bug in OpenStack code:
1. Set up your development environment by signing the CLA, creating a Launchpad account, adding yourself to the contributors wiki, and requesting membership in the openstack-cla group.
2. Get the source code of the Tempest project from GitHub and configure it using git-review.
3. Create a branch to fix the duplicate lines, commit the change, and submit it for review. The change will be merged once it passes tests and gets two positive reviews and a "+1 Approved" vote from a core reviewer.
This document provides an introduction to Gitlab CI and continuous integration/continuous delivery (CI/CD) workflows. It discusses DevOps practices and the benefits of Gitlab CI. It then covers how to set up Gitlab runners, write a basic Gitlab CI configuration file, define jobs, stages, variables and environments. The document demonstrates concepts like Docker integration, artifacts, auto and manual deployments, and stopping deployments. It concludes with a live demo of a Gitlab CI configuration.
This document provides instructions for becoming a contributor to the GWT (Google Web Toolkit) open source project. It outlines the process for signing the contributor license agreement, setting up the necessary tools like Git and Gerrit, contributing code changes by submitting pull requests through GitHub, and ensuring code style guidelines are followed. The workflow for contributing changes to both the GWT codebase and documentation site is described.
Git is a distributed version control system that allows for collaborative development of software. GitHub is a hosting service for Git repositories that provides a web interface and additional features. The document provides step-by-step instructions for installing Git, configuring it with GitHub, working locally and remotely with repositories, and additional resources for learning more about Git and GitHub.
The document provides an outline on installing and configuring Git, introduces common Git concepts and commands, discusses various Git workflows and hosting options on GitHub and Bitbucket, and includes examples of using Git in case studies. It covers topics such as setting up a local and global Git configuration, interacting with the staging area and working directory, branching and merging, and resolving conflicts. The document is intended to teach users the basics of using the popular version control system Git.
Basic Introduction to Git and Github. Covers the basic work flow of init, clone, add, commit and push. Other commands like git remote, git pull etc are briefly touched.
Similar to Gerrit Code Review: how to script a plugin with Scala and Groovy (20)
Gerrit Analytics applied to Android source codeLuca Milanesio
GerritForge trialled the Gerrit Analytics plugin and ETL with the Android Open-Source Project code-base. The results of the trial have been presented at the Gerrit User Summit 2019 at Gothenburg and Sunnyvale CA. Find inside an overview of the problems involved, the solutions implemented and also the use of the pull-replication plugin to fetch the code from the official Android repository.
Gerrit Code Review is getting cloud-native, thanks to the extensions and plugins developed by GerritForge.
See how you can deploy and integrate Gerrit with AWS and GCloud and get the best of the serverless architecture, avoiding common pitfalls.
The document discusses different types of migrations ranging from trivial to ultrahazardous. It describes approaches for migrating Gerrit installations of varying complexity based on factors like team size, number of repositories, and distance of migration. Blue/green deployments are recommended for complex migrations to minimize risk and downtime. Automating migrations with Ansible and proper planning including staging and testing are emphasized to enable smooth upgrades.
Gerrit 3.2 and 3.3 introduced many new features and improvements including Java 11 support, performance optimizations like new caching, zero-downtime upgrades, file uploads in PolyGerrit, and expanded testing. Gerrit 3.3 focused on attention sets and replication stabilization. Native packages were also updated and Gerrit 3.0 is now end of life.
Last year we presented the vision and road-map of Gerrit multi-master setup at GerritHub.io. This year GerritForge and the Gerrit community have released the first version of the multi-site plugin, based on the legacy of the successful high-availability plugin started years ago by Ericsson.
The multi-site plugin is a 100% OpenSource solution and does not require any proprietary software installed or hardware/software level filesystem replication: it is fully based on the replication, healthcheck and multi-site plugins.
Multi-site is a journey and the Community is making big steps towards it.
Luca Milanesio from GerritForge gave a presentation on the new features in Gerrit 3.0 and beyond. Some of the key highlights included:
- PolyGerrit is the new Gerrit UI built without GWT for improved performance and customization.
- NoteDb stores all Gerrit data including commits, reviews, metadata, accounts and groups directly in Git for fully consistent backups and removal of single point of failure databases.
- Submit rules can now be written in any language through an extension point beyond just Prolog.
- New core plugins like Gitiles, delete project, and web hooks have been added with a plugin manager for easy installation.
- Future releases will
The document discusses the Gerrit User Summit 2019 hosted by Volvo Cars in Gothenburg, Sweden. It thanks Volvo Cars, Google, and GerritForge for sponsoring the event. It also mentions what's new in Gerrit 3.0 and beyond, a Google survey on Gerrit Code Review, that Gerrit is open source, the Gerrit analytics website, and the different roles that make up the Gerrit Code Review community.
Gerrit multi-master / multi-site at GerritHubLuca Milanesio
GerritHub evolved from a simple master-slave setup into a truly multi-master and multi-site service. See how the solution has been implemented and the next steps for making the service even better and more distributed and scalable.
This document provides information about the Gerrit User Summit 2018 being held in Palo Alto, CA from GerritForge.com. It includes the agenda for the two day summit, with talks and networking sessions on Day 1 and breakfast, more talks and a closing on Day 2. On the evening of Day 1 there will be a celebration for the 10 year anniversary of Gerrit Code Review at the Computer History Museum with drinks, dinner and cake. The summit will give attendees opportunities to learn about new Gerrit features, ask questions, share experiences, network with other Gerrit users, and contribute to the Gerrit Code Review project.
Jenkins plugin for Gerrit Code Review pipelinesLuca Milanesio
Introducing the brand new plugin that brings Gerrit Code Review into the Jenkins Pipeline world: simpler, faster and yet more powerful than ever. Gerrit becomes a first-class citizen into the Jenkins ecosystem by enabling a complete pipeline to fetch changes for review, building and submitting the relevant feedback as automated review comment to Gerrit. The new plugin comes from the CI validation workflow experience of the Gerrit Code Review project. The key aspects are stateless, configuration-less - apart from the standard SCM configuration settings. That means that multiple jobs and multiple branches of the same job, can have their own Gerrit integration defined and working out-of-the-box.
The document outlines the schedule and details of the Gerrit User Summit, an annual event that brings together the Gerrit community from over 14 countries. The summit focuses on allowing attendees to meet each other, exchange information, discuss ideas, and ask questions. It includes talks on both days, as well as time for lunch, demos of exhibitor booths, and Q&A with Gerrit maintainers.
How to keep Jenkins logs forever without performance issuesLuca Milanesio
Jenkins is a golden source of information: it contains logs, artifacts and feedback and x-refs from multiple sources. To keep our master healthy and responsive, often we need to remove precious data. The members of the Gerrit Code Review project wanted to keep everything and this is how we did it.
Jenkins Pipeline on your Local Box to Reduce Cycle TimeLuca Milanesio
A case study on how to reduce continuous delivery cycle time by using your local resources as the starting point for the continuous delivery Jenkins Pipeline. Your local box has spare CPU, memory and a Git repo to be used with a local Jenkins Pipeline. You get fast feedback and create lots of precious artifacts.
Jenkins world 2017 - Data-Driven CI Pipeline with Gerrit Code ReviewLuca Milanesio
There is hidden value in the data produced by your Continous Delivery Pipeline that could help
you achieve more efficient processing. The main objective of this workshop is to show you how to
extract that value and benefit from it.
We will introduce you to how to configure and improve your Continuous Delivery Pipeline using
data. After an overview of a Continuous Delivery Pipeline setup using Gerrit Code Review,
Jenkins, and Docker, we will go through the steps on how to extract and analyze data across all
the pipeline stages of the delivery chain.
Stable master workflow with Gerrit Code ReviewLuca Milanesio
This document provides an agenda for a training on Gerrit Code Review. The morning session will cover benefits of code review, an overview of Gerrit, advanced Git commands needed for review, and exercises on pushing changes for review and reviewing using Gerrit. The afternoon session will include exercises on adding new patch sets, multiple patch set reviews, rebase and conflict resolution, and questions. Key concepts discussed include the Gerrit code review workflow, target branches, magic refs, and changes and patch sets.
Delegation Inheritance in Odoo 17 and Its Use CasesCeline George
There are 3 types of inheritance in odoo Classical, Extension, and Delegation. Delegation inheritance is used to sink other models to our custom model. And there is no change in the views. This slide will discuss delegation inheritance and its use cases in odoo 17.
No, it's not a robot: prompt writing for investigative journalismPaul Bradshaw
How to use generative AI tools like ChatGPT and Gemini to generate story ideas for investigations, identify potential sources, and help with coding and writing.
A talk from the Centre for Investigative Journalism Summer School, July 2024
Split Shifts From Gantt View in the Odoo 17Celine George
Odoo allows users to split long shifts into multiple segments directly from the Gantt view.Each segment retains details of the original shift, such as employee assignment, start time, end time, and specific tasks or descriptions.
How to Store Data on the Odoo 17 WebsiteCeline George
Here we are going to discuss how to store data in Odoo 17 Website.
It includes defining a model with few fields in it. Add demo data into the model using data directory. Also using a controller, pass the values into the template while rendering it and display the values in the website.
Join educators from the US and worldwide at this year’s conference, themed “Strategies for Proficiency & Acquisition,” to learn from top experts in world language teaching.
Beginner's Guide to Bypassing Falco Container Runtime Security in Kubernetes ...anjaliinfosec
This presentation, crafted for the Kubernetes Village at BSides Bangalore 2024, delves into the essentials of bypassing Falco, a leading container runtime security solution in Kubernetes. Tailored for beginners, it covers fundamental concepts, practical techniques, and real-world examples to help you understand and navigate Falco's security mechanisms effectively. Ideal for developers, security professionals, and tech enthusiasts eager to enhance their expertise in Kubernetes security and container runtime defenses.
Satta Matka Dpboss Kalyan Matka Results Kalyan ChartMohit Tripathi
SATTA MATKA DPBOSS KALYAN MATKA RESULTS KALYAN CHART KALYAN MATKA MATKA RESULT KALYAN MATKA TIPS SATTA MATKA MATKA COM MATKA PANA JODI TODAY BATTA SATKA MATKA PATTI JODI NUMBER MATKA RESULTS MATKA CHART MATKA JODI SATTA COM INDIA SATTA MATKA MATKA TIPS MATKA WAPKA ALL MATKA RESULT LIVE ONLINE MATKA RESULT KALYAN MATKA RESULT DPBOSS MATKA 143 MAIN MATKA KALYAN MATKA RESULTS KALYAN CHART
Kalyan Matka Kalyan Result Satta Matka Result Satta Matka Kalyan Satta Matka Kalyan Open Today Satta Matka Kalyan
Kalyan today kalyan trick kalyan trick today kalyan chart kalyan today free game kalyan today fix jodi kalyan today matka kalyan today open Kalyan jodi kalyan jodi trick today kalyan jodi trick kalyan jodi ajj ka.
Slide Presentation from a Doctoral Virtual Open House presented on June 30, 2024 by staff and faculty of Capitol Technology University
Covers degrees offered, program details, tuition, financial aid and the application process.
2. 2
About Luca
• Luca Milanesio
Co-founder of GerritForge
• over 20 years of experience
in Agile Development
SCM, CI and ALM worldwide
• Contributor to Jenkins
since 2007 (and previously Hudson)
• Git SCM mentor
for the Enterprise since 2009
• Contributor to Gerrit Code Review community since 2011
4. 4
Agenda
Where we come from ?
2 years ago: Gerrit plugins
We want more plugins
Create a plugin in 60 seconds
What, how and when are coming?
Plugins showcase
13. 13
That would be very useful for
Gerrit Administrators to be
able to write quick automation
scripts for their daily tasks. I
would prioritize groovy plugin
more for the popularity of
groovy scripting.
I think adding a "scripting
language plugin" to support
plugins written in scripting
languages is a very good idea
Hi all,
I was thinking about extending
Gerrit capabilities to load
plugins / extensions by
providing "wrapper" for other
JVM languages.
So … we asked the Community
I would prefer scala, because
I've already written my plugins
with it. imho the builld process is
the main impediment.
15. 15
NO STEPS, NO BUILD … just do it !
$ cat - > ~/gerrit/plugins/hello-1.0.groovy
import com.google.gerrit.sshd.*
import com.google.gerrit.extensions.annotations.*
@Export("groovy")
class GroovyCommand extends SshCommand {
public void run() { stdout.println "Hi from Groovy" }
}
^D
This sample has 190 chars: you need to type
at least 3.2 chars/sec to complete the sample
in only one minute
https://gist.github.com/lucamilanesio/9687053
16. 16
IS THAT TRUE ? Let’s check on Gerrit
$ ssh –p 29418 user@localhost gerrit plugin ls
Name Version Status File
----------------------------------------------------------------------
hello 1.0 ENABLED hello-1.0.groovy
Gerrit auto-detects the new Groovy file under
$GERRIT_SITE/plugins, invoke the interpreter
and auto-wrap the class into a self-contained Gerrit
plugin.
Groovy class is compiled into byte-code BUT is
slower than native Java plugin.
17. 17
DOES IT REALLY WORK ?
$ ssh –p 29418 user@localhost hello groovy
Hi from Groovy
No magic … IT IS ALL REAL !
Plugin name (hello) comes from the
script filename.
A new SSH command (groovy) has
been defined in Gerrit associated to
the Groovy script loaded.
18. 18
What about Scala ? Just do it again !
$ cat - > ~/gerrit/plugins/hi-1.0.scala
import com.google.gerrit.sshd._
import com.google.gerrit.extensions.annotations._
@Export("scala")
class ScalaCommand extends SshCommand {
override def run = stdout println "Hi from Scala"
}
^D
Scala is more concise with just 178 chars :
you can take it easy with 2.9 chars/sec to type
it a minute
https://gist.github.com/lucamilanesio/9687092
19. 19
You have now two plugins loaded
$ ssh –p 29418 user@localhost gerrit plugin ls
Name Version Status File
----------------------------------------------------------------------
hello 1.0 ENABLED hello-1.0.groovy
hi 1.0 ENABLED hi-1.0.scala
There are no differences for Gerrit between
Java, Groovy or Scala plugins: they have the same
dignity and power.
Scala compiler takes longer but byte-code runs at
the same speed as a native Java plugin!
20. 20
Reactions from the Gerrit mailing list …
So i checked it out and tried it, and
what should i say ...
Wow, it rocks! ;-)
Combined with new and shiny
Plugin API the code is really short.
So i started new repo
on gh [1] and created two working
plugins [2], [3], and sure would add
more, so to say,
cookbook-groovy-plugin:
$>ssh gerrit review approve
I59302cbb
$>Approve change: I59302cbb.
What do
YOU think
?
21. 21
WHAT can scripting plugins do now ?
1. Define new SSH commands
2. Define new REST APIs
3. Listen to Gerrit events
22. 22
HOW can I get Gerrit with scripting plugins ?
Download the Gerrit master with scripting extensions from:
http://ci.gerritforge.com/job/Gerrit-master-scripting/lastSuccessfulBuild/artifact/buck-
out/gen/gerrit-scripting.war
Run Gerrit init and say Y for installing the Scala and Groovy scripting plugins
providers:
*** Plugins
***
Install plugin groovy-provider version v2.9-rc1-325-g96d0d43 [y/N]? Y
Install plugin scala-provider version v2.9-rc1-325-g96d0d43 [y/N]? y
You may want to increase the JVM PermGen on gerrit.config when
loading/unloading scripting plugins
[container]
javaOptions = -XX:MaxPermSize=1024m
31. 31
And there is more …
audit events
download commands
project and group events
message of the day
Prolog predicates
auth backends
avatars
32. 32
WHEN scripting plugins will be included in Gerrit ?
Hackathon #6
24-26th March we will keep
on hacking on Gerrit
MISSION:
improve, stabilise and
merge scripting plugins into
Gerrit master !
TARGET VERSION:
Gerrit Ver. 2.10 (?)
34. Try it on-line (with scripting): http://gerrithub.io/login
Read the Gerrit book: http://gerrithub.io/book
Keep in touch: http://gitenterprise.me
Learn more about Gerrit with
20% OFF Book discount for
Gerrit User Summit 2014
Book PROMO-CODE: LGCRB20
eBook PROMO-CODE: LGCReB20