SlideShare a Scribd company logo
1 of 16
Download to read offline
About Continuous Integration
CI ?
!
?
?
,
!
(Continuous Integration)
CI Test .
Testing
Unit testing
Functional testing
Integration testing
,
Test Tutorial
class AppTest(unittest.TestCase):
def setUp(self):
self.app = app.test_client()
self.access_token = self.token()
def token(self, username, password):
p = self.app.post('/signin', data=dict(
id=username,
pw=password
), follow_redirects=True)
result = json.loads(p.data)
self.assertEqual(result['e_msg'].get('status'), 200)
return result['access_token']
Test Signin
def test_signin(self):
# Invalid Username
p = self.app.post('/signin', data=dict(
id=username + 'xxx',
pw=password
))
result = json.loads(p.data)
self.assertEqual(result['e_msg'].get('message'), 'User not fo
# Invalid Password
p = self.app.post('/signin', data=dict(
id=username,
pw=password + 'x'
))
result = json.loads(p.data)
self.assertEqual(result['e_msg'].get('message'), 'User id or
Test Signup
def test_signup(self):
## User Already Exists
p = self.app.post('/signup', data=dict(
id=username,
pw=password
))
result = json.loads(p.data)
self.assertEqual(result['e_msg'].get('message'), 'User alread
# Signup Successful
p = self.app.post('/signup', data=dict(
id=username + 'x',
pw=password
))
result = json.loads(p.data)
self.assertEqual(result['e_msg'].get('status'), 200)
Pytest Plugin
pytest‑pep8 : , PEP8
pytest‑cov :
pytest‑xdist :
Test Command
Backend API
pytest ‑s backend/
Backend API user API
pytest ‑s backend/users
PEP8
pytest ‑‑pep8 ‑m pep8
PEP8 Backend API
pytest ‑‑pep8 ‑s backend/
Deploy / Setup Automation
Deploy / Setup Automation
1000 ?
!
http://www.fabfile.org/
Fabric ? !
$ fab create
$ fab deploy
$ fab build
$ fab test
Gitlab CI
Gitlab DigitalOcean CI !
 Ubuntu-Ruby Docker
Gitlab Registry
Gitlab Docker Registry !
Docker Registry ? private docker image repository
Gitlab CI Docker
Docker Runner .
CI process
1. User Gitlab Push ,
2. Gitlab CI Gitlab Registry Docker image
3. Docker image centos‑python‑mysql
4. requirements.txt
5. 1 : Runner job
6. 2 : pytest (PEP8)
7. 3 : AWS EC2 deploy
8. Slack
,
(Blue‑Green Deployment)

More Related Content

Similar to Continuous Integration with Gitlab

jQuery Bay Area Conference 2010
jQuery Bay Area Conference 2010jQuery Bay Area Conference 2010
jQuery Bay Area Conference 2010mennovanslooten
 
Pruebas unitarias con django
Pruebas unitarias con djangoPruebas unitarias con django
Pruebas unitarias con djangoTomás Henríquez
 
Тестирование и Django
Тестирование и DjangoТестирование и Django
Тестирование и DjangoMoscowDjango
 
WordPress Realtime - WordCamp São Paulo 2015
WordPress Realtime - WordCamp São Paulo 2015WordPress Realtime - WordCamp São Paulo 2015
WordPress Realtime - WordCamp São Paulo 2015Fernando Daciuk
 
Confident Refactoring - Ember SF Meetup
Confident Refactoring - Ember SF MeetupConfident Refactoring - Ember SF Meetup
Confident Refactoring - Ember SF MeetupFastly
 
Python Unit Test
Python Unit TestPython Unit Test
Python Unit TestDavid Xie
 
Creating an Uber Clone - Part XXXIV - Transcript.pdf
Creating an Uber Clone - Part XXXIV - Transcript.pdfCreating an Uber Clone - Part XXXIV - Transcript.pdf
Creating an Uber Clone - Part XXXIV - Transcript.pdfShaiAlmog1
 
Detect Negative and Positive sentiment in user reviews using python word2vec ...
Detect Negative and Positive sentiment in user reviews using python word2vec ...Detect Negative and Positive sentiment in user reviews using python word2vec ...
Detect Negative and Positive sentiment in user reviews using python word2vec ...Mamoon Ismail Khalid
 
How I started to love design patterns
How I started to love design patternsHow I started to love design patterns
How I started to love design patternsSamuel ROZE
 
ngMess: AngularJS Dependency Injection
ngMess: AngularJS Dependency InjectionngMess: AngularJS Dependency Injection
ngMess: AngularJS Dependency InjectionDzmitry Ivashutsin
 
Refactoring domain driven design way
Refactoring domain driven design wayRefactoring domain driven design way
Refactoring domain driven design wayAndi Pangeran
 
Angular Unit Testing NDC Minn 2018
Angular Unit Testing NDC Minn 2018Angular Unit Testing NDC Minn 2018
Angular Unit Testing NDC Minn 2018Justin James
 
Flask 소수전공 강의자료 - 3차시
Flask 소수전공 강의자료 - 3차시Flask 소수전공 강의자료 - 3차시
Flask 소수전공 강의자료 - 3차시Junha Jang
 
Guard Authentication: Powerful, Beautiful Security
Guard Authentication: Powerful, Beautiful SecurityGuard Authentication: Powerful, Beautiful Security
Guard Authentication: Powerful, Beautiful SecurityRyan Weaver
 
Build a Web Authentication System with a Custom UI
Build a Web Authentication System with a Custom UIBuild a Web Authentication System with a Custom UI
Build a Web Authentication System with a Custom UIAmazon Web Services
 
Build a Web Authentication System with a Custom UI
Build a Web Authentication System with a Custom UIBuild a Web Authentication System with a Custom UI
Build a Web Authentication System with a Custom UIAmazon Web Services
 

Similar to Continuous Integration with Gitlab (20)

jQuery Bay Area Conference 2010
jQuery Bay Area Conference 2010jQuery Bay Area Conference 2010
jQuery Bay Area Conference 2010
 
Pruebas unitarias con django
Pruebas unitarias con djangoPruebas unitarias con django
Pruebas unitarias con django
 
Тестирование и Django
Тестирование и DjangoТестирование и Django
Тестирование и Django
 
Django (Web Konferencia 2009)
Django (Web Konferencia 2009)Django (Web Konferencia 2009)
Django (Web Konferencia 2009)
 
WordPress Realtime - WordCamp São Paulo 2015
WordPress Realtime - WordCamp São Paulo 2015WordPress Realtime - WordCamp São Paulo 2015
WordPress Realtime - WordCamp São Paulo 2015
 
Confident Refactoring - Ember SF Meetup
Confident Refactoring - Ember SF MeetupConfident Refactoring - Ember SF Meetup
Confident Refactoring - Ember SF Meetup
 
Python Unit Test
Python Unit TestPython Unit Test
Python Unit Test
 
Creating an Uber Clone - Part XXXIV - Transcript.pdf
Creating an Uber Clone - Part XXXIV - Transcript.pdfCreating an Uber Clone - Part XXXIV - Transcript.pdf
Creating an Uber Clone - Part XXXIV - Transcript.pdf
 
Detect Negative and Positive sentiment in user reviews using python word2vec ...
Detect Negative and Positive sentiment in user reviews using python word2vec ...Detect Negative and Positive sentiment in user reviews using python word2vec ...
Detect Negative and Positive sentiment in user reviews using python word2vec ...
 
Unit test
Unit testUnit test
Unit test
 
How I started to love design patterns
How I started to love design patternsHow I started to love design patterns
How I started to love design patterns
 
ngMess: AngularJS Dependency Injection
ngMess: AngularJS Dependency InjectionngMess: AngularJS Dependency Injection
ngMess: AngularJS Dependency Injection
 
inception.docx
inception.docxinception.docx
inception.docx
 
Refactoring domain driven design way
Refactoring domain driven design wayRefactoring domain driven design way
Refactoring domain driven design way
 
Practical Celery
Practical CeleryPractical Celery
Practical Celery
 
Angular Unit Testing NDC Minn 2018
Angular Unit Testing NDC Minn 2018Angular Unit Testing NDC Minn 2018
Angular Unit Testing NDC Minn 2018
 
Flask 소수전공 강의자료 - 3차시
Flask 소수전공 강의자료 - 3차시Flask 소수전공 강의자료 - 3차시
Flask 소수전공 강의자료 - 3차시
 
Guard Authentication: Powerful, Beautiful Security
Guard Authentication: Powerful, Beautiful SecurityGuard Authentication: Powerful, Beautiful Security
Guard Authentication: Powerful, Beautiful Security
 
Build a Web Authentication System with a Custom UI
Build a Web Authentication System with a Custom UIBuild a Web Authentication System with a Custom UI
Build a Web Authentication System with a Custom UI
 
Build a Web Authentication System with a Custom UI
Build a Web Authentication System with a Custom UIBuild a Web Authentication System with a Custom UI
Build a Web Authentication System with a Custom UI
 

More from Junyoung Park

Quantitive Algorithm Trading
Quantitive Algorithm TradingQuantitive Algorithm Trading
Quantitive Algorithm TradingJunyoung Park
 
Common Design for Distributed Machine Learning
Common Design for Distributed Machine LearningCommon Design for Distributed Machine Learning
Common Design for Distributed Machine LearningJunyoung Park
 
Kaggle KKBox Churn Prediction
Kaggle KKBox Churn PredictionKaggle KKBox Churn Prediction
Kaggle KKBox Churn PredictionJunyoung Park
 
Cloudera & Zookeeper
Cloudera & ZookeeperCloudera & Zookeeper
Cloudera & ZookeeperJunyoung Park
 
한국어 자연어처리 101
한국어 자연어처리 101한국어 자연어처리 101
한국어 자연어처리 101Junyoung Park
 
Python Testing for Flask
Python Testing for FlaskPython Testing for Flask
Python Testing for FlaskJunyoung Park
 
News clustering and Recommendation system using Word Embedding
News clustering and Recommendation system using Word EmbeddingNews clustering and Recommendation system using Word Embedding
News clustering and Recommendation system using Word EmbeddingJunyoung Park
 
Clustering, k means algorithm
Clustering, k means algorithmClustering, k means algorithm
Clustering, k means algorithmJunyoung Park
 

More from Junyoung Park (13)

Quantitive Algorithm Trading
Quantitive Algorithm TradingQuantitive Algorithm Trading
Quantitive Algorithm Trading
 
K-Means Clustering
K-Means ClusteringK-Means Clustering
K-Means Clustering
 
Common Design for Distributed Machine Learning
Common Design for Distributed Machine LearningCommon Design for Distributed Machine Learning
Common Design for Distributed Machine Learning
 
AWS EMR + Spark ML
AWS EMR + Spark MLAWS EMR + Spark ML
AWS EMR + Spark ML
 
Kaggle KKBox Churn Prediction
Kaggle KKBox Churn PredictionKaggle KKBox Churn Prediction
Kaggle KKBox Churn Prediction
 
Spark config
Spark configSpark config
Spark config
 
Cloudera & Zookeeper
Cloudera & ZookeeperCloudera & Zookeeper
Cloudera & Zookeeper
 
한국어 자연어처리 101
한국어 자연어처리 101한국어 자연어처리 101
한국어 자연어처리 101
 
Docker Intro
Docker IntroDocker Intro
Docker Intro
 
Python Testing for Flask
Python Testing for FlaskPython Testing for Flask
Python Testing for Flask
 
News clustering and Recommendation system using Word Embedding
News clustering and Recommendation system using Word EmbeddingNews clustering and Recommendation system using Word Embedding
News clustering and Recommendation system using Word Embedding
 
Clustering, k means algorithm
Clustering, k means algorithmClustering, k means algorithm
Clustering, k means algorithm
 
About SVM
About SVMAbout SVM
About SVM
 

Recently uploaded

Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
software engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxsoftware engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxnada99848
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 

Recently uploaded (20)

Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
software engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxsoftware engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptx
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 

Continuous Integration with Gitlab