SlideShare une entreprise Scribd logo
1  sur  104
Télécharger pour lire hors ligne
Java Web Start czyli jak żyć z
tą dziwną technologią? &
Continuous Delivery w
projekcie Open Source
Marcin Stachniuk
@MarcinStachniuk
mstachniuk.blogspot.com
WrocJUG 04.04.2017
Agenda
● Introduction
● Build Pipeline
● Continuous Integration
● Continuous Delivery
● Code Quality
● Nice Badges
● Promotion in the Internet
● Alternatives
● Q&A
● Bonuses
● What is Java Web Start?
● How it works?
● What can goes wrong?
● Solution
● How IceBoar works?
● Benefits
● Q&A
Agenda
● Introduction
● Build Pipeline
● Continuous Integration
● Continuous Delivery
● Code Quality
● Nice Badges
● Promotion in the Internet
● Alternatives
● Q&A
● Bonuses
● What is Java Web Start?
● How it works?
● What can goes wrong?
● Solution
● How IceBoar works?
● Benefits
● Q&A
+
Java Web Start – jak żyć z tą
dziwną technologią?
Marcin Stachniuk
Java Platform Standard Edition 8 Documentation
https://docs.oracle.com/javase/8/docs/
Java Platform Tutorial: Swing
https://docs.oracle.com/javase/tutorial/uiswing/components/text.html
Example JNLP file
<?xml version="1.0" encoding="utf-8"?>
<!-- JNLP File for TextSamplerDemo -->
<jnlp
spec="1.0+"
codebase="https://docs.oracle.com/javase/tutorialJWS/samples/uiswing/TextSamplerDemoProject"
href="TextSamplerDemo.jnlp">
<information>
<title>TextSamplerDemo</title>
<vendor>The Java(tm) Tutorial</vendor>
<homepage
href="https://docs.oracle.com/javase/tutorial/uiswing/examples/components/index.html#TextSamplerDemo"/>
<description>TextSamplerDemo</description>
<description kind="short">Uses one of each of Swing's text components.</description>
<offline-allowed/>
</information>
<resources>
<j2se version="1.7+"/>
<jar href="TextSamplerDemo.jar"/>
</resources>
<application-desc main-class="components.TextSamplerDemo"/>
</jnlp>
Java Web Start Sequence Diagram
Java Web Start Sequence Diagram
click
Java Web Start Sequence Diagram
click
download
Java Web Start Sequence Diagram
click
download
run
Java Web Start Sequence Diagram
click
download
run
are you sure?
Java Web Start Sequence Diagram
click
download
run
are you sure?
download
JARs
Java Web Start Sequence Diagram
run application
on javaws
click
download
run
are you sure?
download
JARs
Java Web Start Sequence Diagram
run application
on javaws
click
download
run
are you sure?
download
JARs
What could possibly go wrong?
In JNLP: <j2se version="1.7"/> User: Java 1.8
What could possibly go wrong?
● Different Java versions installed on client machines
● Sometimes javaws wants download and install newest JRE
version
● Different behavior depends on Operating System and
installed JRE version
● From some point of time apps needs to signed (Self-signed
are blocked)
● Application started in sandbox (javaws or jp2launcher)
Problem solution
Problem solution
Problem solution
https://github.com/Roche/IceBoar
How IceBoar works?
How IceBoar works?
click
How IceBoar works?
click
download
How IceBoar works?
click
download
run
How IceBoar works?
click
download
run
are you sure?
How IceBoar works?
click
download
run
are you sure?
download
& run
How IceBoar works?
click
download
run
are you sure?
download
& run
download JRE
How IceBoar works?
click
download
run
are you sure?
download
& run
download JRE
download JARs
How IceBoar works?
click
download
run
are you sure?
download
& run
download JRE
download JARs
run on
our JRE
How IceBoar works?
click
download
run
are you sure?
download
& run
download JRE
download JARs
run on
our JRE
How IceBoar works?
click
download
run
are you sure?
download
& run
download JRE
download JARs
run on
our JRE
Demo
Profits
● We know a target JVM version
● Application start outside a sandbox (java instead of
javaws)
● We sign only IceBoar jar
● Users don’t needs admin rights to install JRE
How to introduce IceBoar into a project?
<dependency>
<groupId>com.roche</groupId>
<artifactId>ice-boar</artifactId>
<version>${project.version}</version>
<classifier>jar-with-dependencies</classifier>
</dependency>
How to introduce IceBoar into a project?
<jnlp spec="1.0+" codebase="${codebase}">
<information>
....
</information>
<security>
<all-permissions/>
</security>
<resources>
<j2se version="1.5+" href="http://java.sun.com/products/autodl/j2se"/>
<jar href="${jre.and.jars.host}/${jars.path}/ice-boar-1.0-jar-with-dependencies.jar"/>
<property name="jnlp.IceBoar.close-on-end" value="false"/>
<property name="jnlp.IceBoar.main-class" value="com.roche.iceboar.helloworldswing.HelloWorld"/>
<property name="jnlp.IceBoar.jar.0"
value="${jre.and.jars.host}/${jars.path}/ice-boar-hello-world-swing-${version}-jar-with-dependencies.jar"/>
<property name="jnlp.IceBoar.splash" value="${jre.and.jars.host}/img/ice-boar-splash.png"/>
</resources>
<application-desc main-class="com.roche.iceboar.IceBoar">
</application-desc>
</jnlp>
Site with examples
http://roche.github.io/IceBoar/
Other features of IceBoar?
● Custom splash screen during loading
● No frame around splash screen
● Custom title and icon
● Starting application using pre-installed JRE
● Cache for downloaded JRE (for slow connections)
● Window with logs output
● Disable auto close IceBoar window after starting target
application
Questions
?
Continuous Delivery w
projekcie Open Source
Continuous Delivery Vs. Continuous Deployment
Continuous Delivery Vs. Continuous Deployment
https://puppet.com/blog/continuous-delivery-vs-continuous-deployment-what-s-diff
Inspiration
JDD2014: Continuous Delivery: Capitalizing High Quality Automated Tests (Sz. Faber)
https://www.youtube.com/watch?v=Lda4RuQDQN0
Build Pipeline
Continuous Delivery
</>
Continuous Delivery
</>
code
github.io
github.com travis-ci.org
codecov.io
bintray.com
oss.jfrog.org
search.maven.org
Continuous Delivery
</>
Continuous Delivery
</>
1 git push
Continuous Delivery
</>
1 git push
2 webhook
build
Continuous Delivery
</>
1 git push
2 webhook
build
3 deploy
release
snapshot
Continuous Delivery
</>
1 git push
2 webhook
build
3 deploy
release
snapshot
4 commit
to
gh-pages
Continuous Delivery
</>
1 git push
2 webhook
build
3 deploy
release
snapshot
4 commit
to
gh-pages
5 update
gh-pages
Continuous Delivery
</>
1 git push
2 webhook
build
3 deploy
release
snapshot
6 code coverage
4 commit
to
gh-pages
5 update
gh-pages
Continuous Delivery
</>
1 git push
2 webhook
build
3 deploy
release
snapshot
6 code coverage
7 sing & publish
(manual)
4 commit
to
gh-pages
5 update
gh-pages
Continuous Delivery Deployment
</>
1 git push
2 webhook
build
3 deploy
release
snapshot
6 code coverage
7 sing & publish
(manual)
4 commit
to
gh-pages
5 update
gh-pages
7 sing & publish
auto
not implemented
dream
Continuous Integration
Continuous Integration
https://travis-ci.org
● Free for Open Source Projects
● Easy setup with GitHub
● Container base architecture (Doker)
● Stateless
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
How to setup Travis-CI
.travis.yml
language: java
script: mvn clean install
jdk:
- 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
Default Travis-CI java build
.travis.yml
language: java
jdk:
- oraclejdk8
.travis.yml
language: java
install: mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V
script: mvn test -B
jdk:
- oraclejdk8
Default Travis-CI maven build seps:
● install
● script
Default Travis-CI java build
.travis.yml
language: java
jdk:
- oraclejdk8
.travis.yml
language: java
install: mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V
script: mvn test -B
jdk:
- oraclejdk8
Default Travis-CI maven build seps:
● install
● script
Default Travis-CI java build
.travis.yml
language: java
jdk:
- oraclejdk8
.travis.yml
language: java
install: mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V
script: mvn test -B
jdk:
- oraclejdk8
Default Travis-CI maven build seps:
● install
● script
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
Store sensitive data (passwords) on travis-ci
Store sensitive data (passwords) on travis-ci
Current IceBoar Build in nutshell
#!/bin/bash
set -ev
if [ "${TRAVIS_PULL_REQUEST}" = "false" ];
then
cd ice-boar && mvn clean deploy --settings …
else
cd ice-boar && mvn clean install && ...
fi
build-travis.sh
language: java
script: ./build-travis.sh
jdk:
- oraclejdk8
.travis.yml
Continuous Delivery
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
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
Bintray general repository settings
Bintray deploy to Maven Central
● You can’t store user token password :-(
● This will be manual step :-(
Google Developers: The Secret to Safe Continuous Deployment
www.youtube.com/watch?v=UMnZiTL0tUc
github.com/bslatkin/dpxdt
Continuous Delivery to GitHub Pages
4 commit
to
gh-pages
5 update
gh-pages
Build on Travis-CI build
GitHub Pages project and
commit to gh-pages
branch
Code Quality
Code Quality with codecov.io
● Sign in codecov.io with GitHub
● Configure jacoco-maven-plugin
● Add to .travis.yml:
language: java
script: ./build-travis.sh
jdk:
- oraclejdk8
before_install:
- pip install --user codecov
after_success:
- codecov
.travis.yml
Codecov see Code Coverage
Codecov Extension (for Chrome) - see coverage on GitHub
https://chrome.google.com/webstore/detail/codecov-extension/
Codecov suggestions
IceBoar build in details
IceBoar project structure in detail
Roche/IceBoar pom.xml (project name: ice-boar-build)
ice-boar (without reference to parent pom)
ice-boar-samples
ice-boar-demo-gh-pages
ice-boar-demo
ice-boar-hello-world-swing
Current IceBoar Build in details
language: java
script: ./build-travis.sh
jdk:
- oraclejdk8
before_install:
- pip install --user codecov
after_success:
- codecov
cache:
directories:
- $HOME/.m2 // cache dir between builds
install: true // skip install script
.travis.yml
Current IceBoar Build in details
#!/bin/bash
set -ev
if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then
...
else
cd ice-boar
mvn clean install
cd ..
mvn clean install -U
fi
build-travis.sh
set -ev
-e fail fast
-v print all lines in
the script before
executing them
Current IceBoar Build in details
cd ice-boar
mvn clean deploy --settings settings.xml
cd ..
mvn clean install -U
cd ice-boar-samples/ice-boar-demo-gh-pages/
mvn clean install -P ghpages
git clone https://github.com/Roche/IceBoar
cd IceBoar
git checkout gh-pages && 
cp -R ../target/ice-boar-demo-gh-pages/* .
build-travis.sh Roche/IceBoar
ice-boar
ice-boar-samples
ice-boar-demo-gh-pages
ice-boar-demo
ice-boar-hello-world-swing
Current IceBoar Build in details
cd ice-boar
mvn clean deploy --settings settings.xml
cd ..
mvn clean install -U
cd ice-boar-samples/ice-boar-demo-gh-pages/
mvn clean install -P ghpages
git clone https://github.com/Roche/IceBoar
cd IceBoar
git checkout gh-pages && 
cp -R ../target/ice-boar-demo-gh-pages/* .
build-travis.sh Roche/IceBoar
ice-boar
ice-boar-samples
ice-boar-demo-gh-pages
ice-boar-demo
ice-boar-hello-world-swing
Current IceBoar Build in details
cd ice-boar
mvn clean deploy --settings settings.xml
cd ..
mvn clean install -U
cd ice-boar-samples/ice-boar-demo-gh-pages/
mvn clean install -P ghpages
git clone https://github.com/Roche/IceBoar
cd IceBoar
git checkout gh-pages && 
cp -R ../target/ice-boar-demo-gh-pages/* .
build-travis.sh Roche/IceBoar
ice-boar
ice-boar-samples
ice-boar-demo-gh-pages
ice-boar-demo
ice-boar-hello-world-swing
Current IceBoar Build in details
cd ice-boar
mvn clean deploy --settings settings.xml
cd ..
mvn clean install -U
cd ice-boar-samples/ice-boar-demo-gh-pages/
mvn clean install -P ghpages
git clone https://github.com/Roche/IceBoar
cd IceBoar
git checkout gh-pages && 
cp -R ../target/ice-boar-demo-gh-pages/* .
build-travis.sh Roche/IceBoar
ice-boar
ice-boar-samples
ice-boar-demo-gh-pages
ice-boar-demo
ice-boar-hello-world-swing
IceBoar
Current IceBoar Build in details
cd ice-boar
mvn clean deploy --settings settings.xml
cd ..
mvn clean install -U
cd ice-boar-samples/ice-boar-demo-gh-pages/
mvn clean install -P ghpages
git clone https://github.com/Roche/IceBoar
cd IceBoar
git checkout gh-pages && 
cp -R ../target/ice-boar-demo-gh-pages/* .
build-travis.sh Roche/IceBoar
ice-boar
ice-boar-samples
ice-boar-demo-gh-pages
ice-boar-demo
ice-boar-hello-world-swing
IceBoar
Current IceBoar Build in details
git config user.name "Marcin Stachniuk"
git config user.email mstachniuk@...com
git add -A
git commit -m "update gh-pages by Travis-CI"
git push ${GIT_HUB_REPO_SECRET}
build-travis.sh Roche/IceBoar
ice-boar
ice-boar-samples
ice-boar-demo-gh-pages
ice-boar-demo
ice-boar-hello-world-swing
IceBoar
Nice badges
Nice badges
shields.io
Promotion in the
Internet
What is important for users?
● Nice demo page with example usage: roche.github.io/IceBoar/
What is important for users?
● Easy setup for contributors
What is important for promotion?
● Stack Overflow: stackoverflow.com/search?q=ice+boar
How to promote in the Internet?
● Blogposts
● Another forums, groups, etc.
● Hackergarten (1 Pull Request,1 commit, 2 contributors)
● Presentations on JUG’s and conferences
● Coding in train (1 Pull Request, 16 commits, 1 contributor)
Alternatives
Alternatives to Travic-CI
● gitlab.com
● BitBucket host in the cloud
● 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)
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)
Others
● javadoc.io
LuxLekarz - LuxMed + ZnanyLekarz
github.com/mstachniuk/LuxLekarz
Mockito Release Tools
github.com/mockito/mockito-release-tools
Questions
?
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
Java Web Start czyli jak żyć z
tą dziwną technologią? &
Continuous Delivery w
projekcie Open Source
Marcin Stachniuk
@MarcinStachniuk
mstachniuk.blogspot.com
WrocJUG 04.04.2017 Dziękuję!

Contenu connexe

Tendances

Hybrid Apps (Native + Web) via QtWebKit
Hybrid Apps (Native + Web) via QtWebKitHybrid Apps (Native + Web) via QtWebKit
Hybrid Apps (Native + Web) via QtWebKit
Ariya Hidayat
 
行動應用開發實務 - Gradle 介紹
行動應用開發實務 - Gradle 介紹行動應用開發實務 - Gradle 介紹
行動應用開發實務 - Gradle 介紹
Kyle Lin
 
Upgrade to HTML5 Video
Upgrade to HTML5 VideoUpgrade to HTML5 Video
Upgrade to HTML5 Video
steveheffernan
 

Tendances (20)

"How to deploy to production 10 times a day" Андрей Шумада
"How to deploy to production 10 times a day" Андрей Шумада"How to deploy to production 10 times a day" Андрей Шумада
"How to deploy to production 10 times a day" Андрей Шумада
 
How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016
How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016
How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016
 
Hybrid Apps (Native + Web) via QtWebKit
Hybrid Apps (Native + Web) via QtWebKitHybrid Apps (Native + Web) via QtWebKit
Hybrid Apps (Native + Web) via QtWebKit
 
html5 & phonegap
html5 & phonegaphtml5 & phonegap
html5 & phonegap
 
Clojure Web Development
Clojure Web DevelopmentClojure Web Development
Clojure Web Development
 
10 things you should know about django
10 things you should know about django10 things you should know about django
10 things you should know about django
 
Spark IT 2011 - Java EE 6 Workshop
Spark IT 2011 - Java EE 6 WorkshopSpark IT 2011 - Java EE 6 Workshop
Spark IT 2011 - Java EE 6 Workshop
 
Seven Simple Reasons to Use AppFuse
Seven Simple Reasons to Use AppFuseSeven Simple Reasons to Use AppFuse
Seven Simple Reasons to Use AppFuse
 
Mobile Development with Ionic, React Native, and JHipster - AllTheTalks 2020
Mobile Development with Ionic, React Native, and JHipster - AllTheTalks 2020Mobile Development with Ionic, React Native, and JHipster - AllTheTalks 2020
Mobile Development with Ionic, React Native, and JHipster - AllTheTalks 2020
 
7 recomendaciones para migrar tus aplicaciones a Jakarta EE utilizando Apache...
7 recomendaciones para migrar tus aplicaciones a Jakarta EE utilizando Apache...7 recomendaciones para migrar tus aplicaciones a Jakarta EE utilizando Apache...
7 recomendaciones para migrar tus aplicaciones a Jakarta EE utilizando Apache...
 
Choosing a Java Web Framework
Choosing a Java Web FrameworkChoosing a Java Web Framework
Choosing a Java Web Framework
 
Modern Web Application Development Workflow - web2day 2014
Modern Web Application Development Workflow - web2day 2014Modern Web Application Development Workflow - web2day 2014
Modern Web Application Development Workflow - web2day 2014
 
行動應用開發實務 - Gradle 介紹
行動應用開發實務 - Gradle 介紹行動應用開發實務 - Gradle 介紹
行動應用開發實務 - Gradle 介紹
 
How do I Write Testable Javascript so I can Test my CF API on Server and Client
How do I Write Testable Javascript so I can Test my CF API on Server and ClientHow do I Write Testable Javascript so I can Test my CF API on Server and Client
How do I Write Testable Javascript so I can Test my CF API on Server and Client
 
Java REST API Framework Comparison - PWX 2021
Java REST API Framework Comparison - PWX 2021Java REST API Framework Comparison - PWX 2021
Java REST API Framework Comparison - PWX 2021
 
Modern Web Applications Utilizing HTML5 (Dev Con TLV 06-2013)
Modern Web Applications Utilizing HTML5 (Dev Con TLV 06-2013)Modern Web Applications Utilizing HTML5 (Dev Con TLV 06-2013)
Modern Web Applications Utilizing HTML5 (Dev Con TLV 06-2013)
 
How to Win at UI Development in the World of Microservices - THAT Conference ...
How to Win at UI Development in the World of Microservices - THAT Conference ...How to Win at UI Development in the World of Microservices - THAT Conference ...
How to Win at UI Development in the World of Microservices - THAT Conference ...
 
[CLIW] Web testing
[CLIW] Web testing[CLIW] Web testing
[CLIW] Web testing
 
Use groovy & grails in your spring boot projects
Use groovy & grails in your spring boot projectsUse groovy & grails in your spring boot projects
Use groovy & grails in your spring boot projects
 
Upgrade to HTML5 Video
Upgrade to HTML5 VideoUpgrade to HTML5 Video
Upgrade to HTML5 Video
 

Similaire à Java Web Start czyli jak żyć z tą dziwną technologią & Continuous Delivery w projekcie Open Source - Marcin Stachniuk WroclawJUG

Similaire à Java Web Start czyli jak żyć z tą dziwną technologią & Continuous Delivery w projekcie Open Source - Marcin Stachniuk WroclawJUG (20)

Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017
Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017
Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017
 
Continuous delivery w projekcie open source - Marcin Stachniuk
Continuous delivery w projekcie open source - Marcin StachniukContinuous delivery w projekcie open source - Marcin Stachniuk
Continuous delivery w projekcie open source - Marcin Stachniuk
 
Modern Web Application Development Workflow - EclipseCon Europe 2014
Modern Web Application Development Workflow - EclipseCon Europe 2014Modern Web Application Development Workflow - EclipseCon Europe 2014
Modern Web Application Development Workflow - EclipseCon Europe 2014
 
Rock Solid Deployment of Web Applications
Rock Solid Deployment of Web ApplicationsRock Solid Deployment of Web Applications
Rock Solid Deployment of Web Applications
 
GeoServer Developers Workshop
GeoServer Developers WorkshopGeoServer Developers Workshop
GeoServer Developers Workshop
 
The Path Towards Spring Boot Native Applications
The Path Towards Spring Boot Native ApplicationsThe Path Towards Spring Boot Native Applications
The Path Towards Spring Boot Native Applications
 
JS Fest 2019. Minko Gechev. Building Fast Angular Applications by Default
JS Fest 2019. Minko Gechev. Building Fast Angular Applications by DefaultJS Fest 2019. Minko Gechev. Building Fast Angular Applications by Default
JS Fest 2019. Minko Gechev. Building Fast Angular Applications by Default
 
Continuous Delivery for Front-End Engineers
Continuous Delivery for Front-End EngineersContinuous Delivery for Front-End Engineers
Continuous Delivery for Front-End Engineers
 
Debugging WordPress Core and Plugins!
Debugging WordPress Core and Plugins!Debugging WordPress Core and Plugins!
Debugging WordPress Core and Plugins!
 
Frontend Workflow
Frontend WorkflowFrontend Workflow
Frontend Workflow
 
Modern Web Application Development Workflow - EclipseCon US 2014
Modern Web Application Development Workflow - EclipseCon US 2014Modern Web Application Development Workflow - EclipseCon US 2014
Modern Web Application Development Workflow - EclipseCon US 2014
 
Jython on Django
Jython on DjangoJython on Django
Jython on Django
 
Continuous Load Testing with CloudTest and Jenkins
Continuous Load Testing with CloudTest and JenkinsContinuous Load Testing with CloudTest and Jenkins
Continuous Load Testing with CloudTest and Jenkins
 
What Visual Studio Code can do for Java Development
What Visual Studio Code can do for Java DevelopmentWhat Visual Studio Code can do for Java Development
What Visual Studio Code can do for Java Development
 
Grunt.js and Yeoman, Continous Integration
Grunt.js and Yeoman, Continous IntegrationGrunt.js and Yeoman, Continous Integration
Grunt.js and Yeoman, Continous Integration
 
The WP Engine Developer Experience. Increased agility, improved efficiency.
The WP Engine Developer Experience. Increased agility, improved efficiency.The WP Engine Developer Experience. Increased agility, improved efficiency.
The WP Engine Developer Experience. Increased agility, improved efficiency.
 
GoPro, Inc. Case study: Dive into the details of our web applications
GoPro, Inc. Case study: Dive into the details of our web applicationsGoPro, Inc. Case study: Dive into the details of our web applications
GoPro, Inc. Case study: Dive into the details of our web applications
 
Why you should embrace Gradle and ditch Maven
Why you should embrace Gradle and ditch MavenWhy you should embrace Gradle and ditch Maven
Why you should embrace Gradle and ditch Maven
 
How to Develop Progressive Web Apps in Flutter – Step by Step Guide.pptx
How to Develop Progressive Web Apps in Flutter – Step by Step Guide.pptxHow to Develop Progressive Web Apps in Flutter – Step by Step Guide.pptx
How to Develop Progressive Web Apps in Flutter – Step by Step Guide.pptx
 
Towards Continuous Deployment with Django
Towards Continuous Deployment with DjangoTowards Continuous Deployment with Django
Towards Continuous Deployment with Django
 

Plus de MarcinStachniuk

Plus de MarcinStachniuk (20)

GraphQL - Piękne API w Twojej Aplikacji - KrakowGraphAcademy
GraphQL - Piękne API w Twojej Aplikacji - KrakowGraphAcademyGraphQL - Piękne API w Twojej Aplikacji - KrakowGraphAcademy
GraphQL - Piękne API w Twojej Aplikacji - KrakowGraphAcademy
 
Wroclaw GraphQL - GraphQL in Java
Wroclaw GraphQL - GraphQL in JavaWroclaw GraphQL - GraphQL in Java
Wroclaw GraphQL - GraphQL in Java
 
[DevCrowd] GraphQL - gdy API RESTowe to za mało
[DevCrowd] GraphQL - gdy API RESTowe to za mało[DevCrowd] GraphQL - gdy API RESTowe to za mało
[DevCrowd] GraphQL - gdy API RESTowe to za mało
 
GraphQL - gdy API RESTowe to za mało
GraphQL - gdy API RESTowe to za małoGraphQL - gdy API RESTowe to za mało
GraphQL - gdy API RESTowe to za mało
 
BruJUG Brussels GraphQL when RESR API is to less - lessons learned
BruJUG Brussels GraphQL when RESR API is to less - lessons learnedBruJUG Brussels GraphQL when RESR API is to less - lessons learned
BruJUG Brussels GraphQL when RESR API is to less - lessons learned
 
[WroclawJUG] Continuous Delivery in OSS using Shipkit
[WroclawJUG] Continuous Delivery in OSS using Shipkit[WroclawJUG] Continuous Delivery in OSS using Shipkit
[WroclawJUG] Continuous Delivery in OSS using Shipkit
 
Continuous Delivery in OSS using Shipkit.org
Continuous Delivery in OSS using Shipkit.orgContinuous Delivery in OSS using Shipkit.org
Continuous Delivery in OSS using Shipkit.org
 
GraphQL - when REST API is to less - lessons learned
GraphQL - when REST API is to less - lessons learnedGraphQL - when REST API is to less - lessons learned
GraphQL - when REST API is to less - lessons learned
 
GraphQL - when REST API is to less - lessons learned
GraphQL - when REST API is to less - lessons learnedGraphQL - when REST API is to less - lessons learned
GraphQL - when REST API is to less - lessons learned
 
GraphQL - when REST API is to less - lessons learned
GraphQL - when REST API is to less - lessons learnedGraphQL - when REST API is to less - lessons learned
GraphQL - when REST API is to less - lessons learned
 
GraphQL - when REST API is to less - lessons learned
GraphQL - when REST API is to less - lessons learnedGraphQL - when REST API is to less - lessons learned
GraphQL - when REST API is to less - lessons learned
 
GraphQL - when REST API is to less - lessons learned
GraphQL - when REST API is to less - lessons learnedGraphQL - when REST API is to less - lessons learned
GraphQL - when REST API is to less - lessons learned
 
GraphQL - when REST API is to less - lessons learned
GraphQL - when REST API is to less - lessons learnedGraphQL - when REST API is to less - lessons learned
GraphQL - when REST API is to less - lessons learned
 
GraphQL - when REST API is not enough - lessons learned
GraphQL - when REST API is not enough - lessons learnedGraphQL - when REST API is not enough - lessons learned
GraphQL - when REST API is not enough - lessons learned
 
Java Web Start – jak żyć z tą dziwną technologią
Java Web Start – jak żyć z tą dziwną technologiąJava Web Start – jak żyć z tą dziwną technologią
Java Web Start – jak żyć z tą dziwną technologią
 
Zarządzanie zmianami w schemacie relacyjnych baz danych
Zarządzanie zmianami w schemacie relacyjnych baz danychZarządzanie zmianami w schemacie relacyjnych baz danych
Zarządzanie zmianami w schemacie relacyjnych baz danych
 
Inicjatywa NoSQL na przykładzie db4o
Inicjatywa NoSQL na przykładzie db4oInicjatywa NoSQL na przykładzie db4o
Inicjatywa NoSQL na przykładzie db4o
 
Automatic mechanism data migration between relational and object database
Automatic mechanism data migration between relational and object databaseAutomatic mechanism data migration between relational and object database
Automatic mechanism data migration between relational and object database
 
Zastosowanie obiektowych baz danych na przykładzie db4o
Zastosowanie obiektowych baz danych na przykładzie db4oZastosowanie obiektowych baz danych na przykładzie db4o
Zastosowanie obiektowych baz danych na przykładzie db4o
 
Wprowadzenie do J2ME
Wprowadzenie do J2MEWprowadzenie do J2ME
Wprowadzenie do J2ME
 

Dernier

introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 

Dernier (20)

Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
Pharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyPharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodology
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 

Java Web Start czyli jak żyć z tą dziwną technologią & Continuous Delivery w projekcie Open Source - Marcin Stachniuk WroclawJUG

  • 1. Java Web Start czyli jak żyć z tą dziwną technologią? & Continuous Delivery w projekcie Open Source Marcin Stachniuk @MarcinStachniuk mstachniuk.blogspot.com WrocJUG 04.04.2017
  • 2.
  • 3. Agenda ● Introduction ● Build Pipeline ● Continuous Integration ● Continuous Delivery ● Code Quality ● Nice Badges ● Promotion in the Internet ● Alternatives ● Q&A ● Bonuses ● What is Java Web Start? ● How it works? ● What can goes wrong? ● Solution ● How IceBoar works? ● Benefits ● Q&A
  • 4. Agenda ● Introduction ● Build Pipeline ● Continuous Integration ● Continuous Delivery ● Code Quality ● Nice Badges ● Promotion in the Internet ● Alternatives ● Q&A ● Bonuses ● What is Java Web Start? ● How it works? ● What can goes wrong? ● Solution ● How IceBoar works? ● Benefits ● Q&A +
  • 5. Java Web Start – jak żyć z tą dziwną technologią? Marcin Stachniuk
  • 6. Java Platform Standard Edition 8 Documentation https://docs.oracle.com/javase/8/docs/
  • 7. Java Platform Tutorial: Swing https://docs.oracle.com/javase/tutorial/uiswing/components/text.html
  • 8. Example JNLP file <?xml version="1.0" encoding="utf-8"?> <!-- JNLP File for TextSamplerDemo --> <jnlp spec="1.0+" codebase="https://docs.oracle.com/javase/tutorialJWS/samples/uiswing/TextSamplerDemoProject" href="TextSamplerDemo.jnlp"> <information> <title>TextSamplerDemo</title> <vendor>The Java(tm) Tutorial</vendor> <homepage href="https://docs.oracle.com/javase/tutorial/uiswing/examples/components/index.html#TextSamplerDemo"/> <description>TextSamplerDemo</description> <description kind="short">Uses one of each of Swing's text components.</description> <offline-allowed/> </information> <resources> <j2se version="1.7+"/> <jar href="TextSamplerDemo.jar"/> </resources> <application-desc main-class="components.TextSamplerDemo"/> </jnlp>
  • 9. Java Web Start Sequence Diagram
  • 10. Java Web Start Sequence Diagram click
  • 11. Java Web Start Sequence Diagram click download
  • 12. Java Web Start Sequence Diagram click download run
  • 13. Java Web Start Sequence Diagram click download run are you sure?
  • 14. Java Web Start Sequence Diagram click download run are you sure? download JARs
  • 15. Java Web Start Sequence Diagram run application on javaws click download run are you sure? download JARs
  • 16. Java Web Start Sequence Diagram run application on javaws click download run are you sure? download JARs
  • 17. What could possibly go wrong? In JNLP: <j2se version="1.7"/> User: Java 1.8
  • 18. What could possibly go wrong? ● Different Java versions installed on client machines ● Sometimes javaws wants download and install newest JRE version ● Different behavior depends on Operating System and installed JRE version ● From some point of time apps needs to signed (Self-signed are blocked) ● Application started in sandbox (javaws or jp2launcher)
  • 27. How IceBoar works? click download run are you sure? download & run
  • 28. How IceBoar works? click download run are you sure? download & run download JRE
  • 29. How IceBoar works? click download run are you sure? download & run download JRE download JARs
  • 30. How IceBoar works? click download run are you sure? download & run download JRE download JARs run on our JRE
  • 31. How IceBoar works? click download run are you sure? download & run download JRE download JARs run on our JRE
  • 32. How IceBoar works? click download run are you sure? download & run download JRE download JARs run on our JRE
  • 33. Demo
  • 34. Profits ● We know a target JVM version ● Application start outside a sandbox (java instead of javaws) ● We sign only IceBoar jar ● Users don’t needs admin rights to install JRE
  • 35. How to introduce IceBoar into a project? <dependency> <groupId>com.roche</groupId> <artifactId>ice-boar</artifactId> <version>${project.version}</version> <classifier>jar-with-dependencies</classifier> </dependency>
  • 36. How to introduce IceBoar into a project? <jnlp spec="1.0+" codebase="${codebase}"> <information> .... </information> <security> <all-permissions/> </security> <resources> <j2se version="1.5+" href="http://java.sun.com/products/autodl/j2se"/> <jar href="${jre.and.jars.host}/${jars.path}/ice-boar-1.0-jar-with-dependencies.jar"/> <property name="jnlp.IceBoar.close-on-end" value="false"/> <property name="jnlp.IceBoar.main-class" value="com.roche.iceboar.helloworldswing.HelloWorld"/> <property name="jnlp.IceBoar.jar.0" value="${jre.and.jars.host}/${jars.path}/ice-boar-hello-world-swing-${version}-jar-with-dependencies.jar"/> <property name="jnlp.IceBoar.splash" value="${jre.and.jars.host}/img/ice-boar-splash.png"/> </resources> <application-desc main-class="com.roche.iceboar.IceBoar"> </application-desc> </jnlp>
  • 38. Other features of IceBoar? ● Custom splash screen during loading ● No frame around splash screen ● Custom title and icon ● Starting application using pre-installed JRE ● Cache for downloaded JRE (for slow connections) ● Window with logs output ● Disable auto close IceBoar window after starting target application
  • 41. Continuous Delivery Vs. Continuous Deployment
  • 42. Continuous Delivery Vs. Continuous Deployment https://puppet.com/blog/continuous-delivery-vs-continuous-deployment-what-s-diff
  • 43. Inspiration JDD2014: Continuous Delivery: Capitalizing High Quality Automated Tests (Sz. Faber) https://www.youtube.com/watch?v=Lda4RuQDQN0
  • 49. Continuous Delivery </> 1 git push 2 webhook build
  • 50. Continuous Delivery </> 1 git push 2 webhook build 3 deploy release snapshot
  • 51. Continuous Delivery </> 1 git push 2 webhook build 3 deploy release snapshot 4 commit to gh-pages
  • 52. Continuous Delivery </> 1 git push 2 webhook build 3 deploy release snapshot 4 commit to gh-pages 5 update gh-pages
  • 53. Continuous Delivery </> 1 git push 2 webhook build 3 deploy release snapshot 6 code coverage 4 commit to gh-pages 5 update gh-pages
  • 54. Continuous Delivery </> 1 git push 2 webhook build 3 deploy release snapshot 6 code coverage 7 sing & publish (manual) 4 commit to gh-pages 5 update gh-pages
  • 55. Continuous Delivery Deployment </> 1 git push 2 webhook build 3 deploy release snapshot 6 code coverage 7 sing & publish (manual) 4 commit to gh-pages 5 update gh-pages 7 sing & publish auto not implemented dream
  • 57. Continuous Integration https://travis-ci.org ● Free for Open Source Projects ● Easy setup with GitHub ● Container base architecture (Doker) ● Stateless
  • 58. 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
  • 59. How to setup Travis-CI .travis.yml language: java script: mvn clean install jdk: - 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
  • 60. Default Travis-CI java build .travis.yml language: java jdk: - oraclejdk8 .travis.yml language: java install: mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V script: mvn test -B jdk: - oraclejdk8 Default Travis-CI maven build seps: ● install ● script
  • 61. Default Travis-CI java build .travis.yml language: java jdk: - oraclejdk8 .travis.yml language: java install: mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V script: mvn test -B jdk: - oraclejdk8 Default Travis-CI maven build seps: ● install ● script
  • 62. Default Travis-CI java build .travis.yml language: java jdk: - oraclejdk8 .travis.yml language: java install: mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V script: mvn test -B jdk: - oraclejdk8 Default Travis-CI maven build seps: ● install ● script
  • 63. 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
  • 64. Store sensitive data (passwords) on travis-ci
  • 65. Store sensitive data (passwords) on travis-ci
  • 66. Current IceBoar Build in nutshell #!/bin/bash set -ev if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then cd ice-boar && mvn clean deploy --settings … else cd ice-boar && mvn clean install && ... fi build-travis.sh language: java script: ./build-travis.sh jdk: - oraclejdk8 .travis.yml
  • 68. 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
  • 69. 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
  • 71. Bintray deploy to Maven Central ● You can’t store user token password :-( ● This will be manual step :-(
  • 72. Google Developers: The Secret to Safe Continuous Deployment www.youtube.com/watch?v=UMnZiTL0tUc github.com/bslatkin/dpxdt
  • 73. Continuous Delivery to GitHub Pages 4 commit to gh-pages 5 update gh-pages Build on Travis-CI build GitHub Pages project and commit to gh-pages branch
  • 75. Code Quality with codecov.io ● Sign in codecov.io with GitHub ● Configure jacoco-maven-plugin ● Add to .travis.yml: language: java script: ./build-travis.sh jdk: - oraclejdk8 before_install: - pip install --user codecov after_success: - codecov .travis.yml
  • 76. Codecov see Code Coverage
  • 77. Codecov Extension (for Chrome) - see coverage on GitHub https://chrome.google.com/webstore/detail/codecov-extension/
  • 79. IceBoar build in details
  • 80. IceBoar project structure in detail Roche/IceBoar pom.xml (project name: ice-boar-build) ice-boar (without reference to parent pom) ice-boar-samples ice-boar-demo-gh-pages ice-boar-demo ice-boar-hello-world-swing
  • 81. Current IceBoar Build in details language: java script: ./build-travis.sh jdk: - oraclejdk8 before_install: - pip install --user codecov after_success: - codecov cache: directories: - $HOME/.m2 // cache dir between builds install: true // skip install script .travis.yml
  • 82. Current IceBoar Build in details #!/bin/bash set -ev if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then ... else cd ice-boar mvn clean install cd .. mvn clean install -U fi build-travis.sh set -ev -e fail fast -v print all lines in the script before executing them
  • 83. Current IceBoar Build in details cd ice-boar mvn clean deploy --settings settings.xml cd .. mvn clean install -U cd ice-boar-samples/ice-boar-demo-gh-pages/ mvn clean install -P ghpages git clone https://github.com/Roche/IceBoar cd IceBoar git checkout gh-pages && cp -R ../target/ice-boar-demo-gh-pages/* . build-travis.sh Roche/IceBoar ice-boar ice-boar-samples ice-boar-demo-gh-pages ice-boar-demo ice-boar-hello-world-swing
  • 84. Current IceBoar Build in details cd ice-boar mvn clean deploy --settings settings.xml cd .. mvn clean install -U cd ice-boar-samples/ice-boar-demo-gh-pages/ mvn clean install -P ghpages git clone https://github.com/Roche/IceBoar cd IceBoar git checkout gh-pages && cp -R ../target/ice-boar-demo-gh-pages/* . build-travis.sh Roche/IceBoar ice-boar ice-boar-samples ice-boar-demo-gh-pages ice-boar-demo ice-boar-hello-world-swing
  • 85. Current IceBoar Build in details cd ice-boar mvn clean deploy --settings settings.xml cd .. mvn clean install -U cd ice-boar-samples/ice-boar-demo-gh-pages/ mvn clean install -P ghpages git clone https://github.com/Roche/IceBoar cd IceBoar git checkout gh-pages && cp -R ../target/ice-boar-demo-gh-pages/* . build-travis.sh Roche/IceBoar ice-boar ice-boar-samples ice-boar-demo-gh-pages ice-boar-demo ice-boar-hello-world-swing
  • 86. Current IceBoar Build in details cd ice-boar mvn clean deploy --settings settings.xml cd .. mvn clean install -U cd ice-boar-samples/ice-boar-demo-gh-pages/ mvn clean install -P ghpages git clone https://github.com/Roche/IceBoar cd IceBoar git checkout gh-pages && cp -R ../target/ice-boar-demo-gh-pages/* . build-travis.sh Roche/IceBoar ice-boar ice-boar-samples ice-boar-demo-gh-pages ice-boar-demo ice-boar-hello-world-swing IceBoar
  • 87. Current IceBoar Build in details cd ice-boar mvn clean deploy --settings settings.xml cd .. mvn clean install -U cd ice-boar-samples/ice-boar-demo-gh-pages/ mvn clean install -P ghpages git clone https://github.com/Roche/IceBoar cd IceBoar git checkout gh-pages && cp -R ../target/ice-boar-demo-gh-pages/* . build-travis.sh Roche/IceBoar ice-boar ice-boar-samples ice-boar-demo-gh-pages ice-boar-demo ice-boar-hello-world-swing IceBoar
  • 88. Current IceBoar Build in details git config user.name "Marcin Stachniuk" git config user.email mstachniuk@...com git add -A git commit -m "update gh-pages by Travis-CI" git push ${GIT_HUB_REPO_SECRET} build-travis.sh Roche/IceBoar ice-boar ice-boar-samples ice-boar-demo-gh-pages ice-boar-demo ice-boar-hello-world-swing IceBoar
  • 92. What is important for users? ● Nice demo page with example usage: roche.github.io/IceBoar/
  • 93. What is important for users? ● Easy setup for contributors
  • 94. What is important for promotion? ● Stack Overflow: stackoverflow.com/search?q=ice+boar
  • 95. How to promote in the Internet? ● Blogposts ● Another forums, groups, etc. ● Hackergarten (1 Pull Request,1 commit, 2 contributors) ● Presentations on JUG’s and conferences ● Coding in train (1 Pull Request, 16 commits, 1 contributor)
  • 97. Alternatives to Travic-CI ● gitlab.com ● BitBucket host in the cloud ● 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)
  • 98. 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)
  • 100. LuxLekarz - LuxMed + ZnanyLekarz github.com/mstachniuk/LuxLekarz
  • 103. 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
  • 104. Java Web Start czyli jak żyć z tą dziwną technologią? & Continuous Delivery w projekcie Open Source Marcin Stachniuk @MarcinStachniuk mstachniuk.blogspot.com WrocJUG 04.04.2017 Dziękuję!