![Page 1: Continuous delivery w projekcie open source - Marcin Stachniuk](https://reader031.vdocuments.us/reader031/viewer/2022022200/58a2d4641a28ab692e8b5a33/html5/thumbnails/1.jpg)
Continuous Delivery w projekcie Open SourceMarcin Stachniuk@[email protected]
KARIERA IT | WROCŁAW 11.02.2017
![Page 2: Continuous delivery w projekcie open source - Marcin Stachniuk](https://reader031.vdocuments.us/reader031/viewer/2022022200/58a2d4641a28ab692e8b5a33/html5/thumbnails/2.jpg)
Agenda
● Introduction● Build Pipeline● Continuous Integration● Continuous Delivery● Code Quality● Nice Badges● Promotion in the Internet● Alternatives
![Page 3: Continuous delivery w projekcie open source - Marcin Stachniuk](https://reader031.vdocuments.us/reader031/viewer/2022022200/58a2d4641a28ab692e8b5a33/html5/thumbnails/3.jpg)
Introduction
![Page 4: Continuous delivery w projekcie open source - Marcin Stachniuk](https://reader031.vdocuments.us/reader031/viewer/2022022200/58a2d4641a28ab692e8b5a33/html5/thumbnails/4.jpg)
Continuous Delivery Vs. Continuous Deployment
![Page 5: Continuous delivery w projekcie open source - Marcin Stachniuk](https://reader031.vdocuments.us/reader031/viewer/2022022200/58a2d4641a28ab692e8b5a33/html5/thumbnails/5.jpg)
Continuous Delivery Vs. Continuous Deployment
https://puppet.com/blog/continuous-delivery-vs-continuous-deployment-what-s-diff
![Page 6: Continuous delivery w projekcie open source - Marcin Stachniuk](https://reader031.vdocuments.us/reader031/viewer/2022022200/58a2d4641a28ab692e8b5a33/html5/thumbnails/6.jpg)
Inspiration
JDD2014: Continuous Delivery: Capitalizing High Quality Automated Tests (Sz. Faber)
https://www.youtube.com/watch?v=Lda4RuQDQN0
![Page 7: Continuous delivery w projekcie open source - Marcin Stachniuk](https://reader031.vdocuments.us/reader031/viewer/2022022200/58a2d4641a28ab692e8b5a33/html5/thumbnails/7.jpg)
Java Platform Standard Edition 8 Documentation
https://docs.oracle.com/javase/8/docs/
![Page 8: Continuous delivery w projekcie open source - Marcin Stachniuk](https://reader031.vdocuments.us/reader031/viewer/2022022200/58a2d4641a28ab692e8b5a33/html5/thumbnails/8.jpg)
Java Platform Tutorial: Swing
https://docs.oracle.com/javase/tutorial/uiswing/components/text.html
![Page 9: Continuous delivery w projekcie open source - Marcin Stachniuk](https://reader031.vdocuments.us/reader031/viewer/2022022200/58a2d4641a28ab692e8b5a33/html5/thumbnails/9.jpg)
My Open Source Software
https://github.com/Roche/IceBoar
![Page 10: Continuous delivery w projekcie open source - Marcin Stachniuk](https://reader031.vdocuments.us/reader031/viewer/2022022200/58a2d4641a28ab692e8b5a33/html5/thumbnails/10.jpg)
Build Pipeline
![Page 11: Continuous delivery w projekcie open source - Marcin Stachniuk](https://reader031.vdocuments.us/reader031/viewer/2022022200/58a2d4641a28ab692e8b5a33/html5/thumbnails/11.jpg)
Continuous Delivery
</>
![Page 12: Continuous delivery w projekcie open source - Marcin Stachniuk](https://reader031.vdocuments.us/reader031/viewer/2022022200/58a2d4641a28ab692e8b5a33/html5/thumbnails/12.jpg)
Continuous Delivery
</>
code
github.io
github.com travis-ci.org
codecov.io
bintray.com
oss.jfrog.org
search.maven.org
![Page 13: Continuous delivery w projekcie open source - Marcin Stachniuk](https://reader031.vdocuments.us/reader031/viewer/2022022200/58a2d4641a28ab692e8b5a33/html5/thumbnails/13.jpg)
Continuous Delivery
</>
![Page 14: Continuous delivery w projekcie open source - Marcin Stachniuk](https://reader031.vdocuments.us/reader031/viewer/2022022200/58a2d4641a28ab692e8b5a33/html5/thumbnails/14.jpg)
Continuous Delivery
</>
1 git push
![Page 15: Continuous delivery w projekcie open source - Marcin Stachniuk](https://reader031.vdocuments.us/reader031/viewer/2022022200/58a2d4641a28ab692e8b5a33/html5/thumbnails/15.jpg)
Continuous Delivery
</>
1 git push
2 webhookbuild
![Page 16: Continuous delivery w projekcie open source - Marcin Stachniuk](https://reader031.vdocuments.us/reader031/viewer/2022022200/58a2d4641a28ab692e8b5a33/html5/thumbnails/16.jpg)
Continuous Delivery
</>
1 git push
2 webhookbuild
3 deploy
release
snapshot
![Page 17: Continuous delivery w projekcie open source - Marcin Stachniuk](https://reader031.vdocuments.us/reader031/viewer/2022022200/58a2d4641a28ab692e8b5a33/html5/thumbnails/17.jpg)
Continuous Delivery
</>
1 git push
2 webhookbuild
3 deploy
release
snapshot
4 commit to
gh-pages
![Page 18: Continuous delivery w projekcie open source - Marcin Stachniuk](https://reader031.vdocuments.us/reader031/viewer/2022022200/58a2d4641a28ab692e8b5a33/html5/thumbnails/18.jpg)
Continuous Delivery
</>
1 git push
2 webhookbuild
3 deploy
release
snapshot
4 commit to
gh-pages
5 updategh-pages
![Page 19: Continuous delivery w projekcie open source - Marcin Stachniuk](https://reader031.vdocuments.us/reader031/viewer/2022022200/58a2d4641a28ab692e8b5a33/html5/thumbnails/19.jpg)
Continuous Delivery
</>
1 git push
2 webhookbuild
3 deploy
release
snapshot
6 code coverage
4 commit to
gh-pages
5 updategh-pages
![Page 20: Continuous delivery w projekcie open source - Marcin Stachniuk](https://reader031.vdocuments.us/reader031/viewer/2022022200/58a2d4641a28ab692e8b5a33/html5/thumbnails/20.jpg)
Continuous Delivery
</>
1 git push
2 webhookbuild
3 deploy
release
snapshot
6 code coverage
7 sing & publish(manual)
4 commit to
gh-pages
5 updategh-pages
![Page 21: Continuous delivery w projekcie open source - Marcin Stachniuk](https://reader031.vdocuments.us/reader031/viewer/2022022200/58a2d4641a28ab692e8b5a33/html5/thumbnails/21.jpg)
Continuous Delivery Deployment
</>
1 git push
2 webhookbuild
3 deploy
release
snapshot
6 code coverage
7 sing & publish(manual)
4 commit to
gh-pages
5 updategh-pages
7 sing & publishauto
not implementeddream
![Page 22: Continuous delivery w projekcie open source - Marcin Stachniuk](https://reader031.vdocuments.us/reader031/viewer/2022022200/58a2d4641a28ab692e8b5a33/html5/thumbnails/22.jpg)
Continuous Integration
![Page 23: Continuous delivery w projekcie open source - Marcin Stachniuk](https://reader031.vdocuments.us/reader031/viewer/2022022200/58a2d4641a28ab692e8b5a33/html5/thumbnails/23.jpg)
Continuous Integration
https://travis-ci.org● Free for Open Source Projects● Easy setup with GitHub● Container base architecture (Doker)● Stateless
![Page 24: Continuous delivery w projekcie open source - Marcin Stachniuk](https://reader031.vdocuments.us/reader031/viewer/2022022200/58a2d4641a28ab692e8b5a33/html5/thumbnails/24.jpg)
Continuous Integration
https://travis-ci.org● Free for Open Source Projects● Easy setup with GitHub● Container base architecture (Doker)● Stateless● Multi language support (ANDROID, C, C#, C++, CLOJURE,
CRYSTAL, D, DART, ERLANG, ELIXIR, F#, GO, GROOVY, HASKELL, HAXE, JAVA, JAVASCRIPT (WITH NODE.JS), JULIA, OBJECTIVE-C, PERL, PERL6, PHP, PYTHON, R, RUBY, RUST, SCALA, SMALLTALK, VISUAL BASIC)
● For Java: Oracle JDK 7 (default), Oracle JDK 8, OpenJDK 6, OpenJDK 7, Gradle 2.0, Maven 3.2 and Ant 1.8
● Notifications via: Slack, HipChat, Emails and more
![Page 25: Continuous delivery w projekcie open source - Marcin Stachniuk](https://reader031.vdocuments.us/reader031/viewer/2022022200/58a2d4641a28ab692e8b5a33/html5/thumbnails/25.jpg)
How to setup Travis-CI
.travis.ymllanguage: javascript: mvn clean installjdk: - oraclejdk8
● Sign travis-ci.org using GitHub account● Choose project (you need to have admin rights to this project)● Add .travis.yml to your root project folder
![Page 26: Continuous delivery w projekcie open source - Marcin Stachniuk](https://reader031.vdocuments.us/reader031/viewer/2022022200/58a2d4641a28ab692e8b5a33/html5/thumbnails/26.jpg)
Store sensitive data (passwords) on travis-ci
<settings ...>
<servers> <server> <id>bintray-stachnim-IceBoar</id> <username>${env.CI_DEPLOY_USERNAME}</username> <password>${env.CI_DEPLOY_PASSWORD}</password> </server>
settings.xml
![Page 27: Continuous delivery w projekcie open source - Marcin Stachniuk](https://reader031.vdocuments.us/reader031/viewer/2022022200/58a2d4641a28ab692e8b5a33/html5/thumbnails/27.jpg)
Store sensitive data (passwords) on travis-ci
![Page 28: Continuous delivery w projekcie open source - Marcin Stachniuk](https://reader031.vdocuments.us/reader031/viewer/2022022200/58a2d4641a28ab692e8b5a33/html5/thumbnails/28.jpg)
Store sensitive data (passwords) on travis-ci
![Page 29: Continuous delivery w projekcie open source - Marcin Stachniuk](https://reader031.vdocuments.us/reader031/viewer/2022022200/58a2d4641a28ab692e8b5a33/html5/thumbnails/29.jpg)
Current IceBoar Build
#!/bin/bashset -evif [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then
cd ice-boar && mvn clean deploy --settings …else
cd ice-boar && mvn clean install && ...fi
build-travis.sh
language: javascript: ./build-travis.shjdk: - oraclejdk8
.travis.yml
![Page 30: Continuous delivery w projekcie open source - Marcin Stachniuk](https://reader031.vdocuments.us/reader031/viewer/2022022200/58a2d4641a28ab692e8b5a33/html5/thumbnails/30.jpg)
Continuous Delivery
![Page 31: Continuous delivery w projekcie open source - Marcin Stachniuk](https://reader031.vdocuments.us/reader031/viewer/2022022200/58a2d4641a28ab692e8b5a33/html5/thumbnails/31.jpg)
Release artifact to Maven Central is not so easy
● Complicated Requirements● Hard to sign in / create account (need to find link and create an issue)● Manual verification of uploaded artifact
![Page 32: Continuous delivery w projekcie open source - Marcin Stachniuk](https://reader031.vdocuments.us/reader031/viewer/2022022200/58a2d4641a28ab692e8b5a33/html5/thumbnails/32.jpg)
Release artifact to bintray
● Sign in with GitHub● Add new package to maven repository, configure it● Deploy to bintray (from Travis-CI)● You don’t need to sign your artifact
![Page 33: Continuous delivery w projekcie open source - Marcin Stachniuk](https://reader031.vdocuments.us/reader031/viewer/2022022200/58a2d4641a28ab692e8b5a33/html5/thumbnails/33.jpg)
Bintray general repository settings
![Page 34: Continuous delivery w projekcie open source - Marcin Stachniuk](https://reader031.vdocuments.us/reader031/viewer/2022022200/58a2d4641a28ab692e8b5a33/html5/thumbnails/34.jpg)
Bintray deploy to Maven Central
● You can’t store user token password :-( ● This will be manual step :-(
![Page 35: Continuous delivery w projekcie open source - Marcin Stachniuk](https://reader031.vdocuments.us/reader031/viewer/2022022200/58a2d4641a28ab692e8b5a33/html5/thumbnails/35.jpg)
Google Developers: The Secret to Safe Continuous Deployment
https://www.youtube.com/watch?v=UMnZiTL0tUc
![Page 36: Continuous delivery w projekcie open source - Marcin Stachniuk](https://reader031.vdocuments.us/reader031/viewer/2022022200/58a2d4641a28ab692e8b5a33/html5/thumbnails/36.jpg)
Code Quality
![Page 37: Continuous delivery w projekcie open source - Marcin Stachniuk](https://reader031.vdocuments.us/reader031/viewer/2022022200/58a2d4641a28ab692e8b5a33/html5/thumbnails/37.jpg)
Code Quality with codecov.io
● Sign in codecov.io with GitHub● Configure jacoco-maven-plugin● Add to .travis.yml:
language: javascript: ./build-travis.shjdk: - oraclejdk8before_install: - pip install --user codecovafter_success: - codecov
.travis.yml
![Page 38: Continuous delivery w projekcie open source - Marcin Stachniuk](https://reader031.vdocuments.us/reader031/viewer/2022022200/58a2d4641a28ab692e8b5a33/html5/thumbnails/38.jpg)
Codecov see Code Coverage
![Page 39: Continuous delivery w projekcie open source - Marcin Stachniuk](https://reader031.vdocuments.us/reader031/viewer/2022022200/58a2d4641a28ab692e8b5a33/html5/thumbnails/39.jpg)
Codecov Extension (for Chrome) - see coverage on GitHub
https://chrome.google.com/webstore/detail/codecov-extension/
![Page 40: Continuous delivery w projekcie open source - Marcin Stachniuk](https://reader031.vdocuments.us/reader031/viewer/2022022200/58a2d4641a28ab692e8b5a33/html5/thumbnails/40.jpg)
Codecov suggestions
![Page 41: Continuous delivery w projekcie open source - Marcin Stachniuk](https://reader031.vdocuments.us/reader031/viewer/2022022200/58a2d4641a28ab692e8b5a33/html5/thumbnails/41.jpg)
Nice badges
![Page 43: Continuous delivery w projekcie open source - Marcin Stachniuk](https://reader031.vdocuments.us/reader031/viewer/2022022200/58a2d4641a28ab692e8b5a33/html5/thumbnails/43.jpg)
Promotion in the Internet
![Page 44: Continuous delivery w projekcie open source - Marcin Stachniuk](https://reader031.vdocuments.us/reader031/viewer/2022022200/58a2d4641a28ab692e8b5a33/html5/thumbnails/44.jpg)
What is important for users?
● Nice demo page with example usage: roche.github.io/IceBoar/
![Page 45: Continuous delivery w projekcie open source - Marcin Stachniuk](https://reader031.vdocuments.us/reader031/viewer/2022022200/58a2d4641a28ab692e8b5a33/html5/thumbnails/45.jpg)
What is important for users?
● Easy setup for contributors
![Page 46: Continuous delivery w projekcie open source - Marcin Stachniuk](https://reader031.vdocuments.us/reader031/viewer/2022022200/58a2d4641a28ab692e8b5a33/html5/thumbnails/46.jpg)
What is important for promotion?
● Stack Overflow: stackoverflow.com/search?q=ice+boar
![Page 47: Continuous delivery w projekcie open source - Marcin Stachniuk](https://reader031.vdocuments.us/reader031/viewer/2022022200/58a2d4641a28ab692e8b5a33/html5/thumbnails/47.jpg)
How to promote in the Internet?
● Blogposts● Another forums, groups, etc.● Hackergarten● Presentations on JUG’s and conferences
![Page 48: Continuous delivery w projekcie open source - Marcin Stachniuk](https://reader031.vdocuments.us/reader031/viewer/2022022200/58a2d4641a28ab692e8b5a33/html5/thumbnails/48.jpg)
Alternatives
![Page 49: Continuous delivery w projekcie open source - Marcin Stachniuk](https://reader031.vdocuments.us/reader031/viewer/2022022200/58a2d4641a28ab692e8b5a33/html5/thumbnails/49.jpg)
Alternatives to Travic-CI
● gitlab.com● teamcity.codebetter.com/login.html● teamcity.jetbrains.com● www.appveyor.com (for .NET)● scrutinizer-ci.com (+ code metrics)● codeship.com (run Docker’s, support for: Ruby (Rails), Node.js, PHP, Python,
Java, Go)● magnum-ci.com (+ code metrics)● circleci.com● www.visualstudio.com/en-us/products/visual-studio-team-services-vs.aspx● app.shippable.com (support for Ruby, Python, Java, Node.js, Scala, PHP,
Clojure, Go)● www.snap-ci.com (by ThoughtWorks)
![Page 50: Continuous delivery w projekcie open source - Marcin Stachniuk](https://reader031.vdocuments.us/reader031/viewer/2022022200/58a2d4641a28ab692e8b5a33/html5/thumbnails/50.jpg)
Alternatives for codecov.io
● coveralls.io● nemo.sonarqube.org (BETA - need to write an e-mail on e-mail list for account)● sonar.qatools.ru● coverity.com (for: C, C++, C#, Java)● www.codacy.com (for Scala, Ruby, Java, JavaScript, Python, Php)
![Page 51: Continuous delivery w projekcie open source - Marcin Stachniuk](https://reader031.vdocuments.us/reader031/viewer/2022022200/58a2d4641a28ab692e8b5a33/html5/thumbnails/51.jpg)
LuxLekarz - LuxMed + ZnanyLekarz
github.com/mstachniuk/LuxLekarz
![Page 52: Continuous delivery w projekcie open source - Marcin Stachniuk](https://reader031.vdocuments.us/reader031/viewer/2022022200/58a2d4641a28ab692e8b5a33/html5/thumbnails/52.jpg)
Questions
?
![Page 53: Continuous delivery w projekcie open source - Marcin Stachniuk](https://reader031.vdocuments.us/reader031/viewer/2022022200/58a2d4641a28ab692e8b5a33/html5/thumbnails/53.jpg)
Links
● https://puppet.com/blog/continuous-delivery-vs-continuous-deployment-what-s-diff Continuous Delivery Vs. Continuous Deployment: What's the Diff?
● https://www.youtube.com/watch?v=Lda4RuQDQN0 Szczepan Faber about Continuous Delivery● https://docs.oracle.com/javase/8/docs/ Java Platform Standard Edition 8 Documentation● https://github.com/Roche/IceBoar IceBoar on GitHub● https://github.com GitHub Source Code repository● https://github.io GitHub Pages● https://travis-ci.org Travis-CI Continuous Integration Server● https://codecov.io Collect your code coverage● https://bintray.com Popular repository for your artifacts (not only Jar files)● https://oss.jfrog.org Repository for OSS snapshots● https://search.maven.org The Maven Central● https://docs.travis-ci.com/user/pull-requests#Security-Restrictions-when-testing-Pull-Requests Why sometimes
PR from fork fail on Travis-Ci● http://central.sonatype.org/pages/requirements.html Requirements for release in to Maven Central● https://issues.sonatype.org Create issue for new account on Maven Central● https://www.youtube.com/watch?v=UMnZiTL0tUc Google Developers The Secret to Safe Continuous Deployment ● https://chrome.google.com/webstore/detail/codecov-extension Codecov extension (for Google Chrome)● http://shields.io Nice badges generator● https://roche.github.io/IceBoar Demo page for IceBoar● http://stackoverflow.com/search?q=ice+boar IceBoar on Stack Overflow
![Page 54: Continuous delivery w projekcie open source - Marcin Stachniuk](https://reader031.vdocuments.us/reader031/viewer/2022022200/58a2d4641a28ab692e8b5a33/html5/thumbnails/54.jpg)
Continuous Delivery w projekcie Open SourceMarcin Stachniuk@[email protected]
KARIERA IT | WROCŁAW 11.02.2017 Dzię
kuję!