Continuous Integration & Code Quality MINDS-ON NUNO 11 APRIL 2017

Similar documents
JetBrains TeamCity Comparison

TM DevOps Use Case TechMinfy All Rights Reserved

TM DevOps Use Case. 2017TechMinfy All Rights Reserved

ThinkPalm s BreakThrough DevOps Capabilities ThinkPalm

What is JIRA? software development tool. planning and tracking the projects progress and supporting the team collaboration

TM DevOps Use Case. 2017TechMinfy All Rights Reserved

Continuous Integration and Deployment (CI/CD)


We re redefining Software Quality

Oracle Cloud Using Oracle Developer Cloud Service

TIBCO SonarQube. BusinessWorks 6.x Plugin.

Index. Bitwise operations, 131. Cloud, 88, 101

Continuous Integration (CI) with Jenkins

Lab 5 Exercise Build and continuous integration tools

CONTINUOUS DELIVERY IN THE ORACLE CLOUD

Azure DevOps. Randy Pagels Intelligent Cloud Technical Specialist Great Lakes Region

Skyhook designs and deploys high performance mobile location solutions, and exists to make location faster, more precise and practical.

1 Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Continuous Integration INRIA

Manual Testing. Software Development Life Cycle. Verification. Mobile Testing

G, H I, J K, L. Git distributed version control system, 67 repository, 67 TFS, 68 GitFlow, 76 77

ARES: AUTOMATIC RELEASE SERVICE

DevNet Workshop-Hands-on with CloudCenter and Jenkins

Was gibt es Neues Better Team Work with Cloud

ONAP Developer Typical Setup 2017 July ONAP Virtual Developers Event

Continuous Integration, Continuous Deployment and Continuous Testing by HP Codar using ALM and Jenkins

EDA Spring, Project Guidelines

USING GIT FOR AUTOMATION AND COLLABORATION JUSTIN ELLIOTT - MATT HANSEN PENN STATE UNIVERSITY

Your Engineering Excellency

Using the vrealize Orchestrator Operations Client. vrealize Orchestrator 7.5

How to set up a continuous integration process in the cloud

Zephyr Cloud for HipChat

Who Moved My Module? 1

DevOps Using VSTS and Azure

Introduction: Manual Testing :

Continuous Integration / Continuous Testing

Belle II - Git migration

Continuous Integration with Jenkins

Team Foundation Consulting. Training. Team Member Training User training designed to cater for specific roles within your team. Developer TFVC / Git

.NET C# C++ JavaScript PHP Python Node.js R Cordova Unity Java Perl

Treating Deployments as Code with Puppet and the Atlassian Toolsuite Puppet Camp, Geneva

Simplified CICD with Jenkins and Git on the ZeroStack Platform

FROM VSTS TO AZURE DEVOPS

Lab 03 Finish and Deploy an Application. Lab 3-1: Add DELETE to the Spring Boot REST Application

Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 13

JIRA Studio Use Cases and Tutorial basis

Achieving Continuous Delivery - Micro Services. - Vikram Gadang

Seven Habits of Highly Effective Jenkins Users. Andrew Bayer Cloudera OSCON Java 2011

DEVOPS COURSE CONTENT

How to export custom PDF documents from Jira issues and dashboards in zero time

Turbo boost your digital app test automation with Jenkins

Bitte decken Sie die schraffierte Fläche mit einem Bild ab. Please cover the shaded area with a picture. (24,4 x 7,6 cm)

About the Tutorial. Audience. Prerequisites. Disclaimer & Copyright. Jenkins

Both Sides Now: DevOps and Agile in Oracle Developer Cloud Service for Fusion Middleware Developers

Index. Wouter de Kort 2016 W. de Kort, DevOps on the Microsoft Stack, DOI /

LGTM Enterprise System Requirements. Release , August 2018

Tutorial - Creating a project template

Continuous Integration using Docker & Jenkins

Oracle Code Day Hands On Labs (HOL) (Install, Repository, Local Deploy, DevCS, OACCS)

Jenkins User Conference Israel. #jenkinsconf. CI / Liveperson. Gidi Samuels. July 16, #jenkinsconf

How Can Testing Teams Play a Key Role in DevOps Adoption?

Distributed CI: Scaling Jenkins on Mesos and Marathon. Roger Ignazio Puppet Labs, Inc. MesosCon 2015 Seattle, WA

Introduction. Martin Ledvinka. Winter Term 2018

Shift Left Testing: are you ready? Live Webinar, Sept 19

Why switch exist-db from Ant to Maven?

Deep Dive on AWS CodeStar

WeChat Adobe Campaign Integration - User Guide

We are ready to serve Latest Testing Trends, Are you ready to learn?? New Batches Info

SOCCI Training. SOCCI: Science Operations Configuration Control Infrastructure. Vicente Navarro Fernando Perez Kaarel Hanson Kaarel Lumi

Sunil Shah SECURE, FLEXIBLE CONTINUOUS DELIVERY PIPELINES WITH GITLAB AND DC/OS Mesosphere, Inc. All Rights Reserved.

Seven Habits of Highly Effective Jenkins Users

Tools for the programming mid-semester projects

How We Learned To Love Test Automation for Localization AUTOMATED TESTS

Unable To The Artifact From Any Repository Maven-clean-plugin

24 th Annual Research Review

Git Basi, workflow e concetti avanzati (pt2)

AppFactory User Guide

How to Build an Appium Continuous Testing Pipeline

GETTING TO KNOW GIT: PART II JUSTIN ELLIOTT PENN STATE UNIVERSITY

Gaurav Rai Mazra. Senior Software Developer

Netflix OSS Spinnaker on the AWS Cloud

Managing your Agile ALM Process with JasForge OSLC Forge and Lyo SDK DJAAFAR Karim

Large-Scale Automation with Jenkins

Operations Orchestration 10.x Flow Authoring (OO220)

SpiraTeam Feature Comparison

AALOK INSTITUTE. DevOps Training

vrealize Code Stream Trigger for Git

Exam C IBM Cloud Platform Application Development v2 Sample Test

Technical Debt Reduction Using a Game Theoretic Competitive Source Control Approach

Google Cloud Platform for Systems Operations Professionals (CPO200) Course Agenda

JenkinsPipelineUnit. Test your Continuous Delivery Pipeline. Ozan Gunalp - Emmanuel Quincerot

#jenkinsconf. Jenkins user plugin. This time it's. Jenkins User Conference Israel. Shiran JFrog

StreamSets Control Hub Installation Guide

Adobe Experience Manager

IKAN ALM Architecture. Closing the Gap Enterprise-wide Application Lifecycle Management

Sample Spark Web-App. Overview. Prerequisites

Jira Permission Scheme Per Issue Type >>>CLICK HERE<<<

BUILD AND DEPLOY ORACLE SERVICE BUS PROJECTS FROM ORACLE DEVELOPER CLOUD SERVICE TO ORACLE SOA CLOUD SERVICE USING THE ORACLE SERVICE BUS PLUG-IN

Sonatype CLM - Release Notes. Sonatype CLM - Release Notes

Jenkins: AMPLab s Friendly Butler. He will build your projects so you don t have to!

Transcription:

Continuous Integration & Code Quality MINDS-ON NUNO BETTENCOURT (NMB@ISEP.IPP.PT) @DEI, 11 APRIL 2017

Continuous Integration - THE THEORY - NMB@DEI - 11 April, 2017 CONTINUOUS INTEGRATION & SOFTWARE QUALITY 2

Standard Software Development Individual code development Minimum code overlap Individuals focus on their part of the code Integration is performed manually Functional testing is achieved by means of manual procedures to ensure application is running NMB@DEI - 11 April, 2017 CONTINUOUS INTEGRATION & SOFTWARE QUALITY 3

Continuous Software Development [1] Continuous Integration Continuously add new code commits Unit Testing & possibly Integration Testing LAPR2, 3, 4 Continuous testing Manual exploratory tests User acceptance testing ODSOFT Continuous delivery Functional Testing Regression Testing Pre-Generated Acceptance Tests Stage Environment ODSOFT Continuous deployment Production Environment Web & App Development? NMB@DEI - 11 April, 2017 CONTINUOUS INTEGRATION & SOFTWARE QUALITY 4

Continuous Integration - THE TOOLS - NMB@DEI - 11 April, 2017 CONTINUOUS INTEGRATION & SOFTWARE QUALITY 5

Basic Configuration NMB@DEI - 11 April, 2017 CONTINUOUS INTEGRATION & SOFTWARE QUALITY 6

Continuous Integration - THE VERSION CONTROL SYSTEM- NMB@DEI - 11 April, 2017 CONTINUOUS INTEGRATION & SOFTWARE QUALITY 7

Git Repository [2] It is a distributed version/revision control system Focus on Data integrity Works in a Distributed Manner Allows non-linear workflows Centralized Workflow Feature Branch Workflow Gitflow Workflow Forking Workflow NMB@DEI - 11 April, 2017 CONTINUOUS INTEGRATION & SOFTWARE QUALITY 8

Bitbucket [3] (i) Team Big groups of users and repositories Examples lei-isep, mei-isep, dei-isep Allows group definition of classes or students groups Examples LAPR2-2016-TEACHERS LAPR4-2016-2DA LAPR4-2016-TEACHERS Project Dynamic groups of projects One for each course edition, containing all students repositories Examples LAPR2-2016, LAPR3-2016 Repository Git Repositories Example: LAPR2-2016-G001, LAPR4-2016-2DA NMB@DEI - 11 April, 2017 CONTINUOUS INTEGRATION & SOFTWARE QUALITY 9

Bitbucket (ii) Cloud Hosted https://bitbucket.org/ - Secure Project Template Group projects are forked from this one Forks must be performed MANUALLY for each group Users are added to repositories automatically Using REST API through a Jenkins Job using a Gradle script Future Work Automatically fork repositories based on a repository template Optimize Jenkins Job to automatically adds users to repositories NMB@DEI - 11 April, 2017 CONTINUOUS INTEGRATION & SOFTWARE QUALITY 10

Bitbucket: Setup Workflow Create a Project for the Course Create a Template Git Repository and add it to the Project Configure teachers permissions Fork the Template Repository for each group/class Configure students permissions NMB@DEI - 11 April, 2017 CONTINUOUS INTEGRATION & SOFTWARE QUALITY 11

Continuous Integration - THE DEVELOPMENT PC - NMB@DEI - 11 April, 2017 CONTINUOUS INTEGRATION & SOFTWARE QUALITY 12

Development PC Java Development Kit JDK8 Favourite IDE NetBeans Eclipse IntelliJ Idea Normally included in any IDE Maven Client Git Client Browser Jenkins SonarQube HipChat Maven Repository HipChat Client Optional Git Client TortoiseGit, SourceTree, IDE Embedded NMB@DEI - 11 April, 2017 CONTINUOUS INTEGRATION & SOFTWARE QUALITY 13

Apache Maven It is a software project management tool to manage a project's build, reporting and documentation Project Object Model (POM) Build Lifecycle validate - validate the project is correct compile - compile the source code test - test the compiled source code using unit testing framework package - package the compiled code in its distributable format e.g. JAR.. Maven Repository https://mvnrepository.com NMB@DEI - 11 April, 2017 CONTINUOUS INTEGRATION & SOFTWARE QUALITY 14

Continuous Integration - THE INTEGRATION SERVER - NMB@DEI - 11 April, 2017 CONTINUOUS INTEGRATION & SOFTWARE QUALITY 15

Jenkins DEI Hosted https://jenkins.dei.isep.ipp.pt Secure, yet with self-signed certificate Allows the configuration of Jobs Each Job performs a set of pre-defined automatic tasks Maven tasks, Shell scripts, etc. Users are manually configured in Jenkins Users and permissions are manually configured for each Jenkins Job Future Work Automatically configure new users in Jenkins Automatically configure Jenkins Jobs users and permissions NMB@DEI - 11 April, 2017 CONTINUOUS INTEGRATION & SOFTWARE QUALITY 16

Jenkins Plugins Most relevant plugins for this setup Bitbucket Build Status Notifier Plugin Bitbucket Plugin Hipchat Plugin SonarQube Scanner for Jenkins PIT Mutation Plugin NMB@DEI - 11 April, 2017 CONTINUOUS INTEGRATION & SOFTWARE QUALITY 17

Jenkins: Setup Workflow Create a Jenkins Template Job Configure Bitbucket Repository Configure Bitbucket Notify Build Status Configure Teachers permissions Configure SonarQube Configure build process Maven Build Maven Test Maven SonarQube Scanner Duplicate the Template Job for each group Configure HipChat Notifications Configure Students permissions Future Work Automate HipChat Notifications configurations NMB@DEI - 11 April, 2017 CONTINUOUS INTEGRATION & SOFTWARE QUALITY 18

Continuous Integration - THE INTEGRATION PROCESS - NMB@DEI - 11 April, 2017 CONTINUOUS INTEGRATION & SOFTWARE QUALITY 19

Bitbucket <-> Jenkins On Bitbucket For each Git Repository configure a Jenkins WebHook https://jenkins.dei.isep.ipp.pt/bitbucket-hook/ Must skip certificate verification, because Jenkins@DEI uses a self-signed certificate Trigger: Repository Push MANUALLY configured for each repository Configure an SSH access for Jenkins to access the repository On Jenkins Add SSH credentials to access Bitbucket s Git Repositories Future Work Automatic Webhook configuration tool Add a valid certificate to Jenkins NMB@DEI - 11 April, 2017 CONTINUOUS INTEGRATION & SOFTWARE QUALITY 20

Workflow NMB@DEI - 11 April, 2017 CONTINUOUS INTEGRATION & SOFTWARE QUALITY 21

Code Quality - THE THEORY - NMB@DEI - 11 April, 2017 CONTINUOUS INTEGRATION & SOFTWARE QUALITY 22

Code Quality Software Functional Quality reflects how well the code complies with or conforms to a given design based on functional requirements or specifications Software structural quality refers to how it meets non-functional requirements that support the delivery of the functional requirements e.g. robustness, maintainability, complexity, etc. the degree to which the software was produced correctly NMB@DEI - 11 April, 2017 CONTINUOUS INTEGRATION & SOFTWARE QUALITY 23

Code Quality - THE TOOLS - NMB@DEI - 11 April, 2017 CONTINUOUS INTEGRATION & SOFTWARE QUALITY 24

Code Quality: Basic Configuration NMB@DEI - 11 April, 2017 CONTINUOUS INTEGRATION & SOFTWARE QUALITY 25

Code Analysis Unit Testing & PIT Mutation Testing Coverage Static Code Analysis Code Analysers PMD CheckStyle FindBugs Code Duplication Complexity Documentation NMB@DEI - 11 April, 2017 CONTINUOUS INTEGRATION & SOFTWARE QUALITY 26

SonarQube DEI Hosted https://sonarqube.dei.isep.ipp.pt Secure, yet with self-signed certificate Dashboards Technical Debt Code Coverage Code Duplication Issues Quality Gate Code Structure PIT Mutation Testing NMB@DEI - 11 April, 2017 CONTINUOUS INTEGRATION & SOFTWARE QUALITY 27

SonarQube Plugins C# CheckStyle Cobertura FindBugs GIT Jira JAVA JavaScript PMD SVN PIT NMB@DEI - 11 April, 2017 CONTINUOUS INTEGRATION & SOFTWARE QUALITY 28

SonarQube: Setup Workflow Create one Project for each Jenkins Job Preferably with the same name For each repository configure users permissions Students should be configured as a group Teachers should be configured as a group Configure the students and teachers group access to the project by adding them Browse, See Source Code, Administer Issues and Execute Analysis permissions Configure exclusion rules (e.g. Code Coverage on UI) Future Work Solve a bug in the workflow that requires to manually add each group Improve the current Excel/SQL scripts generator tool NMB@DEI - 11 April, 2017 CONTINUOUS INTEGRATION & SOFTWARE QUALITY 29

Workflow LAPR2, 3 NMB@DEI - 11 April, 2017 CONTINUOUS INTEGRATION & SOFTWARE QUALITY 30

Issue Management - THE TOOLS - NMB@DEI - 11 April, 2017 CONTINUOUS INTEGRATION & SOFTWARE QUALITY 31

Jira DEI Hosted http://jira.dei.isep.ipp.pt:8080 Insecure: Lacks HTTPs, passwords sent in clear text over insecure network (e.g. ISEPWLAN) Issue Management When used in combination with Agile (Scrum), each issue describes a User Story Each Issue is given a unique identifying token Allows the tracking of code changes to solve an issue By using the token in the commit message NMB@DEI - 11 April, 2017 CONTINUOUS INTEGRATION & SOFTWARE QUALITY 32

Workflow LAPR4 NMB@DEI - 11 April, 2017 CONTINUOUS INTEGRATION & SOFTWARE QUALITY 33

Notifications & Teamwork - THE TOOLS - NMB@DEI - 11 April, 2017 CONTINUOUS INTEGRATION & SOFTWARE QUALITY 34

Hipchat Cloud Hosted https://www.hipchat.com Secure Each group is assigned a room Rooms are manually created Users are manually added to rooms Jenkins build Notifications Success Failed Future Work Automatic creation of rooms Automatically adding users to rooms NMB@DEI - 11 April, 2017 CONTINUOUS INTEGRATION & SOFTWARE QUALITY 35

Bitbucket Notifications Build Notifications for Repositories NMB@DEI - 11 April, 2017 CONTINUOUS INTEGRATION & SOFTWARE QUALITY 36

Workflow LAPR 4, CDIO-IL NMB@DEI - 11 April, 2017 CONTINUOUS INTEGRATION & SOFTWARE QUALITY 37

There s more GitInspector Dependency Structure Matrix (DSM) Code Review... NMB@DEI - 11 April, 2017 CONTINUOUS INTEGRATION & SOFTWARE QUALITY 38

Questions? NMB@DEI - 11 April, 2017 CONTINUOUS INTEGRATION & SOFTWARE QUALITY 39

References 1 - http://searchsoftwarequality.techtarget.com/definition/continuous- Software-Development 2 - https://en.wikipedia.org/wiki/git NMB@DEI - 11 April, 2017 CONTINUOUS INTEGRATION & SOFTWARE QUALITY 40