SlideShare una empresa de Scribd logo
1 de 32
Descargar para leer sin conexión
AUTOMATED RELEASES TO
RUBYGEMS USING TRAVISCI
By Francis Luong (Franco)
@FRANCISLUONG (FRANCO)
➤ Infrastructure developer 

for salesforce.com
➤ Core Focus: 

Software for Networks
➤ Previous Team: Ruby 

(but not Rails)
SHOW OF HANDS
Published a Gem?
Used Travis?
MY MOTIVATION
Publish my first Ruby Gem - Honor TCL/Expect
I’m Lazy
Free Servers/Services
Are Amazing!
LET’S BEGIN!
INGREDIENTS
➤ RubyGems Account
➤ Travis-CI.org Account
➤ hooked up to your Github account via OAuth
➤ Github Ruby repo
➤ that you own (or for an Org)
➤ must be Public
STEP 1: CURL
YOUR
RUBYGEMS
API KEY
~/.gem/credentials
STEP 1: RUBYGEMS API KEY
➤ Inputs:
➤ USERNAME: your rubygems username
➤ curl prompts you for password
➤ curl -u ${USERNAME} https://rubygems.org/api/
v1/api_key.yaml > ~/.gem/credentials
➤ chmod 0600 ~/.gem/credentials
STEP 2: GET
TRAVIS
WORKING
https://docs.travis-ci.com/user/getting-started/
.TRAVIS.YML - BASIC VERSION
language: ruby

rvm:

- 2.2.0

- 2.0.0
install:

- bundle install
script:

- uname -s

- rake test
PRO TIP: USE THE TRAVIS GEM TO ADD RUBYGEMS DEPLOY
$ travis setup rubygems [-—force]
Gem name: |expect-behaviors|
Release only tagged commits? |yes|
Release only from francisluong/expect-behaviors? |yes|
Encrypt API key? |yes|
$
This uses the rubygems.org key from Step 1 and
encrypts it.
.TRAVIS.YML - NOW WITH DEPLOY SECTION
language: ruby

rvm:

- 2.2.0

- 2.0.0
deploy:

provider: rubygems

api_key:

secure: VThxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

gem: expect-behaviors

on:

tags: true

repo: francisluong/expect-behaviors
install:

- bundle install
script:

- uname -s

- rake test
ADD YOUR REPO TO TRAVIS IF YOU HAVEN’T ALREADY
DEMO: BUMP, GEMSPEC, AND TAG
https://travis-ci.org/francisluong/expect-behaviors
https://github.com/francisluong/expect-behaviors/releases
STEP 3: USE
JEWELER OR
JUWELIER
Bump Version and Generate
Gemspec via Rake Tasks
"Juwelier" is
pronounced
"you-ve-LEER"
“GemSpec files are a pain in the
bottom!
-Franco
JEWELER: RAKE TO FULLY GENERATE GEMSPEC FILE
require 'jeweler'



Jeweler::Tasks.new do |gem|

# gem is a Gem::Specification...
# see http://guides.rubygems.org/specification-reference/
# for more options

gem.name = "expect-behaviors"

gem.homepage = "http://github.com/francisluong/expect-
behaviors"

gem.license = "MIT"

gem.summary = %Q{Ruby Mixin to add Expect Behaviors}

gem.description = %Q{Ruby Mixin to add Expect Behaviors to
SSH/Serial/Telnet controllers}

gem.email = “XXXXXXXXXX@YYYYYYYYYY.com”

gem.authors = ["Francis Luong (Franco)"]

# dependencies defined in Gemfile

end

Jeweler::RubygemsDotOrgTasks.new
JEWELER
➤ Note: It’s in maintenance-only, so prefer Juwelier for new
projects. Same maintainer.
➤ Bump Version
➤ rake version:bump:patch
➤ rake version:bump:minor
➤ rake version:bump:major
➤ Generate Gemspec file
➤ rake gemspec
DEVELOPMENT AND RELEASE FLOW
:)
BRANCH -> PR -> MERGE - AS PER USUAL
2 STEPS TO RELEASE
➤ Preconditions: Master is in a good state for release
1. Commit a Version Bump and Gemspec. Push.
2. Create a Release Tag on Github 





Travis responds to this by attempting a test/build/
deploy after testing
BONUS: CODE
CLIMATE
Coverage and Quality
CODECLIMATE IS ALSO FREE FOR OPEN-SOURCE
➤ You can sign up using your Github login
➤ And then just add your repo
THE CODE CLIMATE REPO TOKEN IS HARD TO FIND
BUT ONCE YOU KNOW WHERE IT IS…
YOU CAN ALSO ADD THIS TO YOUR TRAVIS YAML
language: ruby

rvm:

- 2.2.0

- 2.0.0
deploy:

provider: rubygems

api_key:

secure: VThxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

gem: expect-behaviors

on:

tags: true

repo: francisluong/expect-behaviors
install:

- bundle install
script:

- uname -s

- rake test
addons:

code_climate:

repo_token: da6828XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
THEN ADD MORE BUTTONS TO YOUR README.MD
DEMO WRAP UP!
QUESTIONS
THANK YOU!
@francisluong
RESOURCES
➤ http://www.francisluong.com/blog-network-automation/
2016/3/13/travis-ruby-gems
➤ https://rubygems.org/gems/expect-behaviors
➤ https://travis-ci.org/francisluong/expect-behaviors
➤ https://github.com/francisluong/expect-behaviors/releases
➤ Jeweler and Juwelier
➤ https://github.com/technicalpickles/jeweler
➤ https://github.com/flajann2/juwelier
➤ https://codeclimate.com/github/francisluong/expect-
behaviors

Más contenido relacionado

La actualidad más candente

Testing MeteorJS using CasperJS
Testing MeteorJS using CasperJSTesting MeteorJS using CasperJS
Testing MeteorJS using CasperJSStephan Hochhaus
 
meet.php #11 - Huston, we have an airbrake
meet.php #11 - Huston, we have an airbrakemeet.php #11 - Huston, we have an airbrake
meet.php #11 - Huston, we have an airbrakeMax Małecki
 
10 Laravel packages everyone should know
10 Laravel packages everyone should know10 Laravel packages everyone should know
10 Laravel packages everyone should knowPovilas Korop
 
Laravel Beginners Tutorial 1
Laravel Beginners Tutorial 1Laravel Beginners Tutorial 1
Laravel Beginners Tutorial 1Vikas Chauhan
 
DevOps Hackathon - Session 1: Vagrant
DevOps Hackathon - Session 1: VagrantDevOps Hackathon - Session 1: Vagrant
DevOps Hackathon - Session 1: VagrantAntons Kranga
 
How composer saved PHP
How composer saved PHPHow composer saved PHP
How composer saved PHPRyan Kilfedder
 
Symfony ile Gelişmiş API Mimarisi
Symfony ile Gelişmiş API MimarisiSymfony ile Gelişmiş API Mimarisi
Symfony ile Gelişmiş API MimarisiBehram ÇELEN
 
Integration Test Cucumber + Webrat + Selenium
Integration Test Cucumber + Webrat + SeleniumIntegration Test Cucumber + Webrat + Selenium
Integration Test Cucumber + Webrat + Seleniumtka
 
CPAN Dependency Heaven
CPAN Dependency HeavenCPAN Dependency Heaven
CPAN Dependency HeavenOpusVL
 
KAK Etkinliği OJS de Symfony kullanımı
KAK Etkinliği OJS de Symfony kullanımıKAK Etkinliği OJS de Symfony kullanımı
KAK Etkinliği OJS de Symfony kullanımıBehram Çelen
 
php[world] 2015 Training - Laravel from the Ground Up
php[world] 2015 Training - Laravel from the Ground Upphp[world] 2015 Training - Laravel from the Ground Up
php[world] 2015 Training - Laravel from the Ground UpJoe Ferguson
 
php[world] 2015 Laravel 5.1: From Homestead to the Cloud
php[world] 2015 Laravel 5.1: From Homestead to the Cloudphp[world] 2015 Laravel 5.1: From Homestead to the Cloud
php[world] 2015 Laravel 5.1: From Homestead to the CloudJoe Ferguson
 
Magento 2 Capistrano Deploy
Magento 2 Capistrano DeployMagento 2 Capistrano Deploy
Magento 2 Capistrano DeployDuke Dao
 
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema RubyTdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema RubyFabio Akita
 
Migrating a large code-base to containers by Doug Johnson and Jonathan Lozins...
Migrating a large code-base to containers by Doug Johnson and Jonathan Lozins...Migrating a large code-base to containers by Doug Johnson and Jonathan Lozins...
Migrating a large code-base to containers by Doug Johnson and Jonathan Lozins...Docker, Inc.
 
Server Side Swift - AppBuilders 2017
Server Side Swift - AppBuilders 2017Server Side Swift - AppBuilders 2017
Server Side Swift - AppBuilders 2017Jens Ravens
 
Laravel for Web Artisans
Laravel for Web ArtisansLaravel for Web Artisans
Laravel for Web ArtisansRaf Kewl
 
DevOps hackathon Session 2: Basics of Chef
DevOps hackathon Session 2: Basics of ChefDevOps hackathon Session 2: Basics of Chef
DevOps hackathon Session 2: Basics of ChefAntons Kranga
 

La actualidad más candente (20)

Testing MeteorJS using CasperJS
Testing MeteorJS using CasperJSTesting MeteorJS using CasperJS
Testing MeteorJS using CasperJS
 
meet.php #11 - Huston, we have an airbrake
meet.php #11 - Huston, we have an airbrakemeet.php #11 - Huston, we have an airbrake
meet.php #11 - Huston, we have an airbrake
 
10 Laravel packages everyone should know
10 Laravel packages everyone should know10 Laravel packages everyone should know
10 Laravel packages everyone should know
 
Laravel Beginners Tutorial 1
Laravel Beginners Tutorial 1Laravel Beginners Tutorial 1
Laravel Beginners Tutorial 1
 
DevOps Hackathon - Session 1: Vagrant
DevOps Hackathon - Session 1: VagrantDevOps Hackathon - Session 1: Vagrant
DevOps Hackathon - Session 1: Vagrant
 
Vagrant
VagrantVagrant
Vagrant
 
Presentation laravel 5 4
Presentation laravel 5 4Presentation laravel 5 4
Presentation laravel 5 4
 
How composer saved PHP
How composer saved PHPHow composer saved PHP
How composer saved PHP
 
Symfony ile Gelişmiş API Mimarisi
Symfony ile Gelişmiş API MimarisiSymfony ile Gelişmiş API Mimarisi
Symfony ile Gelişmiş API Mimarisi
 
Integration Test Cucumber + Webrat + Selenium
Integration Test Cucumber + Webrat + SeleniumIntegration Test Cucumber + Webrat + Selenium
Integration Test Cucumber + Webrat + Selenium
 
CPAN Dependency Heaven
CPAN Dependency HeavenCPAN Dependency Heaven
CPAN Dependency Heaven
 
KAK Etkinliği OJS de Symfony kullanımı
KAK Etkinliği OJS de Symfony kullanımıKAK Etkinliği OJS de Symfony kullanımı
KAK Etkinliği OJS de Symfony kullanımı
 
php[world] 2015 Training - Laravel from the Ground Up
php[world] 2015 Training - Laravel from the Ground Upphp[world] 2015 Training - Laravel from the Ground Up
php[world] 2015 Training - Laravel from the Ground Up
 
php[world] 2015 Laravel 5.1: From Homestead to the Cloud
php[world] 2015 Laravel 5.1: From Homestead to the Cloudphp[world] 2015 Laravel 5.1: From Homestead to the Cloud
php[world] 2015 Laravel 5.1: From Homestead to the Cloud
 
Magento 2 Capistrano Deploy
Magento 2 Capistrano DeployMagento 2 Capistrano Deploy
Magento 2 Capistrano Deploy
 
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema RubyTdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
 
Migrating a large code-base to containers by Doug Johnson and Jonathan Lozins...
Migrating a large code-base to containers by Doug Johnson and Jonathan Lozins...Migrating a large code-base to containers by Doug Johnson and Jonathan Lozins...
Migrating a large code-base to containers by Doug Johnson and Jonathan Lozins...
 
Server Side Swift - AppBuilders 2017
Server Side Swift - AppBuilders 2017Server Side Swift - AppBuilders 2017
Server Side Swift - AppBuilders 2017
 
Laravel for Web Artisans
Laravel for Web ArtisansLaravel for Web Artisans
Laravel for Web Artisans
 
DevOps hackathon Session 2: Basics of Chef
DevOps hackathon Session 2: Basics of ChefDevOps hackathon Session 2: Basics of Chef
DevOps hackathon Session 2: Basics of Chef
 

Similar a Automated Releases to RubyGems.org using Travis-CI.org

Gem That (2009)
Gem That (2009)Gem That (2009)
Gem That (2009)lazyatom
 
Toolbox of a Ruby Team
Toolbox of a Ruby TeamToolbox of a Ruby Team
Toolbox of a Ruby TeamArto Artnik
 
Lessons Learnt in 2009
Lessons Learnt in 2009Lessons Learnt in 2009
Lessons Learnt in 2009pratiknaik
 
Ruby 1.9 And Rails 3.0
Ruby 1.9 And Rails 3.0Ruby 1.9 And Rails 3.0
Ruby 1.9 And Rails 3.0ArrrrCamp
 
Lightning branches at RedMart (Js conf Asia 2014 Talk)
Lightning branches at RedMart (Js conf Asia 2014  Talk)Lightning branches at RedMart (Js conf Asia 2014  Talk)
Lightning branches at RedMart (Js conf Asia 2014 Talk)Ritesh Angural
 
The Future of Dependency Management for Ruby
The Future of Dependency Management for RubyThe Future of Dependency Management for Ruby
The Future of Dependency Management for RubyHiroshi SHIBATA
 
ZendCon 2015 - DevOps for Small Teams
ZendCon 2015 - DevOps for Small TeamsZendCon 2015 - DevOps for Small Teams
ZendCon 2015 - DevOps for Small TeamsJoe Ferguson
 
Madison PHP 2015 - DevOps For Small Teams
Madison PHP 2015 - DevOps For Small TeamsMadison PHP 2015 - DevOps For Small Teams
Madison PHP 2015 - DevOps For Small TeamsJoe Ferguson
 
The Future of library dependency manageement of Ruby
The Future of library dependency manageement of RubyThe Future of library dependency manageement of Ruby
The Future of library dependency manageement of RubyHiroshi SHIBATA
 
How to distribute Ruby to the world
How to distribute Ruby to the worldHow to distribute Ruby to the world
How to distribute Ruby to the worldHiroshi SHIBATA
 
Apache Whirr
Apache WhirrApache Whirr
Apache Whirrhuguk
 
Rush, a shell that will yield to you
Rush, a shell that will yield to youRush, a shell that will yield to you
Rush, a shell that will yield to youguestdd9d06
 
Strangers In The Night: Ruby, Rack y Sinatra - Herramientas potentes para con...
Strangers In The Night: Ruby, Rack y Sinatra - Herramientas potentes para con...Strangers In The Night: Ruby, Rack y Sinatra - Herramientas potentes para con...
Strangers In The Night: Ruby, Rack y Sinatra - Herramientas potentes para con...Alberto Perdomo
 
Openshift: Deployments for the rest of us
Openshift: Deployments for the rest of usOpenshift: Deployments for the rest of us
Openshift: Deployments for the rest of usAnurag Patel
 
Debugging Network Issues
Debugging Network IssuesDebugging Network Issues
Debugging Network IssuesApcera
 
How to distribute Ruby to the world
How to distribute Ruby to the worldHow to distribute Ruby to the world
How to distribute Ruby to the worldHiroshi SHIBATA
 

Similar a Automated Releases to RubyGems.org using Travis-CI.org (20)

Gem That (2009)
Gem That (2009)Gem That (2009)
Gem That (2009)
 
Sprockets
SprocketsSprockets
Sprockets
 
Toolbox of a Ruby Team
Toolbox of a Ruby TeamToolbox of a Ruby Team
Toolbox of a Ruby Team
 
Lessons Learnt in 2009
Lessons Learnt in 2009Lessons Learnt in 2009
Lessons Learnt in 2009
 
Rails onCpanel
Rails onCpanelRails onCpanel
Rails onCpanel
 
Ruby 1.9 And Rails 3.0
Ruby 1.9 And Rails 3.0Ruby 1.9 And Rails 3.0
Ruby 1.9 And Rails 3.0
 
Lightning branches at RedMart (Js conf Asia 2014 Talk)
Lightning branches at RedMart (Js conf Asia 2014  Talk)Lightning branches at RedMart (Js conf Asia 2014  Talk)
Lightning branches at RedMart (Js conf Asia 2014 Talk)
 
11 Ruby Gems
11 Ruby Gems11 Ruby Gems
11 Ruby Gems
 
What's new in RubyGems3
What's new in RubyGems3What's new in RubyGems3
What's new in RubyGems3
 
The Future of Dependency Management for Ruby
The Future of Dependency Management for RubyThe Future of Dependency Management for Ruby
The Future of Dependency Management for Ruby
 
ZendCon 2015 - DevOps for Small Teams
ZendCon 2015 - DevOps for Small TeamsZendCon 2015 - DevOps for Small Teams
ZendCon 2015 - DevOps for Small Teams
 
Madison PHP 2015 - DevOps For Small Teams
Madison PHP 2015 - DevOps For Small TeamsMadison PHP 2015 - DevOps For Small Teams
Madison PHP 2015 - DevOps For Small Teams
 
The Future of library dependency manageement of Ruby
The Future of library dependency manageement of RubyThe Future of library dependency manageement of Ruby
The Future of library dependency manageement of Ruby
 
How to distribute Ruby to the world
How to distribute Ruby to the worldHow to distribute Ruby to the world
How to distribute Ruby to the world
 
Apache Whirr
Apache WhirrApache Whirr
Apache Whirr
 
Rush, a shell that will yield to you
Rush, a shell that will yield to youRush, a shell that will yield to you
Rush, a shell that will yield to you
 
Strangers In The Night: Ruby, Rack y Sinatra - Herramientas potentes para con...
Strangers In The Night: Ruby, Rack y Sinatra - Herramientas potentes para con...Strangers In The Night: Ruby, Rack y Sinatra - Herramientas potentes para con...
Strangers In The Night: Ruby, Rack y Sinatra - Herramientas potentes para con...
 
Openshift: Deployments for the rest of us
Openshift: Deployments for the rest of usOpenshift: Deployments for the rest of us
Openshift: Deployments for the rest of us
 
Debugging Network Issues
Debugging Network IssuesDebugging Network Issues
Debugging Network Issues
 
How to distribute Ruby to the world
How to distribute Ruby to the worldHow to distribute Ruby to the world
How to distribute Ruby to the world
 

Último

Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 

Último (20)

Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 

Automated Releases to RubyGems.org using Travis-CI.org

  • 1. AUTOMATED RELEASES TO RUBYGEMS USING TRAVISCI By Francis Luong (Franco)
  • 2. @FRANCISLUONG (FRANCO) ➤ Infrastructure developer 
 for salesforce.com ➤ Core Focus: 
 Software for Networks ➤ Previous Team: Ruby 
 (but not Rails)
  • 3. SHOW OF HANDS Published a Gem? Used Travis?
  • 4. MY MOTIVATION Publish my first Ruby Gem - Honor TCL/Expect
  • 7. INGREDIENTS ➤ RubyGems Account ➤ Travis-CI.org Account ➤ hooked up to your Github account via OAuth ➤ Github Ruby repo ➤ that you own (or for an Org) ➤ must be Public
  • 8. STEP 1: CURL YOUR RUBYGEMS API KEY ~/.gem/credentials
  • 9. STEP 1: RUBYGEMS API KEY ➤ Inputs: ➤ USERNAME: your rubygems username ➤ curl prompts you for password ➤ curl -u ${USERNAME} https://rubygems.org/api/ v1/api_key.yaml > ~/.gem/credentials ➤ chmod 0600 ~/.gem/credentials
  • 11. .TRAVIS.YML - BASIC VERSION language: ruby
 rvm:
 - 2.2.0
 - 2.0.0 install:
 - bundle install script:
 - uname -s
 - rake test
  • 12. PRO TIP: USE THE TRAVIS GEM TO ADD RUBYGEMS DEPLOY $ travis setup rubygems [-—force] Gem name: |expect-behaviors| Release only tagged commits? |yes| Release only from francisluong/expect-behaviors? |yes| Encrypt API key? |yes| $ This uses the rubygems.org key from Step 1 and encrypts it.
  • 13. .TRAVIS.YML - NOW WITH DEPLOY SECTION language: ruby
 rvm:
 - 2.2.0
 - 2.0.0 deploy:
 provider: rubygems
 api_key:
 secure: VThxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
 gem: expect-behaviors
 on:
 tags: true
 repo: francisluong/expect-behaviors install:
 - bundle install script:
 - uname -s
 - rake test
  • 14. ADD YOUR REPO TO TRAVIS IF YOU HAVEN’T ALREADY
  • 15. DEMO: BUMP, GEMSPEC, AND TAG https://travis-ci.org/francisluong/expect-behaviors https://github.com/francisluong/expect-behaviors/releases
  • 16. STEP 3: USE JEWELER OR JUWELIER Bump Version and Generate Gemspec via Rake Tasks "Juwelier" is pronounced "you-ve-LEER"
  • 17. “GemSpec files are a pain in the bottom! -Franco
  • 18. JEWELER: RAKE TO FULLY GENERATE GEMSPEC FILE require 'jeweler'
 
 Jeweler::Tasks.new do |gem|
 # gem is a Gem::Specification... # see http://guides.rubygems.org/specification-reference/ # for more options
 gem.name = "expect-behaviors"
 gem.homepage = "http://github.com/francisluong/expect- behaviors"
 gem.license = "MIT"
 gem.summary = %Q{Ruby Mixin to add Expect Behaviors}
 gem.description = %Q{Ruby Mixin to add Expect Behaviors to SSH/Serial/Telnet controllers}
 gem.email = “XXXXXXXXXX@YYYYYYYYYY.com”
 gem.authors = ["Francis Luong (Franco)"]
 # dependencies defined in Gemfile
 end
 Jeweler::RubygemsDotOrgTasks.new
  • 19. JEWELER ➤ Note: It’s in maintenance-only, so prefer Juwelier for new projects. Same maintainer. ➤ Bump Version ➤ rake version:bump:patch ➤ rake version:bump:minor ➤ rake version:bump:major ➤ Generate Gemspec file ➤ rake gemspec
  • 21. BRANCH -> PR -> MERGE - AS PER USUAL
  • 22. 2 STEPS TO RELEASE ➤ Preconditions: Master is in a good state for release 1. Commit a Version Bump and Gemspec. Push. 2. Create a Release Tag on Github 
 
 
 Travis responds to this by attempting a test/build/ deploy after testing
  • 24. CODECLIMATE IS ALSO FREE FOR OPEN-SOURCE ➤ You can sign up using your Github login ➤ And then just add your repo
  • 25. THE CODE CLIMATE REPO TOKEN IS HARD TO FIND
  • 26. BUT ONCE YOU KNOW WHERE IT IS…
  • 27. YOU CAN ALSO ADD THIS TO YOUR TRAVIS YAML language: ruby
 rvm:
 - 2.2.0
 - 2.0.0 deploy:
 provider: rubygems
 api_key:
 secure: VThxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
 gem: expect-behaviors
 on:
 tags: true
 repo: francisluong/expect-behaviors install:
 - bundle install script:
 - uname -s
 - rake test addons:
 code_climate:
 repo_token: da6828XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  • 28. THEN ADD MORE BUTTONS TO YOUR README.MD
  • 32. RESOURCES ➤ http://www.francisluong.com/blog-network-automation/ 2016/3/13/travis-ruby-gems ➤ https://rubygems.org/gems/expect-behaviors ➤ https://travis-ci.org/francisluong/expect-behaviors ➤ https://github.com/francisluong/expect-behaviors/releases ➤ Jeweler and Juwelier ➤ https://github.com/technicalpickles/jeweler ➤ https://github.com/flajann2/juwelier ➤ https://codeclimate.com/github/francisluong/expect- behaviors