All Projects → cloudogu → Jenkinsfiles

cloudogu / Jenkinsfiles

Licence: mit
Examples for jenkins pipelines, comparing scripted and declarative syntax

Projects that are alternatives of or similar to Jenkinsfiles

Docker For All
Docker applied in development, devops, testing, product management etc.
Stars: ✭ 88 (-52.94%)
Mutual labels:  sonarqube, jenkins, continuous-delivery
Dashboard
📺 Create your own team dashboard with custom widgets. Built with Next.js, React, styled-components and polished.
Stars: ✭ 1,007 (+438.5%)
Mutual labels:  sonarqube, jenkins
Bzppx Codepub
暴走皮皮虾之代码发布系统,是现代的持续集成发布系统,由后台管理系统和agent两部分组成,一个运行着的agent就是一个节点,本系统并不是造轮子,是"鸟枪"到"大炮"的创新,对"前朝遗老"的革命.
Stars: ✭ 471 (+151.87%)
Mutual labels:  jenkins, continuous-delivery
Fabric8 Platform
Generates the distribution of the fabric8 microservices platform
Stars: ✭ 105 (-43.85%)
Mutual labels:  jenkins, continuous-delivery
Ccmenu
CCMenu is a Mac application to monitor continuous integration servers.
Stars: ✭ 306 (+63.64%)
Mutual labels:  jenkins, continuous-delivery
Jenkins
Jenkins automation server
Stars: ✭ 18,225 (+9645.99%)
Mutual labels:  jenkins, continuous-delivery
Jenkins Pipeline
📈 Learn how to implement container technologies with your Jenkins CI/CD workflows to make them easier to manage in this tutorial.
Stars: ✭ 83 (-55.61%)
Mutual labels:  jenkins, continuous-delivery
cloud-s4-sdk-pipeline-docker
The Cloud SDK continuous delivery infrastructure makes heavy use of docker images. This are the docker sources of these images.
Stars: ✭ 13 (-93.05%)
Mutual labels:  jenkins, continuous-delivery
Zebrunner
Zebrunner is a Test Automation Management Tool
Stars: ✭ 131 (-29.95%)
Mutual labels:  sonarqube, jenkins
Nevergreen
🐤 A build monitor with attitude
Stars: ✭ 170 (-9.09%)
Mutual labels:  jenkins, continuous-delivery
Cdeasy
Continuous Delivery made Easy ;)
Stars: ✭ 143 (-23.53%)
Mutual labels:  jenkins, continuous-delivery
2021-nolto
부담없이 자랑하는 작고 소중한 내 프로젝트 🧸✨
Stars: ✭ 34 (-81.82%)
Mutual labels:  jenkins, sonarqube
Android-CICD
This repo demonstrates how to work on CI/CD for Mobile Apps 📱 using Github Actions 💊 + Firebase Distribution 🎉
Stars: ✭ 37 (-80.21%)
Mutual labels:  continuous-delivery, sonarqube
Jx
Jenkins X provides automated CI+CD for Kubernetes with Preview Environments on Pull Requests using Cloud Native pipelines from Tekton
Stars: ✭ 4,041 (+2060.96%)
Mutual labels:  jenkins, continuous-delivery
updatebot
a simple bot for updating dependencies in source code
Stars: ✭ 30 (-83.96%)
Mutual labels:  jenkins, continuous-delivery
Springcloudfeign
基于Gitlab + Jenkins + Harbor + Sonarqube + Docker + Kubernetes 完成可持续集成与可持续交付解决方案
Stars: ✭ 149 (-20.32%)
Mutual labels:  sonarqube, jenkins
buildserver
Multiplatform development environment with Vagrant and Ansible
Stars: ✭ 18 (-90.37%)
Mutual labels:  jenkins, sonarqube
docker
collection of docker / docker-compose files, dind, gitlab, jenkins, mongo, mysql, oracle, rabbitmq, redis, sonarqube
Stars: ✭ 25 (-86.63%)
Mutual labels:  jenkins, sonarqube
Delivery Pipeline Plugin
Jenkins plugin for pipeline visualisation, perfect for Continuous Delivery
Stars: ✭ 122 (-34.76%)
Mutual labels:  jenkins, continuous-delivery
Fabric8
fabric8 is an open source microservices platform based on Docker, Kubernetes and Jenkins
Stars: ✭ 1,783 (+853.48%)
Mutual labels:  jenkins, continuous-delivery

cloudogu/jenkinsfiles

This project contains examples for the Jenkins pipeline plugin, comparing both declarative and scripted syntax.

The examples were developed while working on an article series called Coding Continuous Delivery published in Java aktuell. Both English translation and German original can be found on the Cloudogu Blog.

01/2018 (covering examples on branches 1 to 5)
🇬🇧 Jenkins pipeline plugin basics
🇩🇪 Grundlagen des Jenkins-Pipeline-Plug-ins
02/2018 (covering examples on branches 6 and 7)
🇬🇧 Performance optimization for the Jenkins Pipeline
🇩🇪 Performance Optimierung für die Jenkins Pipeline
03/2018 (covering examples on branches 8 and 9)
🇬🇧 Helpful Tools for the Jenkins Pipeline
🇩🇪 Hilfreiche Werkzeuge für die Jenkins Pipeline
04/2018 (covering examples on branches 10 and 11)
🇬🇧 Statical Code Analysis with SonarQube and deployment to Kubernetes et al. with Jenkins Pipelines
🇩🇪 Statische Code Analyse mit SonarQube und Deployment auf Kubernetes et al. mit Jenkins Pipelines

The project being built by the pipeline examples is wildfly/quickstart/kitchensink, a typical JEE web app basing on CDI, JSF, JPA, EJB, JAX-RS and integration tests with arquillian. It was extended slightly to allow for running integration tests using WildFly Swarm and (in branch 11-x) to provide its version name via REST.

The pipeline examples are built on top of each other, each in declarative and scripted syntax, respectively. Each example is put on a separate branches for convenient access.

Please see our Jenkins Instance for build results.

The following aspects are covered by the examples:

  1. A simple pipeline (declarative | scripted)
  2. Improving maintainability by introducing custom steps (declarative | scripted)
  3. Division into smaller stages (declarative | scripted)
  4. End of pipeline a Handling failures (declarative | scripted)
    b Simplified Mailing (declarative | scripted)
  5. Archive and Properties/Options (declarative | scripted)
  6. Parallel (declarative | scripted)
  7. Time Triggered Builds (e.g. nightly) (declarative | scripted)
  8. Shared libraries (declarative | scripted | shared library)
  9. Docker
    a Run whole pipeline inside a Docker container (declarative | scripted)
    b Using Docker inside a custom step (implemented in shared library) (declarative | scripted | shared library)
  10. Statical code analysis with SonarQube
    a check quality gate outside of node (as shown within the docs) (declarative | scripted)
    b analysis and quality gate within one stage (pragmatic, easier to maintain) (declarative | scripted)
  11. Plain Deployment to Kubernetes (declarative | scripted)
  12. Deployment to Kubernetes using Helm (declarative (TODO) | scripted)

Jenkins Setup

All examples (obviously) need the Jenkins Pipeline plugin installed. It has been part of the Jenkins default plugins for quite some time.

8. Shared libraries

Starting with branch 8, the Pipeline: GitHub Groovy Libraries plugin is needed so the libraries are loaded out of the box. It is also one of the Jenkins default plugins.

9. Docker

Branch 9 and up require the Docker Pipeline plugin (installed by default) and only run on workers that have a working docker client (docker binary on the PATH). In order to distinguish this workers from others, they provide a docker label.

10. SonarQube

From branch 10 the SonarQube Scanner plugin and a SonarQube instance sonarcloud.io set up in Jenkins. In addition, in SonarQube, a webhook to https://JENKINS/sonarqube-webhook must be configured.

Before Jenkins is able to analyse the branches a first analysis has to be done (e.g. from your developer machine) analysis, e.g. like so

mvn clean install -Pjenkins -DskipITs
mvn sonar:sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=<SECURITY TOKEN> -Dsonar.organization=<YOUR-ORG-KEY>

If you want the quality gate to fail (for showcases), one option is to analyse one of the 10a branches but remove the class Untested before.

11. Kubernetes

In order to deploy to Kubernetes the examples in the 11-x-branches require the Kubernetes Continuous Deploy plugin. The following must be executed (from one of the 11-x-branches) before the build can succeed.

kubectl apply -f k8s/namespace.yaml
kubectl apply --namespace jenkins-ns -f k8s/service.yaml,k8s/serviceaccount.yaml
k8s/create-kubeconfig jenkins-sa --namespace=jenkins-ns > jenkins.kubeconfig

Then, add the jenkins.kubeconfig as Jenkins file credential, called kubeconfig-oss-deployer.
Finally, add a Username and Password credential called hub.docker.com-cesmarvin (e.g. on GCR, the user is _json_key and the password is the a JSON in single quotes with line breaks removed - cat account.json). and change the image name to match your registry.

Jenkins Build status

Branch Declarative Scripted Library/SQ
1. Simple pipeline Build Status Build Status
2. Custom steps Build Status Build Status
3. Smaller Stages Build Status Build Status
4a Handling failures Build Status Build Status
4b Simplified Mailing Build Status Build Status
5. Archive and Properties/Options Build Status Build Status
6. Parallel Build Status Build Status
7. Time Triggered Builds Build Status Build Status
8. Shared libraries Build Status Build Status Build Status
9a Docker (whole pipeline in container) Build Status Build Status
9b Docker (inside custom step) Build Status Build Status Build Status
10a SonarQube (as shown in docs) Build Status
See SQ!
Build Status
See SQ!
SonarQube Badge
10b SonarQube (pragmatic) Build Status
See SQ!
Build Status
See SQ!
SonarQube Badge
11. Kubernetes (plain) Build Status Build Status
12. Kubernetes (Helm) - Build Status

Further resources

Jenkinsfiles

Shared libraries

A collection of shared libraries to be used as reference.

Others

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].