Suche senden
Hochladen
Bitbucket pipeline CI
•
0 gefällt mir
•
286 views
Zero Huang
Folgen
Continuous Integration with Bitbucket Pipeline
Weniger lesen
Mehr lesen
Technologie
Melden
Teilen
Melden
Teilen
1 von 76
Jetzt herunterladen
Downloaden Sie, um offline zu lesen
Empfohlen
用 Docker 改善團隊合作模式
用 Docker 改善團隊合作模式
Bo-Yi Wu
My DevOps Tour 0.1
My DevOps Tour 0.1
Chu-Siang Lai
Continuous Delivery Workshop with Ansible x GitLab CI (3rd)
Continuous Delivery Workshop with Ansible x GitLab CI (3rd)
Chu-Siang Lai
Git flow 與團隊合作
Git flow 與團隊合作
Bo-Yi Wu
Introduction to git
Introduction to git
Bo-Yi Wu
運用 Docker 整合 Laravel 提升團隊開發效率
運用 Docker 整合 Laravel 提升團隊開發效率
Bo-Yi Wu
用 Drone 打造輕量級容器持續交付平台
用 Drone 打造輕量級容器持續交付平台
Bo-Yi Wu
Continuous Delivery Workshop with Ansible x GitLab CI (5th)
Continuous Delivery Workshop with Ansible x GitLab CI (5th)
Chu-Siang Lai
Empfohlen
用 Docker 改善團隊合作模式
用 Docker 改善團隊合作模式
Bo-Yi Wu
My DevOps Tour 0.1
My DevOps Tour 0.1
Chu-Siang Lai
Continuous Delivery Workshop with Ansible x GitLab CI (3rd)
Continuous Delivery Workshop with Ansible x GitLab CI (3rd)
Chu-Siang Lai
Git flow 與團隊合作
Git flow 與團隊合作
Bo-Yi Wu
Introduction to git
Introduction to git
Bo-Yi Wu
運用 Docker 整合 Laravel 提升團隊開發效率
運用 Docker 整合 Laravel 提升團隊開發效率
Bo-Yi Wu
用 Drone 打造輕量級容器持續交付平台
用 Drone 打造輕量級容器持續交付平台
Bo-Yi Wu
Continuous Delivery Workshop with Ansible x GitLab CI (5th)
Continuous Delivery Workshop with Ansible x GitLab CI (5th)
Chu-Siang Lai
COSCUP 2016 Workshop: 用 Docker 架設班級 git-it 練習環境
COSCUP 2016 Workshop: 用 Docker 架設班級 git-it 練習環境
均民 戴
20170905 dev ops in hiiir
20170905 dev ops in hiiir
Isaac Tseng
開發人員不可不知的 Windows Container 容器技術預覽
開發人員不可不知的 Windows Container 容器技術預覽
Will Huang
Introduction to Golang final
Introduction to Golang final
Paul Chao
Ian 20150515 grunt
Ian 20150515 grunt
LearningTech
Docker 基礎介紹與實戰
Docker 基礎介紹與實戰
Bo-Yi Wu
NF core-workflow
NF core-workflow
ChenzheLuo
Go 語言基礎簡介
Go 語言基礎簡介
Bo-Yi Wu
容器式軟體開發介紹
容器式軟體開發介紹
Philip Zheng
Continuous Delivery Workshop with Ansible x GitLab CI
Continuous Delivery Workshop with Ansible x GitLab CI
Chu-Siang Lai
Ansible & GitLab CI / CD Workshop 101 ( @Agile Tour Taipei 2017)
Ansible & GitLab CI / CD Workshop 101 ( @Agile Tour Taipei 2017)
Chen Cheng-Wei
用 Go 語言打造 DevOps Bot
用 Go 語言打造 DevOps Bot
Bo-Yi Wu
容器式基礎架構介紹
容器式基礎架構介紹
Philip Zheng
JCConf2016 Jenkins Pipeline
JCConf2016 Jenkins Pipeline
Ching Yi Chan
Dev-Ops与Docker的最佳实践 QCon2016 北京站演讲
Dev-Ops与Docker的最佳实践 QCon2016 北京站演讲
ChinaNetCloud
GIT實務操作與理論
GIT實務操作與理論
鵬 大
連哈秋都懂的Git教學
連哈秋都懂的Git教學
hydai
Continuous integration
Continuous integration
netdbncku
Docker 淺入淺出
Docker 淺入淺出
Miles Chou
寫給大家的 Git 教學
寫給大家的 Git 教學
littlebtc
容器與 Gitlab CI 應用
容器與 Gitlab CI 應用
Philip Zheng
CYBERSEC 2020 臺灣資安大會 - 第一次使用 k8s 就不埋漏洞
CYBERSEC 2020 臺灣資安大會 - 第一次使用 k8s 就不埋漏洞
Secview
Weitere ähnliche Inhalte
Was ist angesagt?
COSCUP 2016 Workshop: 用 Docker 架設班級 git-it 練習環境
COSCUP 2016 Workshop: 用 Docker 架設班級 git-it 練習環境
均民 戴
20170905 dev ops in hiiir
20170905 dev ops in hiiir
Isaac Tseng
開發人員不可不知的 Windows Container 容器技術預覽
開發人員不可不知的 Windows Container 容器技術預覽
Will Huang
Introduction to Golang final
Introduction to Golang final
Paul Chao
Ian 20150515 grunt
Ian 20150515 grunt
LearningTech
Docker 基礎介紹與實戰
Docker 基礎介紹與實戰
Bo-Yi Wu
NF core-workflow
NF core-workflow
ChenzheLuo
Go 語言基礎簡介
Go 語言基礎簡介
Bo-Yi Wu
容器式軟體開發介紹
容器式軟體開發介紹
Philip Zheng
Continuous Delivery Workshop with Ansible x GitLab CI
Continuous Delivery Workshop with Ansible x GitLab CI
Chu-Siang Lai
Ansible & GitLab CI / CD Workshop 101 ( @Agile Tour Taipei 2017)
Ansible & GitLab CI / CD Workshop 101 ( @Agile Tour Taipei 2017)
Chen Cheng-Wei
用 Go 語言打造 DevOps Bot
用 Go 語言打造 DevOps Bot
Bo-Yi Wu
容器式基礎架構介紹
容器式基礎架構介紹
Philip Zheng
JCConf2016 Jenkins Pipeline
JCConf2016 Jenkins Pipeline
Ching Yi Chan
Dev-Ops与Docker的最佳实践 QCon2016 北京站演讲
Dev-Ops与Docker的最佳实践 QCon2016 北京站演讲
ChinaNetCloud
GIT實務操作與理論
GIT實務操作與理論
鵬 大
連哈秋都懂的Git教學
連哈秋都懂的Git教學
hydai
Continuous integration
Continuous integration
netdbncku
Docker 淺入淺出
Docker 淺入淺出
Miles Chou
寫給大家的 Git 教學
寫給大家的 Git 教學
littlebtc
Was ist angesagt?
(20)
COSCUP 2016 Workshop: 用 Docker 架設班級 git-it 練習環境
COSCUP 2016 Workshop: 用 Docker 架設班級 git-it 練習環境
20170905 dev ops in hiiir
20170905 dev ops in hiiir
開發人員不可不知的 Windows Container 容器技術預覽
開發人員不可不知的 Windows Container 容器技術預覽
Introduction to Golang final
Introduction to Golang final
Ian 20150515 grunt
Ian 20150515 grunt
Docker 基礎介紹與實戰
Docker 基礎介紹與實戰
NF core-workflow
NF core-workflow
Go 語言基礎簡介
Go 語言基礎簡介
容器式軟體開發介紹
容器式軟體開發介紹
Continuous Delivery Workshop with Ansible x GitLab CI
Continuous Delivery Workshop with Ansible x GitLab CI
Ansible & GitLab CI / CD Workshop 101 ( @Agile Tour Taipei 2017)
Ansible & GitLab CI / CD Workshop 101 ( @Agile Tour Taipei 2017)
用 Go 語言打造 DevOps Bot
用 Go 語言打造 DevOps Bot
容器式基礎架構介紹
容器式基礎架構介紹
JCConf2016 Jenkins Pipeline
JCConf2016 Jenkins Pipeline
Dev-Ops与Docker的最佳实践 QCon2016 北京站演讲
Dev-Ops与Docker的最佳实践 QCon2016 北京站演讲
GIT實務操作與理論
GIT實務操作與理論
連哈秋都懂的Git教學
連哈秋都懂的Git教學
Continuous integration
Continuous integration
Docker 淺入淺出
Docker 淺入淺出
寫給大家的 Git 教學
寫給大家的 Git 教學
Ähnlich wie Bitbucket pipeline CI
容器與 Gitlab CI 應用
容器與 Gitlab CI 應用
Philip Zheng
CYBERSEC 2020 臺灣資安大會 - 第一次使用 k8s 就不埋漏洞
CYBERSEC 2020 臺灣資安大會 - 第一次使用 k8s 就不埋漏洞
Secview
学习 CodeIgniter
学习 CodeIgniter
BruceWolf
Build Your Own Android Toolchain from scratch
Build Your Own Android Toolchain from scratch
National Cheng Kung University
Software Engineer Talk
Software Engineer Talk
Larry Cai
軟體工程(總結篇)
軟體工程(總結篇)
鍾誠 陳鍾誠
Scrum gathering 2012 shanghai 精益与持续改进分会场演讲话题: 大型企业ci平台建设和实施分享(陈小光)
Scrum gathering 2012 shanghai 精益与持续改进分会场演讲话题: 大型企业ci平台建设和实施分享(陈小光)
LetAgileFly
用Bluemix DevOps 建立良好的團隊開發與版本控制
用Bluemix DevOps 建立良好的團隊開發與版本控制
Hsuan-Ju Lin
從頭打造 C#、.NET 與 ASP.NET Core 開發環境
從頭打造 C#、.NET 與 ASP.NET Core 開發環境
Will Huang
GNU Build System
GNU Build System
imacat .
Scrum gathering 2012 Shanghai_精益与持续改进分会场演讲话题: 大型企业ci平台建设和实施分享(陈小光)
Scrum gathering 2012 Shanghai_精益与持续改进分会场演讲话题: 大型企业ci平台建设和实施分享(陈小光)
JoXuZi
twMVC#42 Azure DevOps Service Pipeline設計與非正常應用
twMVC#42 Azure DevOps Service Pipeline設計與非正常應用
twMVC
Uliweb cheat sheet_0.1
Uliweb cheat sheet_0.1
modou li
自动化运维管理
自动化运维管理
frankwsj
Docker tutorial
Docker tutorial
azole Lai
Beyond rails server
Beyond rails server
Michael Chen
常用开发工具介绍
常用开发工具介绍
haozes
Python 于 webgame 的应用
Python 于 webgame 的应用
勇浩 赖
02.python.开发最佳实践
02.python.开发最佳实践
Na Lee
Clojure cnclojure-meetup
Clojure cnclojure-meetup
sunng87
Ähnlich wie Bitbucket pipeline CI
(20)
容器與 Gitlab CI 應用
容器與 Gitlab CI 應用
CYBERSEC 2020 臺灣資安大會 - 第一次使用 k8s 就不埋漏洞
CYBERSEC 2020 臺灣資安大會 - 第一次使用 k8s 就不埋漏洞
学习 CodeIgniter
学习 CodeIgniter
Build Your Own Android Toolchain from scratch
Build Your Own Android Toolchain from scratch
Software Engineer Talk
Software Engineer Talk
軟體工程(總結篇)
軟體工程(總結篇)
Scrum gathering 2012 shanghai 精益与持续改进分会场演讲话题: 大型企业ci平台建设和实施分享(陈小光)
Scrum gathering 2012 shanghai 精益与持续改进分会场演讲话题: 大型企业ci平台建设和实施分享(陈小光)
用Bluemix DevOps 建立良好的團隊開發與版本控制
用Bluemix DevOps 建立良好的團隊開發與版本控制
從頭打造 C#、.NET 與 ASP.NET Core 開發環境
從頭打造 C#、.NET 與 ASP.NET Core 開發環境
GNU Build System
GNU Build System
Scrum gathering 2012 Shanghai_精益与持续改进分会场演讲话题: 大型企业ci平台建设和实施分享(陈小光)
Scrum gathering 2012 Shanghai_精益与持续改进分会场演讲话题: 大型企业ci平台建设和实施分享(陈小光)
twMVC#42 Azure DevOps Service Pipeline設計與非正常應用
twMVC#42 Azure DevOps Service Pipeline設計與非正常應用
Uliweb cheat sheet_0.1
Uliweb cheat sheet_0.1
自动化运维管理
自动化运维管理
Docker tutorial
Docker tutorial
Beyond rails server
Beyond rails server
常用开发工具介绍
常用开发工具介绍
Python 于 webgame 的应用
Python 于 webgame 的应用
02.python.开发最佳实践
02.python.开发最佳实践
Clojure cnclojure-meetup
Clojure cnclojure-meetup
Bitbucket pipeline CI
1.
Continue Integration on Bitbucket Pipelines Zero 2019/09/20
2.
Outline Continuous Integration
介紹 Continuous Delivery 簡介 Bitbucket Pipleline 學教 2
3.
十年前的開發流程 瀑布式開發流程 3
4.
十年前的開發流程 瀑布式開發流程 – 迭代
(iteration) 速度慢 – 好不容易實作完成需求就改了 – 測試到一半,程式按照需求改寫 – ..... – 計畫 不上變化趕 4
5.
敏捷式開發 敏捷式開發流程 5
6.
敏捷式開發 敏捷式開發流程 – 認
需求本來就是會改變的為 – 專案並非一次到位,漸進開發 – 迭代速度較快 ( 有些團隊以「天」 單位為 ) 6
7.
8.
敏捷式開發 重視團隊成員之間的溝通 快速回應變化
重視配套工具、軟體 8
9.
敏捷式開發 - 重視配套工具
事件追蹤工具 (issue tracker) 溝通工具 (Slack, Google Chat ... et c) 專案文件 (Wiki ... etc) 程式碼靜態分析工具 功能測試工具 自動佈署工具 錯誤追蹤 (Rollbar ... etc) 9
10.
敏捷式開發 - 重視配套工具
事件追蹤工具 (issue tracker) 溝通工具 (Slack, Google Chat ... et c) 專案文件 (Wiki ... etc) 程式碼靜態分析工具 功能測試工具 自動佈署工具 錯誤追蹤 (Rollbar ... etc) 10 本次討論內容
11.
Continue Integration
12.
Continuous Integration 縮寫為
CI 整合 – features – bug fixes – 測試 – .... etc 12
13.
Continuous Integration 專案有異動就做一次整合
一天至少一次整合 (nightly build) dev / testing / stage / production 詳細的整合結果、報告 13
14.
Continuous Integration 優點 –
流程自動化 – 快速了解 品狀態產 – 增加機動性 – 提高專案品質 14
15.
Continuous Integration 缺點 –
初期建制成本高 – CI 環境較複雜、機動性差 – 大型專案、團隊較辛苦 15
16.
Continuous Delivery 簡稱
CD – 將 品交付產 (delivery) 給客戶 – 盡快展示實作成果 – 讓客戶了解需求、規格是否正確 16
17.
Bitbucket Pipelines
18.
Bitbucket Pipelines Issue
tracker Wiki 文件功能 Project building 自動化測試 自動化佈署 .... and more 18
19.
Bitbucket Pipelines 19 Docker
container Environment isolation Set build / test scripts in YAML Different build / test behaviour based on different branch
20.
Bitbucket Pipelines 20 Put
all scripts in bitbucket.yml
21.
bitbucket.yml 21 要做的工作按照順序描述 每項工作都在獨立的
docker containe r (isolation) 使用 YAML 描述語言,入門門檻低 ( 進階功能就難說了 .... ㄎㄎ )
22.
Reserved Words 22 幾個較常見的保留字 –
pipelines – image – default / branches / tags – custom
23.
撰寫 bitbucket.yml 23 構思需要做的是
些事項哪 – building ? – testing ? 排好順序,開始撰寫 scripts
24.
撰寫 bitbucket.yml 24 要使用
PHP 環境 – image: php-7.2 使用 node.js – image: node:10.15 也可自行建立 docker image – image: johnroyer/laravel-testing
25.
撰寫 bitbucket.yml 25 建立流程
pipeline pipeline: - step: name: build - step: name: unit test
26.
撰寫 bitbucket.yml 26 不同
branch 做不同的動作 pipeline: default: branches: master: stage:
27.
撰寫 bitbucket.yml 27 透過
step 指定操作順序 pipeline: default: - step: name: build ENV script: - cd /home/laravel - ./artisan XXX
28.
撰寫 bitbucket.yml 28 script
的指令 == shell script script: - cd /home/laravel/ - chmod -R 777 storage/ - composer install - ./artisan key:generate
29.
撰寫 bitbucket.yml 29 注意:
bitbucket.yml 均使用 root 執 行 script: - apt-get install php7.3-cli - cd /home/laravel/ - chmod -R 777 storage/ - ./artisan key:generate
30.
觸發 bitbucket.yml 30 被觸發的時機 –
設定檔有對應的 branch – 有 default 的設定 – git push bitbucket susccess
31.
觸發 bitbucket.yml 31 $ git
push origin devel
32.
執行測試 32 PHP 語法檢查
Unit test via PHPUnit
33.
PHP 語法檢查 33 -
step name: "Check PHP syntax" script: - find -name '*.php' -exec php -l {} ;
34.
PHP 語法檢查 34 -
step name: "Run php tests" script: - composer install --no-interaction --no-progress - vender/bin/phpunit
35.
執行測試 35 - step script: - ..... -
step script: - ..... - .....
36.
Task Paralleling
37.
執行測試 37
38.
執行測試 38 每個 step
都是獨立的 (isolation) => 可以同時進行 使用 parallel 參數
39.
執行測試 39 - parallel - step script: -
..... - step script: - ..... - .....
40.
執行測試 40 - parallel =>
同時進行
41.
Simple Review
42.
Review 42 "pipeline" 開始建立
scipt 透過 "image" 建立執行環境
43.
Review 43 "default" 代表任意
branch 透過 "branches" 特定為 branch 撰寫流程 也可針對 feature branch 或 tag
44.
Review 44 可用 "perellel"
同時處理工作項目 回顧一下前面的簡報 ....
45.
Bitbucket Pipelines Issue
tracker Wiki 文件功能 Project building 自動化測試 自動化佈署 .... and more 45
46.
Bitbucket Pipelines 似乎還漏掉了些什
?麼 46
47.
Bitbucket Pipelines Issue
tracker Wiki 文件功能 Project building 自動化測試 自動化佈署 .... and more 47
48.
Bitbucket Pipelines CD
不再本次的討論範疇 「建立測試環境」其實沒那 簡單麼 48
49.
Enviroment Building
50.
Bitbucket Pipelines 安裝
composer & checkout vendor curl -ss https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer composer install --no-interaction --no-progress --prefer-dist 50
51.
Bitbucket Pipelines 使用
root 執行 scripts 可安裝、刪除、修改 packages 可依需求調整 daemon config 51
52.
Bitbucket Pipelines 安裝專案會使用到的
extension apt-get install -y unzip libssl-dev libmcrypt-dev libpng-dev docker-php-ext-install pdo_mysql pdo zip pcntl 52
53.
Bitbucket Pipelines 部
專案比較辛苦份 nvm install 10.XX nvm use cd path/to/npm/ npm install npm run lint npm run build 53
54.
Bitbucket Pipelines 十年挑戰: 家你
node_modules 有幾 MB ? 54
55.
Bitbucket Pipelines 使用
cache 來加速環境建制 step 順利執行完成後會備 指定份 cache cache 並非永久 cache cache 使用限制 55
56.
Bitbucket Pipelines pipelines: default: - step: caches:
# cache node_modules - node script: - npm install 56
57.
Bitbucket Pipelines pipelines: default: - step: caches: #
~/.composer/cache - composer script: - npm install 57
58.
59.
Bitbucket Pipelines 可自訂要
cache 的項目 – 定義 keyword – 定義要 cache 的 target 59
60.
Bitbucket Pipelines definitions: caches: php-ext: /usr/src/php/ext php-conf:
/usr/local/etc/php php-ext-bin: /usr/local/lib/php 60
61.
62.
Bitbucket Pipelines 需要
cache 時 1. 檢查 cache target 是否存在 2. 下載 cached files 3. 執行 scripts 4. 順利執行完成,則 cache 未進尚 cache 的 target ( 發生錯誤則不建立 cache) 62
63.
64.
65.
Bitbucket Pipelines cache
保留時間 一週為 65
66.
Bitbucket Pipelines 必要時,
cache 也可手動刪除 66
67.
Enviroment Variables
68.
Bitbucket Pipelines shell
script 是有變數可用的 Piplelines => Settings => Repository variables 68
69.
70.
Bitbucket Pipelines image: php:7.3 pipeline: default: -
step sciprt: - nvm install $NPM_VERSION - npm .... 70
71.
Bitbucket Pipelines 注意 –
YAML 不支援變數 – schell script 才支援變數 71
72.
Bitbucket Pipelines 注意 –
客製化的環境選項 72
73.
pipelines: branches: master: - step: deployment: Production script: -
echo $NAME
74.
pipelines: branches: master: - step: deployment: master script: -
echo $NAME
75.
Q & A
76.
Thanks for your
attention
Jetzt herunterladen