狠狠撸

狠狠撸Share a Scribd company logo
CI/CD/DevOps
使用 travis-ci 服務
2017/03/24 @ 線上讀書會3
Who Am I
邵玉龍
Allen Shao
網路常用暱稱 bestlong
目前任職於某製造業資訊人員
全包工程師
專有名詞
CI
Continuous Integration
持續整合
CD
Continous Delivery
持續部署
DevOps
Development 和 Operations 的組合詞
Travis-CI 的特色
用來建構及測試與部署在 Github 上託管的代碼
對開源專案完全免費
私有專案有收費 http://travis-ci.com/plans
支援非常多種程式語言、資料庫
https://docs.travis-ci.com/
https://docs.travis-ci.com/user/database-setup/
一個設定檔
.travis-ci.yml
進入 CI 階段
持續整合
完成設定後只要有 git push 成功就會觸發建構
逐步調整 .travis.yml
由簡入繁
通知機制
預設發生錯誤或錯誤修復就會發 Email 通知相關人士
https://docs.travis-ci.com/user/notifications/#Default-notification-settings
可依需求調整,例如:Slack
CI部分
Demo
部署階段
本程序請小心使用,可能導致服務故障
警告
部署階段
讓程式架構盡量符合公認通則
https://12factor.net/
一個網站只對應一個需要部署的 branch
套用有條件發佈設定
https://docs.travis-ci.com/user/deployment/#Conditional-Releases-with-on%3A
例如
staging 只用 develop branch 部署
production 只用 master branch 部署
CD部分
Demo
與 Travis-CI 雷同的工具
JenkinsCI (Hudson)
CircleCI
GitLabCI
Atlassian Bamboo
Jetbrains TeamCity
...
參考資料
官網
https://travis-ci.org/
https://travis-ci.com/
如何使用Travis CI自動測試? | 点灯坊

More Related Content

What's hot (13)

CICD Workshop 20180922
CICD Workshop 20180922CICD Workshop 20180922
CICD Workshop 20180922
Earou Huang
?
DevOps Taiwan CICD Pipeline Tools
DevOps Taiwan CICD Pipeline ToolsDevOps Taiwan CICD Pipeline Tools
DevOps Taiwan CICD Pipeline Tools
scott liao
?
實現 Angular, Docker 與 Kubernetes 持續部署 (NG+2020)
實現 Angular, Docker 與 Kubernetes 持續部署 (NG+2020)實現 Angular, Docker 與 Kubernetes 持續部署 (NG+2020)
實現 Angular, Docker 與 Kubernetes 持續部署 (NG+2020)
Will Huang
?
Docker容器微服務 x WorkShop
Docker容器微服務 x WorkShopDocker容器微服務 x WorkShop
Docker容器微服務 x WorkShop
Philip Zheng
?
用 Go 語言打造 DevOps Bot
用 Go 語言打造 DevOps Bot用 Go 語言打造 DevOps Bot
用 Go 語言打造 DevOps Bot
Bo-Yi Wu
?
20170905 dev ops in hiiir
20170905 dev ops in hiiir20170905 dev ops in hiiir
20170905 dev ops in hiiir
Isaac Tseng
?
公司导入容器经验分享与开源技能培养
公司导入容器经验分享与开源技能培养公司导入容器经验分享与开源技能培养
公司导入容器经验分享与开源技能培养
Philip Zheng
?
微服务对滨罢人员的衝击
微服务对滨罢人员的衝击微服务对滨罢人员的衝击
微服务对滨罢人员的衝击
Philip Zheng
?
全新 Windows Server 2019 容器技術 及邁向與 Kubernetes 整合之路 (Windows Server 高峰會)
全新 Windows Server 2019 容器技術及邁向與 Kubernetes 整合之路 (Windows Server 高峰會)全新 Windows Server 2019 容器技術及邁向與 Kubernetes 整合之路 (Windows Server 高峰會)
全新 Windows Server 2019 容器技術 及邁向與 Kubernetes 整合之路 (Windows Server 高峰會)
Will Huang
?
為瞬間巨量做好準備 20180726
為瞬間巨量做好準備 20180726為瞬間巨量做好準備 20180726
為瞬間巨量做好準備 20180726
Earou Huang
?
桃园市教育局顿辞肠办别谤技术入门与实作
桃园市教育局顿辞肠办别谤技术入门与实作桃园市教育局顿辞肠办别谤技术入门与实作
桃园市教育局顿辞肠办别谤技术入门与实作
Philip Zheng
?
K8s removes dockershime
K8s removes dockershimeK8s removes dockershime
K8s removes dockershime
Philip Zheng
?
VSCode Remote Development
VSCode Remote DevelopmentVSCode Remote Development
VSCode Remote Development
Philip Zheng
?
CICD Workshop 20180922
CICD Workshop 20180922CICD Workshop 20180922
CICD Workshop 20180922
Earou Huang
?
DevOps Taiwan CICD Pipeline Tools
DevOps Taiwan CICD Pipeline ToolsDevOps Taiwan CICD Pipeline Tools
DevOps Taiwan CICD Pipeline Tools
scott liao
?
實現 Angular, Docker 與 Kubernetes 持續部署 (NG+2020)
實現 Angular, Docker 與 Kubernetes 持續部署 (NG+2020)實現 Angular, Docker 與 Kubernetes 持續部署 (NG+2020)
實現 Angular, Docker 與 Kubernetes 持續部署 (NG+2020)
Will Huang
?
Docker容器微服務 x WorkShop
Docker容器微服務 x WorkShopDocker容器微服務 x WorkShop
Docker容器微服務 x WorkShop
Philip Zheng
?
用 Go 語言打造 DevOps Bot
用 Go 語言打造 DevOps Bot用 Go 語言打造 DevOps Bot
用 Go 語言打造 DevOps Bot
Bo-Yi Wu
?
20170905 dev ops in hiiir
20170905 dev ops in hiiir20170905 dev ops in hiiir
20170905 dev ops in hiiir
Isaac Tseng
?
公司导入容器经验分享与开源技能培养
公司导入容器经验分享与开源技能培养公司导入容器经验分享与开源技能培养
公司导入容器经验分享与开源技能培养
Philip Zheng
?
微服务对滨罢人员的衝击
微服务对滨罢人员的衝击微服务对滨罢人员的衝击
微服务对滨罢人员的衝击
Philip Zheng
?
全新 Windows Server 2019 容器技術 及邁向與 Kubernetes 整合之路 (Windows Server 高峰會)
全新 Windows Server 2019 容器技術及邁向與 Kubernetes 整合之路 (Windows Server 高峰會)全新 Windows Server 2019 容器技術及邁向與 Kubernetes 整合之路 (Windows Server 高峰會)
全新 Windows Server 2019 容器技術 及邁向與 Kubernetes 整合之路 (Windows Server 高峰會)
Will Huang
?
為瞬間巨量做好準備 20180726
為瞬間巨量做好準備 20180726為瞬間巨量做好準備 20180726
為瞬間巨量做好準備 20180726
Earou Huang
?
桃园市教育局顿辞肠办别谤技术入门与实作
桃园市教育局顿辞肠办别谤技术入门与实作桃园市教育局顿辞肠办别谤技术入门与实作
桃园市教育局顿辞肠办别谤技术入门与实作
Philip Zheng
?
K8s removes dockershime
K8s removes dockershimeK8s removes dockershime
K8s removes dockershime
Philip Zheng
?
VSCode Remote Development
VSCode Remote DevelopmentVSCode Remote Development
VSCode Remote Development
Philip Zheng
?

Viewers also liked (20)

How to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your NicheHow to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your Niche
Leslie Samuel
?
善用 MySQL 及 PostgreSQL - RDBMS 的逆襲 - part1
善用 MySQL 及 PostgreSQL - RDBMS 的逆襲 - part1善用 MySQL 及 PostgreSQL - RDBMS 的逆襲 - part1
善用 MySQL 及 PostgreSQL - RDBMS 的逆襲 - part1
Yi-Feng Tzeng
?
Git and GitHub workflows
Git and GitHub workflowsGit and GitHub workflows
Git and GitHub workflows
Arthur Shvetsov
?
創科 從零開始認識 Docker
創科 從零開始認識 Docker創科 從零開始認識 Docker
創科 從零開始認識 Docker
創科資訊 Trunk Studio
?
Git Series. Episode 3. Git Flow and Github-Flow
Git Series. Episode 3. Git Flow and Github-FlowGit Series. Episode 3. Git Flow and Github-Flow
Git Series. Episode 3. Git Flow and Github-Flow
Mikhail Melnik
?
Github flow
Github flowGithub flow
Github flow
Ben Mabey
?
Comarch Paiement MobileComarch Paiement Mobile
Comarch Paiement Mobile
Comarch SAS
?
Web development, from git flow to github flow
Web development, from git flow to github flowWeb development, from git flow to github flow
Web development, from git flow to github flow
Caesar Chi
?
狠狠撸 of the Month - Payment cards in Nigeria
狠狠撸 of the Month - Payment cards in Nigeria狠狠撸 of the Month - Payment cards in Nigeria
狠狠撸 of the Month - Payment cards in Nigeria
Marc Zander
?
DevOps+Data: Working with Source Control
DevOps+Data: Working with Source ControlDevOps+Data: Working with Source Control
DevOps+Data: Working with Source Control
Ed Leighton-Dick
?
Gc in golang
Gc in golangGc in golang
Gc in golang
Genchi Lu
?
笔补测笔补濒アカウントを使った便利で安心なプラットフォーム运用
笔补测笔补濒アカウントを使った便利で安心なプラットフォーム运用笔补测笔补濒アカウントを使った便利で安心なプラットフォーム运用
笔补测笔补濒アカウントを使った便利で安心なプラットフォーム运用
Junichi Okamura
?
Iot_algyan_hands-on_20161129
Iot_algyan_hands-on_20161129Iot_algyan_hands-on_20161129
Iot_algyan_hands-on_20161129
Junichi Okamura
?
Paradigm shift in CI at PayPal with Docker and Mesos
Paradigm shift in CI at PayPal with Docker and MesosParadigm shift in CI at PayPal with Docker and Mesos
Paradigm shift in CI at PayPal with Docker and Mesos
Sathiya Narayanan
?
PayPal MasterBrand Guidelines
PayPal MasterBrand GuidelinesPayPal MasterBrand Guidelines
PayPal MasterBrand Guidelines
Bill Smith
?
Tokyo nodefestival workshop_20161112
Tokyo nodefestival workshop_20161112Tokyo nodefestival workshop_20161112
Tokyo nodefestival workshop_20161112
Junichi Okamura
?
The Future of Payments: Next-Gen Payment Processing Technologies
The Future of Payments: Next-Gen Payment Processing TechnologiesThe Future of Payments: Next-Gen Payment Processing Technologies
The Future of Payments: Next-Gen Payment Processing Technologies
Dustin Lichey, PRM
?
CI and CD at Scale: Scaling Jenkins with Docker and Apache Mesos
CI and CD at Scale: Scaling Jenkins with Docker and Apache MesosCI and CD at Scale: Scaling Jenkins with Docker and Apache Mesos
CI and CD at Scale: Scaling Jenkins with Docker and Apache Mesos
Carlos Sanchez
?
Introducing Apache Mesos
Introducing Apache MesosIntroducing Apache Mesos
Introducing Apache Mesos
Matthias Furrer
?
Jenkins в docker in mesos in ...
Jenkins в docker in mesos in ...Jenkins в docker in mesos in ...
Jenkins в docker in mesos in ...
Кирилл Толкачёв
?
How to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your NicheHow to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your Niche
Leslie Samuel
?
善用 MySQL 及 PostgreSQL - RDBMS 的逆襲 - part1
善用 MySQL 及 PostgreSQL - RDBMS 的逆襲 - part1善用 MySQL 及 PostgreSQL - RDBMS 的逆襲 - part1
善用 MySQL 及 PostgreSQL - RDBMS 的逆襲 - part1
Yi-Feng Tzeng
?
Git Series. Episode 3. Git Flow and Github-Flow
Git Series. Episode 3. Git Flow and Github-FlowGit Series. Episode 3. Git Flow and Github-Flow
Git Series. Episode 3. Git Flow and Github-Flow
Mikhail Melnik
?
Comarch Paiement MobileComarch Paiement Mobile
Comarch Paiement Mobile
Comarch SAS
?
Web development, from git flow to github flow
Web development, from git flow to github flowWeb development, from git flow to github flow
Web development, from git flow to github flow
Caesar Chi
?
狠狠撸 of the Month - Payment cards in Nigeria
狠狠撸 of the Month - Payment cards in Nigeria狠狠撸 of the Month - Payment cards in Nigeria
狠狠撸 of the Month - Payment cards in Nigeria
Marc Zander
?
DevOps+Data: Working with Source Control
DevOps+Data: Working with Source ControlDevOps+Data: Working with Source Control
DevOps+Data: Working with Source Control
Ed Leighton-Dick
?
笔补测笔补濒アカウントを使った便利で安心なプラットフォーム运用
笔补测笔补濒アカウントを使った便利で安心なプラットフォーム运用笔补测笔补濒アカウントを使った便利で安心なプラットフォーム运用
笔补测笔补濒アカウントを使った便利で安心なプラットフォーム运用
Junichi Okamura
?
Iot_algyan_hands-on_20161129
Iot_algyan_hands-on_20161129Iot_algyan_hands-on_20161129
Iot_algyan_hands-on_20161129
Junichi Okamura
?
Paradigm shift in CI at PayPal with Docker and Mesos
Paradigm shift in CI at PayPal with Docker and MesosParadigm shift in CI at PayPal with Docker and Mesos
Paradigm shift in CI at PayPal with Docker and Mesos
Sathiya Narayanan
?
PayPal MasterBrand Guidelines
PayPal MasterBrand GuidelinesPayPal MasterBrand Guidelines
PayPal MasterBrand Guidelines
Bill Smith
?
Tokyo nodefestival workshop_20161112
Tokyo nodefestival workshop_20161112Tokyo nodefestival workshop_20161112
Tokyo nodefestival workshop_20161112
Junichi Okamura
?
The Future of Payments: Next-Gen Payment Processing Technologies
The Future of Payments: Next-Gen Payment Processing TechnologiesThe Future of Payments: Next-Gen Payment Processing Technologies
The Future of Payments: Next-Gen Payment Processing Technologies
Dustin Lichey, PRM
?
CI and CD at Scale: Scaling Jenkins with Docker and Apache Mesos
CI and CD at Scale: Scaling Jenkins with Docker and Apache MesosCI and CD at Scale: Scaling Jenkins with Docker and Apache Mesos
CI and CD at Scale: Scaling Jenkins with Docker and Apache Mesos
Carlos Sanchez
?

Similar to CI/CD/DevOps 使用 travis ci 服務 (20)

[MonkeyFest 2018 ] App 開發與 DevOps 上的實踐
[MonkeyFest 2018 ] App 開發與 DevOps 上的實踐[MonkeyFest 2018 ] App 開發與 DevOps 上的實踐
[MonkeyFest 2018 ] App 開發與 DevOps 上的實踐
Edward Kuo
?
[Agile Tour Hsinchu 2019] Our practice in the DevOps Process for Manufacture ...
[Agile Tour Hsinchu 2019] Our practice in the DevOps Process for Manufacture ...[Agile Tour Hsinchu 2019] Our practice in the DevOps Process for Manufacture ...
[Agile Tour Hsinchu 2019] Our practice in the DevOps Process for Manufacture ...
Edward Kuo
?
Dev ops 簡介
Dev ops 簡介Dev ops 簡介
Dev ops 簡介
hugo lu
?
twMVC#24 | 開發團隊的敏捷之路(未完成)
twMVC#24 | 開發團隊的敏捷之路(未完成)twMVC#24 | 開發團隊的敏捷之路(未完成)
twMVC#24 | 開發團隊的敏捷之路(未完成)
twMVC
?
Effective DevOps (Agile Tour HsinChu 2017)
Effective DevOps (Agile Tour HsinChu 2017)Effective DevOps (Agile Tour HsinChu 2017)
Effective DevOps (Agile Tour HsinChu 2017)
Chen Cheng-Wei
?
Effective DevOps:一場文化與技術的轉型運動 (陳正瑋)
Effective DevOps:一場文化與技術的轉型運動  (陳正瑋)Effective DevOps:一場文化與技術的轉型運動  (陳正瑋)
Effective DevOps:一場文化與技術的轉型運動 (陳正瑋)
AgileTour@TW
?
How to integrate GitLab CICD into B2B service
How to integrate GitLab CICD into B2B serviceHow to integrate GitLab CICD into B2B service
How to integrate GitLab CICD into B2B service
Alex Su
?
DevSecOps-The Key of Continuous Security
DevSecOps-The Key of Continuous SecurityDevSecOps-The Key of Continuous Security
DevSecOps-The Key of Continuous Security
4ndersonLin
?
2024/11/29 DevOps Taiwan #64 : 從初建到進階:打造符合公司需求的混合雲端 GitLab DevOps 流水線
2024/11/29 DevOps Taiwan #64 : 從初建到進階:打造符合公司需求的混合雲端 GitLab DevOps 流水線2024/11/29 DevOps Taiwan #64 : 從初建到進階:打造符合公司需求的混合雲端 GitLab DevOps 流水線
2024/11/29 DevOps Taiwan #64 : 從初建到進階:打造符合公司需求的混合雲端 GitLab DevOps 流水線
Freddy Fan
?
Ruby on rails部署
Ruby on rails部署Ruby on rails部署
Ruby on rails部署
Deng Peng
?
持续交付的魅力
持续交付的魅力持续交付的魅力
持续交付的魅力
Qiao Liang
?
[2019 DevOpsDays Taipei]Azure DevOps 建立?DevOps?團隊
[2019 DevOpsDays Taipei]Azure DevOps 建立?DevOps?團隊[2019 DevOpsDays Taipei]Azure DevOps 建立?DevOps?團隊
[2019 DevOpsDays Taipei]Azure DevOps 建立?DevOps?團隊
Edward Kuo
?
2020 gops-旷视城市大脑私有云平台实践-刘天伟
2020 gops-旷视城市大脑私有云平台实践-刘天伟2020 gops-旷视城市大脑私有云平台实践-刘天伟
2020 gops-旷视城市大脑私有云平台实践-刘天伟
Tianwei Liu
?
摩登開發團隊的DevOps之道 (@DevOpsTaiwan)
摩登開發團隊的DevOps之道 (@DevOpsTaiwan)摩登開發團隊的DevOps之道 (@DevOpsTaiwan)
摩登開發團隊的DevOps之道 (@DevOpsTaiwan)
Chen Cheng-Wei
?
Testing in Production, Deploy on Fridays
Testing in Production, Deploy on FridaysTesting in Production, Deploy on Fridays
Testing in Production, Deploy on Fridays
Yi-Feng Tzeng
?
GNU Build System
GNU Build SystemGNU Build System
GNU Build System
imacat .
?
Continuous integration
Continuous integrationContinuous integration
Continuous integration
netdbncku
?
蓝鲸平台培训冲痴1.0.辫辫迟虫
蓝鲸平台培训冲痴1.0.辫辫迟虫蓝鲸平台培训冲痴1.0.辫辫迟虫
蓝鲸平台培训冲痴1.0.辫辫迟虫
ssuser693b9a
?
91APP: 從 "零" 開始的 DevOps
91APP: 從 "零" 開始的 DevOps91APP: 從 "零" 開始的 DevOps
91APP: 從 "零" 開始的 DevOps
Andrew Wu
?
[MonkeyFest 2018 ] App 開發與 DevOps 上的實踐
[MonkeyFest 2018 ] App 開發與 DevOps 上的實踐[MonkeyFest 2018 ] App 開發與 DevOps 上的實踐
[MonkeyFest 2018 ] App 開發與 DevOps 上的實踐
Edward Kuo
?
[Agile Tour Hsinchu 2019] Our practice in the DevOps Process for Manufacture ...
[Agile Tour Hsinchu 2019] Our practice in the DevOps Process for Manufacture ...[Agile Tour Hsinchu 2019] Our practice in the DevOps Process for Manufacture ...
[Agile Tour Hsinchu 2019] Our practice in the DevOps Process for Manufacture ...
Edward Kuo
?
Dev ops 簡介
Dev ops 簡介Dev ops 簡介
Dev ops 簡介
hugo lu
?
twMVC#24 | 開發團隊的敏捷之路(未完成)
twMVC#24 | 開發團隊的敏捷之路(未完成)twMVC#24 | 開發團隊的敏捷之路(未完成)
twMVC#24 | 開發團隊的敏捷之路(未完成)
twMVC
?
Effective DevOps (Agile Tour HsinChu 2017)
Effective DevOps (Agile Tour HsinChu 2017)Effective DevOps (Agile Tour HsinChu 2017)
Effective DevOps (Agile Tour HsinChu 2017)
Chen Cheng-Wei
?
Effective DevOps:一場文化與技術的轉型運動 (陳正瑋)
Effective DevOps:一場文化與技術的轉型運動  (陳正瑋)Effective DevOps:一場文化與技術的轉型運動  (陳正瑋)
Effective DevOps:一場文化與技術的轉型運動 (陳正瑋)
AgileTour@TW
?
How to integrate GitLab CICD into B2B service
How to integrate GitLab CICD into B2B serviceHow to integrate GitLab CICD into B2B service
How to integrate GitLab CICD into B2B service
Alex Su
?
DevSecOps-The Key of Continuous Security
DevSecOps-The Key of Continuous SecurityDevSecOps-The Key of Continuous Security
DevSecOps-The Key of Continuous Security
4ndersonLin
?
2024/11/29 DevOps Taiwan #64 : 從初建到進階:打造符合公司需求的混合雲端 GitLab DevOps 流水線
2024/11/29 DevOps Taiwan #64 : 從初建到進階:打造符合公司需求的混合雲端 GitLab DevOps 流水線2024/11/29 DevOps Taiwan #64 : 從初建到進階:打造符合公司需求的混合雲端 GitLab DevOps 流水線
2024/11/29 DevOps Taiwan #64 : 從初建到進階:打造符合公司需求的混合雲端 GitLab DevOps 流水線
Freddy Fan
?
Ruby on rails部署
Ruby on rails部署Ruby on rails部署
Ruby on rails部署
Deng Peng
?
持续交付的魅力
持续交付的魅力持续交付的魅力
持续交付的魅力
Qiao Liang
?
[2019 DevOpsDays Taipei]Azure DevOps 建立?DevOps?團隊
[2019 DevOpsDays Taipei]Azure DevOps 建立?DevOps?團隊[2019 DevOpsDays Taipei]Azure DevOps 建立?DevOps?團隊
[2019 DevOpsDays Taipei]Azure DevOps 建立?DevOps?團隊
Edward Kuo
?
2020 gops-旷视城市大脑私有云平台实践-刘天伟
2020 gops-旷视城市大脑私有云平台实践-刘天伟2020 gops-旷视城市大脑私有云平台实践-刘天伟
2020 gops-旷视城市大脑私有云平台实践-刘天伟
Tianwei Liu
?
摩登開發團隊的DevOps之道 (@DevOpsTaiwan)
摩登開發團隊的DevOps之道 (@DevOpsTaiwan)摩登開發團隊的DevOps之道 (@DevOpsTaiwan)
摩登開發團隊的DevOps之道 (@DevOpsTaiwan)
Chen Cheng-Wei
?
Testing in Production, Deploy on Fridays
Testing in Production, Deploy on FridaysTesting in Production, Deploy on Fridays
Testing in Production, Deploy on Fridays
Yi-Feng Tzeng
?
GNU Build System
GNU Build SystemGNU Build System
GNU Build System
imacat .
?
Continuous integration
Continuous integrationContinuous integration
Continuous integration
netdbncku
?
蓝鲸平台培训冲痴1.0.辫辫迟虫
蓝鲸平台培训冲痴1.0.辫辫迟虫蓝鲸平台培训冲痴1.0.辫辫迟虫
蓝鲸平台培训冲痴1.0.辫辫迟虫
ssuser693b9a
?
91APP: 從 "零" 開始的 DevOps
91APP: 從 "零" 開始的 DevOps91APP: 從 "零" 開始的 DevOps
91APP: 從 "零" 開始的 DevOps
Andrew Wu
?

CI/CD/DevOps 使用 travis ci 服務