Skip to content

Instantly share code, notes, and snippets.

@scollazo
Created February 23, 2017 00:55
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scollazo/05b669a0e3933097089514d3b187a018 to your computer and use it in GitHub Desktop.
Save scollazo/05b669a0e3933097089514d3b187a018 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"collapsed": true,
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"# Stop doing things by hand!\n",
"\n",
"\\#phpvigo\n",
"\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "fragment"
}
},
"source": [
"## whoami\n",
"\n",
" * santi @ collazo.eu\n",
" * Artefactual sysadmin/devops\n",
" * twitter: sntg_bofh || linkedin: scollazo || keybase: aklis\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"# Programming folklore\n",
"\n",
">99 bugs in the legacy code\n",
"\n",
">take one down, pass it around\n",
"\n",
">107 bugs in the legacy code\n",
"\n",
"> -- <cite>Unknown developer</cite>\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"# Jenkins.io\n",
"\n",
"* java -jar jenkins.war\n",
"* Plugins\n",
"* Authentication/Authorization strategies\n",
"* Master/slaves management\n",
"* ...and jobs!ppp\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"# Project types\n",
"\n",
"* Freestyle\n",
"* Pipeline (DSL)\n",
"* External\n",
"* Matrix Job\n",
"* Multijob (launches other jobs)"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "fragment"
}
},
"source": [
"## External project\n",
"\n",
"As easy as...\n",
"\n",
" export JENKINS_HOME=http://repos:thesecrepassword@jenkins-instance:8085/\n",
" java -jar /usr/local/jenkins-jars/jenkins-core*.jar \"external-project-name\" \"$@\"\n",
" \n"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": true,
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"# Fresstyle Tasks\n",
"\n",
"* General config ( name, parameters, nodes...)\n",
"* SCM \n",
"* Triggers\n",
"* Build environment\n",
"* Build steps\n",
"* Post build actions\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": true,
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"# Nodes\n",
"\n",
" * Plugins available for any cloud provider (aws/openstack/digitalocean/...)\n",
" * ssh launcher\n",
" * jar launcher\n",
" "
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"# Triggers\n",
"\n",
"* manual\n",
"* cron like\n",
"* scm poll/trigger\n",
"* cli\n",
"* rest api"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"# Build steps\n",
"\n",
"* Shell step\n",
"* Conditional step\n",
"* Build other project\n",
"* Plugin-provided: ant, cmake, virtualenv, junit, selenium..."
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"# Post build steps\n",
"\n",
"* Archive artifacts\n",
"* Notify \n",
"* Post results log\n",
"* ...or trigger other projects\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"# Real-life examples: archivematica storage-service\n",
"\n",
"* Freestyle project (problems with dsl and gh plugin)\n",
"* Triggered on new PR's (but asks for CLA before building!)\n",
"* Uses docker cloud plugin to launch the executor\n",
"* Gets code, run tests\n",
"* Updates PR with results (hook)\n",
"* [Link](http://jenkins-ci.archivematica.org/job/artefactual/job/archivematica-storage-service/)"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"# Real life example 2: qa environmen on demand\n",
"\n",
"* Triggered on demand / slack command (chatops ftw!)\n",
"* Uses ansible playbook for deployment\n",
"* It's interactive (breacking your own laws!)\n",
"* [Link](http://jenkins-ci.archivematica.org/job/QA/) [Source](https://gitlab.artefactual.com/sandbox/archivematica-ci/blob/master/jenkisfiles/Jenkinsci-storage-service-qa)\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"# Questions?\n",
"\n",
"* I have stickers!\n",
"* Ask one, get one\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": true,
"slideshow": {
"slide_type": "fragment"
}
},
"source": [
"## Thanks!"
]
}
],
"metadata": {
"celltoolbar": "Slideshow",
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.12"
}
},
"nbformat": 4,
"nbformat_minor": 1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment