SlideShare ist ein Scribd-Unternehmen logo
CI and CD
Nette Camp 27.8.2016
Key concepts
4 Continuous Delivery (CD)
4 Continuous Integration (CI)
4 Continuous Deployment
Continuous Integration
Continuous Integration (CI)
4 is a development practice that requires developers
to integrate code into a shared repository several
times a day. Each check-in is then verified by an
automated build, allowing teams to detect problems
early.
Continuous Delivery
Continuous Delivery
4 is a software development discipline where you build
software in such a way that the software can be
released to production at any time.
Continuous Deployment
Continuous Deployment
4 means that every change goes through the pipeline
and automatically gets put into production,
resulting in many production deployments every day.
How we do Continuous
Delivery in Apiary
Continuous Integration
Engines
Key features from CIE
4 job definitions in repository
4 autoscaling on traffic with lowest possible price
4 pipelines
4 caching for installations (apt, npm, gem, composer,
docker)
4 docker support (registry, caching layers)
4 matrix builds (OSS)
Job definitions in
repository
sudo: "required"
dist: "trusty"
language: "node_js"
node_js:
- "0.10"
- "0.12"
- "4"
- "6"
env:
global:
# GH_TOKEN and NPM_TOKEN encrypted by 'travis encrypt' utility
- secure: "<<<TOKEN>>>"
cache:
directories:
- "node_modules"
before_install:
- "npm -g install npm@latest"
- "gem install travis"
- "curl -Lo travis_after_all.py https://raw.githubusercontent.com/dmakhno/travis_after_all/master/travis_after_all.py"
before_script:
- "npm run lint"
script:
- "npm test"
- "npm run test:hooks-handlers"
after_success: # travis_after_all.py is needed due to travis-ci/travis-ci#1548 & travis-ci/travis-ci#929
- "npm run coveralls"
- "python travis_after_all.py"
- "export $(cat .to_export_back)"
- "npm run semantic-release || true"
node('node') {
currentBuild.result = "SUCCESS"
try {
stage 'Checkout'
checkout scm
stage 'Test'
env.NODE_ENV = "test"
print "Environment will be : ${env.NODE_ENV}"
sh 'node -v'
sh 'npm prune'
sh 'npm install'
sh 'npm test'
stage 'Build Docker'
sh './dockerBuild.sh'
stage 'Deploy'
echo 'Push to Repo'
sh './dockerPushToRepo.sh'
echo 'ssh to web server and tell it to pull new image'
sh 'ssh deploy@xxxxx.xxxxx.com running/xxxxxxx/dockerRun.sh'
stage 'Cleanup'
echo 'prune and cleanup'
sh 'npm prune'
sh 'rm node_modules -rf'
mail body: 'project build successful',
from: 'xxxx@yyyyy.com',
replyTo: 'xxxx@yyyy.com',
subject: 'project build successful',
to: 'yyyyy@yyyy.com'
}
catch (err) {
currentBuild.result = "FAILURE"
mail body: "project build error: ${err}" ,
from: 'xxxx@yyyy.com',
replyTo: 'yyyy@yyyy.com',
subject: 'project build failed',
to: 'zzzz@yyyyy.com'
throw err
}
}
Autoscaling
Pipelines
Caching
Docker support
machine:
services:
- docker
dependencies:
override:
- docker info
- docker build -t circleci/elasticsearch .
test:
override:
- docker run -d -p 9200:9200 circleci/elasticsearch; sleep 10
- curl --retry 10 --retry-delay 5 -v http://localhost:9200
deployment:
hub:
branch: master
commands:
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- docker push circleci/elasticsearch
Matrix builds
matrix:
GO_VERSION:
- 1.4
- 1.3
REDIS_VERSION:
- 2.6
- 2.8
- 3.0
Distributed job across
multiple nodes
Q & A
Ladislav Prskavec
ladislav@prskavec.net
@abtris

Weitere ähnliche Inhalte

Was ist angesagt?

Docker session I: Continuous integration, delivery and deployment
Docker session I: Continuous integration, delivery and deploymentDocker session I: Continuous integration, delivery and deployment
Docker session I: Continuous integration, delivery and deployment
Degendra Sivakoti
 
Avoiding surprises with Chef and Vagrant
Avoiding surprises with Chef and VagrantAvoiding surprises with Chef and Vagrant
Avoiding surprises with Chef and Vagrant
andygale
 

Was ist angesagt? (20)

CI/CD Using Ansible and Jenkins for Infrastructure
CI/CD Using Ansible and Jenkins for InfrastructureCI/CD Using Ansible and Jenkins for Infrastructure
CI/CD Using Ansible and Jenkins for Infrastructure
 
Docker - modern platform for developement and operations
Docker - modern platform for developement and operationsDocker - modern platform for developement and operations
Docker - modern platform for developement and operations
 
Paris Container Day 2016 : Cloud de conteneurs, conteneurs dans le cloud, str...
Paris Container Day 2016 : Cloud de conteneurs, conteneurs dans le cloud, str...Paris Container Day 2016 : Cloud de conteneurs, conteneurs dans le cloud, str...
Paris Container Day 2016 : Cloud de conteneurs, conteneurs dans le cloud, str...
 
Puppet Camp Sydney 2015: Puppet and AWS is easy right.....?
Puppet Camp Sydney 2015: Puppet and AWS is easy right.....? Puppet Camp Sydney 2015: Puppet and AWS is easy right.....?
Puppet Camp Sydney 2015: Puppet and AWS is easy right.....?
 
Getting up and running with Docker
Getting up and running with DockerGetting up and running with Docker
Getting up and running with Docker
 
Simplestack
SimplestackSimplestack
Simplestack
 
Docker & GitLab
Docker & GitLabDocker & GitLab
Docker & GitLab
 
Docker e git lab
Docker e git labDocker e git lab
Docker e git lab
 
what is docker
what is dockerwhat is docker
what is docker
 
Workshop - Golang language
Workshop - Golang languageWorkshop - Golang language
Workshop - Golang language
 
Introduction to ansible
Introduction to ansibleIntroduction to ansible
Introduction to ansible
 
Docker session I: Continuous integration, delivery and deployment
Docker session I: Continuous integration, delivery and deploymentDocker session I: Continuous integration, delivery and deployment
Docker session I: Continuous integration, delivery and deployment
 
Ferrara Linux Day 2011
Ferrara Linux Day 2011Ferrara Linux Day 2011
Ferrara Linux Day 2011
 
Ondřej Procházka - Deployment podle Devel.cz
Ondřej Procházka - Deployment podle Devel.czOndřej Procházka - Deployment podle Devel.cz
Ondřej Procházka - Deployment podle Devel.cz
 
NDC Oslo - The Hybrid Docker Swarm
NDC Oslo - The Hybrid Docker SwarmNDC Oslo - The Hybrid Docker Swarm
NDC Oslo - The Hybrid Docker Swarm
 
Test Kitchen and Infrastructure as Code
Test Kitchen and Infrastructure as CodeTest Kitchen and Infrastructure as Code
Test Kitchen and Infrastructure as Code
 
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...
 
Avoiding surprises with Chef and Vagrant
Avoiding surprises with Chef and VagrantAvoiding surprises with Chef and Vagrant
Avoiding surprises with Chef and Vagrant
 
Node.js Internals and V8 / Operating System Interaction
Node.js Internals and V8 / Operating System InteractionNode.js Internals and V8 / Operating System Interaction
Node.js Internals and V8 / Operating System Interaction
 
Kubernetes x PaaS – コンテナアプリケーションのNoOpsへの挑戦
Kubernetes x PaaS – コンテナアプリケーションのNoOpsへの挑戦Kubernetes x PaaS – コンテナアプリケーションのNoOpsへの挑戦
Kubernetes x PaaS – コンテナアプリケーションのNoOpsへの挑戦
 

Andere mochten auch

Pædagogikumsudtalelse
PædagogikumsudtalelsePædagogikumsudtalelse
Pædagogikumsudtalelse
Njal Laursen W
 
Letter from KK Nielsen
Letter from KK NielsenLetter from KK Nielsen
Letter from KK Nielsen
Daniel Pacurar
 

Andere mochten auch (12)

Pædagogikumsudtalelse
PædagogikumsudtalelsePædagogikumsudtalelse
Pædagogikumsudtalelse
 
Match nsw waratahs vs highlanders direct streaming
Match nsw waratahs vs highlanders direct streamingMatch nsw waratahs vs highlanders direct streaming
Match nsw waratahs vs highlanders direct streaming
 
Letter from KK Nielsen
Letter from KK NielsenLetter from KK Nielsen
Letter from KK Nielsen
 
Reduce Risk with Digital Preparedness
Reduce Risk with Digital Preparedness  Reduce Risk with Digital Preparedness
Reduce Risk with Digital Preparedness
 
Nmus bio sf_june_8_2016_final
Nmus bio sf_june_8_2016_finalNmus bio sf_june_8_2016_final
Nmus bio sf_june_8_2016_final
 
ICT Applied to Crisis Management and Seismic Risk Assessment for Post Event M...
ICT Applied to Crisis Management and Seismic Risk Assessment for Post Event M...ICT Applied to Crisis Management and Seismic Risk Assessment for Post Event M...
ICT Applied to Crisis Management and Seismic Risk Assessment for Post Event M...
 
Lekts 6
Lekts 6Lekts 6
Lekts 6
 
32754131 recent-trends-in-automobile-seminar
32754131 recent-trends-in-automobile-seminar32754131 recent-trends-in-automobile-seminar
32754131 recent-trends-in-automobile-seminar
 
Automobile safety
Automobile safetyAutomobile safety
Automobile safety
 
Medicinal chemistry (drug metabolism & concept of prodrug) corrected
Medicinal chemistry (drug metabolism & concept of prodrug) correctedMedicinal chemistry (drug metabolism & concept of prodrug) corrected
Medicinal chemistry (drug metabolism & concept of prodrug) corrected
 
Prodrugs
ProdrugsProdrugs
Prodrugs
 
Export products
Export productsExport products
Export products
 

Ähnlich wie CI and CD

Ähnlich wie CI and CD (20)

Comment améliorer le quotidien des Développeurs PHP ?
Comment améliorer le quotidien des Développeurs PHP ?Comment améliorer le quotidien des Développeurs PHP ?
Comment améliorer le quotidien des Développeurs PHP ?
 
DevOps Workflow: A Tutorial on Linux Containers
DevOps Workflow: A Tutorial on Linux ContainersDevOps Workflow: A Tutorial on Linux Containers
DevOps Workflow: A Tutorial on Linux Containers
 
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and AnsibleService Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
 
Jenkins Days - Workshop - Let's Build a Pipeline - Los Angeles
Jenkins Days - Workshop - Let's Build a Pipeline - Los AngelesJenkins Days - Workshop - Let's Build a Pipeline - Los Angeles
Jenkins Days - Workshop - Let's Build a Pipeline - Los Angeles
 
ASP.NET 5 auf Raspberry PI & docker
ASP.NET 5 auf Raspberry PI & dockerASP.NET 5 auf Raspberry PI & docker
ASP.NET 5 auf Raspberry PI & docker
 
(Declarative) Jenkins Pipelines
(Declarative) Jenkins Pipelines(Declarative) Jenkins Pipelines
(Declarative) Jenkins Pipelines
 
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
 
Ansible is the simplest way to automate. SymfonyCafe, 2015
Ansible is the simplest way to automate. SymfonyCafe, 2015Ansible is the simplest way to automate. SymfonyCafe, 2015
Ansible is the simplest way to automate. SymfonyCafe, 2015
 
Pynvme introduction
Pynvme introductionPynvme introduction
Pynvme introduction
 
Antons Kranga Building Agile Infrastructures
Antons Kranga   Building Agile InfrastructuresAntons Kranga   Building Agile Infrastructures
Antons Kranga Building Agile Infrastructures
 
PhoneGap Day 2016 EU: Creating the Ideal Cordova Dev Environment
PhoneGap Day 2016 EU: Creating the Ideal Cordova Dev EnvironmentPhoneGap Day 2016 EU: Creating the Ideal Cordova Dev Environment
PhoneGap Day 2016 EU: Creating the Ideal Cordova Dev Environment
 
CI
CICI
CI
 
Automate Your Automation | DrupalCon Vienna
Automate Your Automation | DrupalCon ViennaAutomate Your Automation | DrupalCon Vienna
Automate Your Automation | DrupalCon Vienna
 
Spinnaker Summit 2018: CI/CD Patterns for Kubernetes with Spinnaker
Spinnaker Summit 2018: CI/CD Patterns for Kubernetes with SpinnakerSpinnaker Summit 2018: CI/CD Patterns for Kubernetes with Spinnaker
Spinnaker Summit 2018: CI/CD Patterns for Kubernetes with Spinnaker
 
Embacing service-level-objectives of your microservices in your Cl/CD
Embacing service-level-objectives of your microservices in your Cl/CDEmbacing service-level-objectives of your microservices in your Cl/CD
Embacing service-level-objectives of your microservices in your Cl/CD
 
Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...
Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...
Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...
 
Continuous Integration & Development with Gitlab
Continuous Integration & Development with GitlabContinuous Integration & Development with Gitlab
Continuous Integration & Development with Gitlab
 
Drupaljam 2017 - Deploying Drupal 8 onto Hosted Kubernetes in Google Cloud
Drupaljam 2017 - Deploying Drupal 8 onto Hosted Kubernetes in Google CloudDrupaljam 2017 - Deploying Drupal 8 onto Hosted Kubernetes in Google Cloud
Drupaljam 2017 - Deploying Drupal 8 onto Hosted Kubernetes in Google Cloud
 
Small Python Tools for Software Release Engineering
Small Python Tools for Software Release EngineeringSmall Python Tools for Software Release Engineering
Small Python Tools for Software Release Engineering
 
One commit, one release. Continuously delivering a Symfony project.
One commit, one release. Continuously delivering a Symfony project.One commit, one release. Continuously delivering a Symfony project.
One commit, one release. Continuously delivering a Symfony project.
 

Mehr von Ladislav Prskavec

Mehr von Ladislav Prskavec (20)

SRE in Apiary
SRE in ApiarySRE in Apiary
SRE in Apiary
 
Modern Web Architecture<br>based on JS, API and Markup
Modern Web Architecture<br>based on JS, API and MarkupModern Web Architecture<br>based on JS, API and Markup
Modern Web Architecture<br>based on JS, API and Markup
 
How you can kill Wordpress!
How you can kill Wordpress!How you can kill Wordpress!
How you can kill Wordpress!
 
SRE in Startup
SRE in StartupSRE in Startup
SRE in Startup
 
Datascript: Serverless Architetecture
Datascript: Serverless ArchitetectureDatascript: Serverless Architetecture
Datascript: Serverless Architetecture
 
Serverless Architecture
Serverless ArchitectureServerless Architecture
Serverless Architecture
 
PragueJS meetups 30th anniversary
PragueJS meetups 30th anniversaryPragueJS meetups 30th anniversary
PragueJS meetups 30th anniversary
 
How to easy deploy app into any cloud
How to easy deploy app into any cloudHow to easy deploy app into any cloud
How to easy deploy app into any cloud
 
GDGSCL - Docker a jeho provoz v Heroku a AWS
GDGSCL - Docker a jeho provoz v Heroku a AWSGDGSCL - Docker a jeho provoz v Heroku a AWS
GDGSCL - Docker a jeho provoz v Heroku a AWS
 
AWS Elastic Container Service
AWS Elastic Container ServiceAWS Elastic Container Service
AWS Elastic Container Service
 
Comparison nodejs frameworks using Polls API
Comparison nodejs frameworks using Polls APIComparison nodejs frameworks using Polls API
Comparison nodejs frameworks using Polls API
 
Docker Elastic Beanstalk
Docker Elastic BeanstalkDocker Elastic Beanstalk
Docker Elastic Beanstalk
 
Docker včera, dnes a zítra
Docker včera, dnes a zítraDocker včera, dnes a zítra
Docker včera, dnes a zítra
 
Tessel is a microcontroller that runs JavaScript.
Tessel is a microcontroller that runs JavaScript.Tessel is a microcontroller that runs JavaScript.
Tessel is a microcontroller that runs JavaScript.
 
Docker.io
Docker.ioDocker.io
Docker.io
 
Docker.io
Docker.ioDocker.io
Docker.io
 
AngularJS
AngularJSAngularJS
AngularJS
 
Firebase and AngularJS
Firebase and AngularJSFirebase and AngularJS
Firebase and AngularJS
 
AngularJS at PyVo
AngularJS at PyVoAngularJS at PyVo
AngularJS at PyVo
 
Tvorba javascriptové aplikace v AngularJS pomocí Apiary.io
Tvorba javascriptové aplikace v AngularJS pomocí Apiary.ioTvorba javascriptové aplikace v AngularJS pomocí Apiary.io
Tvorba javascriptové aplikace v AngularJS pomocí Apiary.io
 

Kürzlich hochgeladen

Kürzlich hochgeladen (20)

Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
 
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
 
The architecture of Generative AI for enterprises.pdf
The architecture of Generative AI for enterprises.pdfThe architecture of Generative AI for enterprises.pdf
The architecture of Generative AI for enterprises.pdf
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and Planning
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through Observability
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Introduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationIntroduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG Evaluation
 
In-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsIn-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT Professionals
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
 
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
 
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
 

CI and CD

  • 1. CI and CD Nette Camp 27.8.2016
  • 2. Key concepts 4 Continuous Delivery (CD) 4 Continuous Integration (CI) 4 Continuous Deployment
  • 4. Continuous Integration (CI) 4 is a development practice that requires developers to integrate code into a shared repository several times a day. Each check-in is then verified by an automated build, allowing teams to detect problems early.
  • 6. Continuous Delivery 4 is a software development discipline where you build software in such a way that the software can be released to production at any time.
  • 8. Continuous Deployment 4 means that every change goes through the pipeline and automatically gets put into production, resulting in many production deployments every day.
  • 9. How we do Continuous Delivery in Apiary
  • 10.
  • 11.
  • 12.
  • 14.
  • 15. Key features from CIE 4 job definitions in repository 4 autoscaling on traffic with lowest possible price 4 pipelines 4 caching for installations (apt, npm, gem, composer, docker) 4 docker support (registry, caching layers) 4 matrix builds (OSS)
  • 17. sudo: "required" dist: "trusty" language: "node_js" node_js: - "0.10" - "0.12" - "4" - "6" env: global: # GH_TOKEN and NPM_TOKEN encrypted by 'travis encrypt' utility - secure: "<<<TOKEN>>>" cache: directories: - "node_modules" before_install: - "npm -g install npm@latest" - "gem install travis" - "curl -Lo travis_after_all.py https://raw.githubusercontent.com/dmakhno/travis_after_all/master/travis_after_all.py" before_script: - "npm run lint" script: - "npm test" - "npm run test:hooks-handlers" after_success: # travis_after_all.py is needed due to travis-ci/travis-ci#1548 & travis-ci/travis-ci#929 - "npm run coveralls" - "python travis_after_all.py" - "export $(cat .to_export_back)" - "npm run semantic-release || true"
  • 18. node('node') { currentBuild.result = "SUCCESS" try { stage 'Checkout' checkout scm stage 'Test' env.NODE_ENV = "test" print "Environment will be : ${env.NODE_ENV}" sh 'node -v' sh 'npm prune' sh 'npm install' sh 'npm test' stage 'Build Docker' sh './dockerBuild.sh' stage 'Deploy' echo 'Push to Repo' sh './dockerPushToRepo.sh' echo 'ssh to web server and tell it to pull new image' sh 'ssh deploy@xxxxx.xxxxx.com running/xxxxxxx/dockerRun.sh' stage 'Cleanup' echo 'prune and cleanup' sh 'npm prune' sh 'rm node_modules -rf' mail body: 'project build successful', from: 'xxxx@yyyyy.com', replyTo: 'xxxx@yyyy.com', subject: 'project build successful', to: 'yyyyy@yyyy.com' } catch (err) { currentBuild.result = "FAILURE" mail body: "project build error: ${err}" , from: 'xxxx@yyyy.com', replyTo: 'yyyy@yyyy.com', subject: 'project build failed', to: 'zzzz@yyyyy.com' throw err } }
  • 20.
  • 22.
  • 24.
  • 26. machine: services: - docker dependencies: override: - docker info - docker build -t circleci/elasticsearch . test: override: - docker run -d -p 9200:9200 circleci/elasticsearch; sleep 10 - curl --retry 10 --retry-delay 5 -v http://localhost:9200 deployment: hub: branch: master commands: - docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS - docker push circleci/elasticsearch
  • 30.
  • 31. Q & A Ladislav Prskavec ladislav@prskavec.net @abtris