Προγραμματισμός ΙΙ: Travis CI with CV template tutorial

Tools and practices: Continuous Integration

Agenda

Historically

Grady Booch in 1991 coined the term of Continuous Integration (CI) as the practice of merging all developer working copies to a shared mainline.







Kent Beck 1999 added CI as part of Extreme Programming (XP) where developers continuously integrate source code several times per day.

Importance of CI (1)

Importance of CI (2)

Importance of CI (3)

Merging without any CI tool?

Travis CI

About Travis CI

Getting started

.travis.yml

.travis.yml example

language: python
python:
- '3.5'
language: java
- oraclejdk8
sudo: required
dist: trusty
install:
- pip install "notebook==4.1" requests jupyter_cms jupyter_dashboards
addons:
  apt_packages:
  - pandoc
script: 
- python test1.py
- mvn clean install

Building Environments

Ubuntu Precise Ubuntu Trusty Ubuntu Trusty OS X
Infrastructure VM GCE Cont.EC2 VM GCE VM
.travis.yml sudo: required dist: precise sudo: false dist: trusty sudo: required dist: trusty os: osx
Boot time(s) 20-50 1-6 20-50 60-90
OS version 12.04 14.04 14.04 OSX
Memory GB 7.5 4 7.5 4
Cores ~2, bursted 2 ~2, bursted 2

Pushing a PR on GitHub (1)

Building/Testing on Travis (2)

Passed from Travis (3)

Auto-deploying workflow

Auto-deploying gh-pages with Travis (Linux distros)

Set GitHub Pages option on a repository

Enable Travis webhook

Create .travis.yml settings file.

language: python
python:
- '3.5'
sudo: required
dist: trusty
install:
- sudo apt-get install texlive-xetex texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended texlive-context
- pip install "notebook==4.1" requests jupyter_cms jupyter_dashboards
addons:
  apt_packages:
  - pandoc
script: bash tools/travis-deploy.sh
env:
  global:
  - ENCRYPTION_LABEL: b88dab5c5665
  - COMMIT_AUTHOR_EMAIL: stefanos1316@gmail.com

Generate SSH key and encrypt the private key (1)

Generate SSH key and encrypt the private key (2)

Add Pub Key on GitHub (1)

Add Pub Key on GitHub (2)

Add Pub Key on GitHub (3)

Scripts

Push to GitHub and experience the magic

Thank you for your attention!!!


Creative Commons Licence
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.