CI/CD con Gitlab
David Padilla
@dabit
David Padilla
@dabit
@micheladaio
CI/CD
con Gitlab
CI/CD
Integración
Continua
CI
Entrega Continua
CD
Despliegue
Continuo
CD
Pruebas
Automatizadas
Test Driven
Development
Nuestro
proceso
Desarrollo
Merge
Request
Peer
Review
Review
QA
Staging
Más
QA
UAT
Producción
Desarrollo
Merge
Request
Peer
Review
Review
QA
Staging
Más
QA
UAT
Producción
Instrumentación de entrega continua con Gitlab
Control de versiones (git)
Merge Requests / Retroalimentación
Orquesta deploys
Corre pruebas
Registry de Docker
Instrumentación de entrega continua con Gitlab
require 'application_system_test_case'
class HomepagesTest < ApplicationSystemTestCase
test 'homepage' do
visit root_path
assert_content 'SGNext'
end
end
require 'application_system_test_case'
class HomepagesTest < ApplicationSystemTestCase
test 'homepage' do
visit root_path
assert_content 'SGNext'
end
end
require 'application_system_test_case'
class HomepagesTest < ApplicationSystemTestCase
test 'homepage' do
visit root_path
assert_content 'SGNext'
end
end
Instrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con Gitlab
Como Usuario
cuando voy a la pagina principal
quiero ver el slogan
"La mejor conferencia de México"
require 'application_system_test_case'
class HomepagesTest < ApplicationSystemTestCase
test 'homepage' do
visit root_path
assert_content 'SGNext'
end
end
require 'application_system_test_case'
class HomepagesTest < ApplicationSystemTestCase
test 'homepage' do
visit root_path
assert_content 'SGNext'
assert_content 'La mejor conferencia de Mexico'
end
end
Instrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con Gitlab
<div class="row align-items-center">
<div class="col-md-12">
<div class="jumbotron">
<h1 class="display-3">SGNext</h1>
<p class="lead">
La mejor conferencia de Mexico
</p>
</div>
</div>
</div>
<div class="row align-items-center">
<div class="col-md-12">
<div class="jumbotron">
<h1 class="display-3">SGNext</h1>
<p class="lead">
La mejor conferencia de Mexico
</p>
</div>
</div>
</div>
<div class="row align-items-center">
<div class="col-md-12">
<div class="jumbotron">
<h1 class="display-3">SGNext</h1>
<p class="lead">
La mejor conferencia de Mexico
</p>
</div>
</div>
</div>
Instrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con Gitlab
$ git checkout -b slogan
$ git add .
$ git commit -m "Nuevo slogan"
[slogan d287522] Nuevo slogan
2 files changed, 2 insertions(+)
Instrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con Gitlab
require 'application_system_test_case'
class HomepagesTest < ApplicationSystemTestCase
test 'homepage' do
visit root_path
assert_content 'SGNext'
assert_content 'La mejor conferencia de México'
end
end
<div class="row align-items-center">
<div class="col-md-12">
<div class="jumbotron">
<h1 class="display-3">SGNext</h1>
<p class="lead">
La mejor conferencia de México
</p>
</div>
</div>
</div>
Instrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con Gitlab
FROM ruby:2.4.1
ENV PHANTOM_JS="phantomjs-2.1.1-linux-x86_64"
RUN apt-get update
RUN apt-get install -y software-properties-common apt-transport-https
RUN add-apt-repository "deb https://cli-assets.heroku.com/branches/stable/apt ./"
RUN curl -L https://cli-assets.heroku.com/apt/release.key | apt-key add -
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
RUN curl -sL https://deb.nodesource.com/setup_6.x | bash -
RUN apt-get update && 
apt-get upgrade -y
RUN apt-get install -y build-essential chrpath libssl-dev libxft-dev 
libfreetype6 libfreetype6-dev libfontconfig1 libfontconfig1-dev qt5-default 
libqt5webkit5-dev gstreamer1.0-plugins-base gstreamer1.0-tools 
gstreamer1.0-x imagemagick cmake yarn nodejs
RUN apt-get install heroku
RUN gem install dpl
RUN curl -L -O https://bitbucket.org/ariya/phantomjs/downloads/$PHANTOM_JS.tar.bz2
RUN tar xvjf $PHANTOM_JS.tar.bz2 && 
mv $PHANTOM_JS /usr/local/share && 
ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/bin
FROM ruby:2.4.1
ENV PHANTOM_JS="phantomjs-2.1.1-linux-x86_64"
RUN apt-get update
RUN apt-get install -y software-properties-common apt-transport-https
RUN add-apt-repository "deb https://cli-assets.heroku.com/branches/stable/apt ./"
RUN curl -L https://cli-assets.heroku.com/apt/release.key | apt-key add -
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
RUN curl -sL https://deb.nodesource.com/setup_6.x | bash -
RUN apt-get update && 
apt-get upgrade -y
RUN apt-get install -y build-essential chrpath libssl-dev libxft-dev 
libfreetype6 libfreetype6-dev libfontconfig1 libfontconfig1-dev qt5-default 
libqt5webkit5-dev gstreamer1.0-plugins-base gstreamer1.0-tools 
gstreamer1.0-x imagemagick cmake yarn nodejs
RUN apt-get install heroku
RUN gem install dpl
RUN curl -L -O https://bitbucket.org/ariya/phantomjs/downloads/$PHANTOM_JS.tar.bz2
RUN tar xvjf $PHANTOM_JS.tar.bz2 && 
mv $PHANTOM_JS /usr/local/share && 
ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/bin
FROM ruby:2.4.1
ENV PHANTOM_JS="phantomjs-2.1.1-linux-x86_64"
RUN apt-get update
RUN apt-get install -y software-properties-common apt-transport-https
RUN add-apt-repository "deb https://cli-assets.heroku.com/branches/stable/apt ./"
RUN curl -L https://cli-assets.heroku.com/apt/release.key | apt-key add -
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
RUN curl -sL https://deb.nodesource.com/setup_6.x | bash -
RUN apt-get update && 
apt-get upgrade -y
RUN apt-get install -y build-essential chrpath libssl-dev libxft-dev 
libfreetype6 libfreetype6-dev libfontconfig1 libfontconfig1-dev qt5-default 
libqt5webkit5-dev gstreamer1.0-plugins-base gstreamer1.0-tools 
gstreamer1.0-x imagemagick cmake yarn nodejs
RUN apt-get install heroku
RUN gem install dpl
RUN curl -L -O https://bitbucket.org/ariya/phantomjs/downloads/$PHANTOM_JS.tar.bz2
RUN tar xvjf $PHANTOM_JS.tar.bz2 && 
mv $PHANTOM_JS /usr/local/share && 
ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/bin
FROM ruby:2.4.1
ENV PHANTOM_JS="phantomjs-2.1.1-linux-x86_64"
RUN apt-get update
RUN apt-get install -y software-properties-common apt-transport-https
RUN add-apt-repository "deb https://cli-assets.heroku.com/branches/stable/apt ./"
RUN curl -L https://cli-assets.heroku.com/apt/release.key | apt-key add -
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
RUN curl -sL https://deb.nodesource.com/setup_6.x | bash -
RUN apt-get update && 
apt-get upgrade -y
RUN apt-get install -y build-essential chrpath libssl-dev libxft-dev 
libfreetype6 libfreetype6-dev libfontconfig1 libfontconfig1-dev qt5-default 
libqt5webkit5-dev gstreamer1.0-plugins-base gstreamer1.0-tools 
gstreamer1.0-x imagemagick cmake yarn nodejs
RUN apt-get install heroku
RUN gem install dpl
RUN curl -L -O https://bitbucket.org/ariya/phantomjs/downloads/$PHANTOM_JS.tar.bz2
RUN tar xvjf $PHANTOM_JS.tar.bz2 && 
mv $PHANTOM_JS /usr/local/share && 
ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/bin
Instrumentación de entrega continua con Gitlab
.gitlab-ci.yml
image: registry.michelada.io/demos/sgnext/image
services:
- postgres
stages:
- test
- review
- staging
- production
variables:
DISABLE_SPRING: 'true'
before_script:
- gem install bundler --no-ri --no-rdoc
- rm -rf vendor/ruby/2.4.0/cache/bundler/git || true
- ruby -v
cache:
paths:
- vendor/ruby
- node_modules
build:
stage: test
script:
- bundle install -j $(nproc) --path vendor --full-index --clean
- bin/yarn
- cp config/database.ci.yml config/database.yml
- bundle exec rails db:create RAILS_ENV=test
- bundle exec rails db:test:prepare RAILS_ENV=test
- bundle exec rails test
- bundle exec rails test:system
deploy_review:
stage: review
script:
- gem install dpl
- heroku apps:fork --from $HEROKU_STAGING_APP --to $CI_ENVIRONMENT_SLUG || true
- dpl --provider=heroku --app=$CI_ENVIRONMENT_SLUG --api-key=$HEROKU_API_KEY
- heroku run rake db:migrate --app=$CI_ENVIRONMENT_SLUG
environment:
name: review/$CI_BUILD_REF_NAME
url: https://$CI_ENVIRONMENT_SLUG.herokuapp.com
only:
- branches
except:
- master
staging:
stage: staging
environment: staging
script:
- gem install dpl
- dpl --provider=heroku --app=$HEROKU_STAGING_APP --api-key=$HEROKU_API_KEY
- heroku run rake db:migrate --app=$HEROKU_STAGING_APP
only:
- master
production:
stage: production
environment: production
script:
- gem install dpl
- dpl --provider=heroku --app=$HEROKU_PROD_APP --api-key=$HEROKU_API_KEY
- heroku run rake db:migrate --app=$HEROKU_PROD_APP
only:
- master
when: manual
image: registry.michelada.io/demos/sgnext/image
services:
- postgres
stages:
- test
- review
- staging
- production
variables:
DISABLE_SPRING: 'true'
before_script:
- gem install bundler --no-ri --no-rdoc
- rm -rf vendor/ruby/2.4.0/cache/bundler/git || true
- ruby -v
cache:
paths:
- vendor/ruby
- node_modules
build:
stage: test
script:
image: registry.michelada.io/demos/sgnext/image
services:
- postgres
stages:
- test
- review
- staging
- production
variables:
DISABLE_SPRING: 'true'
before_script:
- gem install bundler --no-ri --no-rdoc
- rm -rf vendor/ruby/2.4.0/cache/bundler/git || true
- ruby -v
cache:
paths:
- vendor/ruby
- node_modules
build:
stage: test
script:
image: registry.michelada.io/demos/sgnext/image
services:
- postgres
stages:
- test
- review
- staging
- production
variables:
DISABLE_SPRING: 'true'
before_script:
- gem install bundler --no-ri --no-rdoc
- rm -rf vendor/ruby/2.4.0/cache/bundler/git || true
- ruby -v
cache:
paths:
- vendor/ruby
- node_modules
build:
stage: test
script:
image: registry.michelada.io/demos/sgnext/image
services:
- postgres
stages:
- test
- review
- staging
- production
variables:
DISABLE_SPRING: 'true'
before_script:
- gem install bundler --no-ri --no-rdoc
- rm -rf vendor/ruby/2.4.0/cache/bundler/git || true
- ruby -v
cache:
paths:
- vendor/ruby
- node_modules
build:
stage: test
script:
- gem install bundler --no-ri --no-rdoc
- rm -rf vendor/ruby/2.4.0/cache/bundler/git || true
- ruby -v
cache:
paths:
- vendor/ruby
- node_modules
build:
stage: test
script:
- bundle install -j $(nproc) --path vendor --full-index --clean
- bin/yarn
- cp config/database.ci.yml config/database.yml
- bundle exec rails db:create RAILS_ENV=test
- bundle exec rails db:test:prepare RAILS_ENV=test
- bundle exec rails test
- bundle exec rails test:system
deploy_review:
stage: review
script:
- gem install dpl
- heroku apps:fork --from $HEROKU_STAGING_APP --to $CI_ENVIRONMENT_SLUG || true
- dpl --provider=heroku --app=$CI_ENVIRONMENT_SLUG --api-key=$HEROKU_API_KEY
- heroku run rake db:migrate --app=$CI_ENVIRONMENT_SLUG
environment:
name: review/$CI_BUILD_REF_NAME
url: https://$CI_ENVIRONMENT_SLUG.herokuapp.com
- gem install bundler --no-ri --no-rdoc
- rm -rf vendor/ruby/2.4.0/cache/bundler/git || true
- ruby -v
cache:
paths:
- vendor/ruby
- node_modules
build:
stage: test
script:
- bundle install -j $(nproc) --path vendor --full-index --clean
- bin/yarn
- cp config/database.ci.yml config/database.yml
- bundle exec rails db:create RAILS_ENV=test
- bundle exec rails db:test:prepare RAILS_ENV=test
- bundle exec rails test
- bundle exec rails test:system
deploy_review:
stage: review
script:
- gem install dpl
- heroku apps:fork --from $HEROKU_STAGING_APP --to $CI_ENVIRONMENT_SLUG || true
- dpl --provider=heroku --app=$CI_ENVIRONMENT_SLUG --api-key=$HEROKU_API_KEY
- heroku run rake db:migrate --app=$CI_ENVIRONMENT_SLUG
environment:
name: review/$CI_BUILD_REF_NAME
url: https://$CI_ENVIRONMENT_SLUG.herokuapp.com
staging:
stage: staging
environment: staging
script:
- gem install dpl
- dpl --provider=heroku --app=$HEROKU_STAGING_APP --api-key=$HEROKU_API_KEY
- heroku run rake db:migrate --app=$HEROKU_STAGING_APP
only:
- master
production:
stage: production
environment: production
script:
- gem install dpl
- dpl --provider=heroku --app=$HEROKU_PROD_APP --api-key=$HEROKU_API_KEY
- heroku run rake db:migrate --app=$HEROKU_PROD_APP
only:
- master
when: manual
rubocop:
stage: test
script:
- bundle install -j $(nproc) --path vendor
- bundle exec rubocop
staging:
stage: staging
environment: staging
script:
- gem install dpl
- dpl --provider=heroku --app=$HEROKU_STAGING_APP --api-key=$HEROKU_API_KEY
- heroku run rake db:migrate --app=$HEROKU_STAGING_APP
only:
- master
production:
stage: production
environment: production
script:
- gem install dpl
- dpl --provider=heroku --app=$HEROKU_PROD_APP --api-key=$HEROKU_API_KEY
- heroku run rake db:migrate --app=$HEROKU_PROD_APP
only:
- master
when: manual
rubocop:
stage: test
script:
- bundle install -j $(nproc) --path vendor
- bundle exec rubocop
Agnóstico
- gem install bundler --no-ri --no-rdoc
- rm -rf vendor/ruby/2.4.0/cache/bundler/git || true
- ruby -v
cache:
paths:
- vendor/ruby
- node_modules
build:
stage: test
script:
- bundle install -j $(nproc) --path vendor --full-index --clean
- bin/yarn
- cp config/database.ci.yml config/database.yml
- bundle exec rails db:create RAILS_ENV=test
- bundle exec rails db:test:prepare RAILS_ENV=test
- bundle exec rails test
- bundle exec rails test:system
deploy_review:
stage: review
script:
- gem install dpl
- heroku apps:fork --from $HEROKU_STAGING_APP --to $CI_ENVIRONMENT_SLUG || true
- dpl --provider=heroku --app=$CI_ENVIRONMENT_SLUG --api-key=$HEROKU_API_KEY
- heroku run rake db:migrate --app=$CI_ENVIRONMENT_SLUG
environment:
name: review/$CI_BUILD_REF_NAME
url: https://$CI_ENVIRONMENT_SLUG.herokuapp.com
iOS
build_project:
stage: build
script:
- xcodebuild clean -project ProjectName.xcodeproj -scheme SchemeName | xcpretty
- xcodebuild test -project ProjectName.xcodeproj -scheme SchemeName -destination
'platform=iOS Simulator,name=iPhone 6s,OS=9.2' | xcpretty -s
php
image: php:5.6
before_script:
# Install dependencies
- bash ci/docker_install.sh > /dev/null
test:app:
script:
- phpunit --configuration phpunit_myapp.xml
Instalación
gitlab.com
Instrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con Gitlab
TATFT
Prueba todo
el bendito
tiempo
Gracias
@dabit

More Related Content

PPT
Behat sauce
PDF
React Ecosystem
PDF
How to integrate front end tool via gruntjs
PDF
"13 ways to run web applications on the Internet" Andrii Shumada
PDF
Console Apps: php artisan forthe:win
PDF
JSDC 2015 - TDD 的開發哲學,以 Node.js 為例
PDF
JHipster Conf 2018 : Connect your JHipster apps to the world of APIs with Ope...
PPTX
Intro to JavaScript Tooling in Visual Studio Code
Behat sauce
React Ecosystem
How to integrate front end tool via gruntjs
"13 ways to run web applications on the Internet" Andrii Shumada
Console Apps: php artisan forthe:win
JSDC 2015 - TDD 的開發哲學,以 Node.js 為例
JHipster Conf 2018 : Connect your JHipster apps to the world of APIs with Ope...
Intro to JavaScript Tooling in Visual Studio Code

What's hot (20)

PDF
One commit, one release. Continuously delivering a Symfony project.
PPT
Demystifying Maven
PDF
Continous Delivering a PHP application
PDF
HotPush with Ionic 2 and CodePush
PDF
Behaviour Driven Development con Behat & Drupal
PDF
jQuery plugin & testing with Jasmine
PDF
Testing with Codeception (Webelement #30)
PPTX
Ultimate Survival - React-Native edition
PDF
Automate Your Automation | DrupalCon Vienna
PDF
Writing a Jenkins / Hudson plugin
PDF
Concourse CI Meetup Demo
PDF
Structure your Play application with the cake pattern (and test it)
PDF
Introduction to Concourse CI #渋谷Java
PDF
Modern Web Application Development Workflow - web2day 2014
PDF
Супер быстрая автоматизация тестирования на iOS
PPTX
Jenkins Plugin Development With Gradle And Groovy
PDF
Compile time dependency injection in Play 2.4 with macwire
PDF
How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016
PDF
Plugins 2.0: The Overview
One commit, one release. Continuously delivering a Symfony project.
Demystifying Maven
Continous Delivering a PHP application
HotPush with Ionic 2 and CodePush
Behaviour Driven Development con Behat & Drupal
jQuery plugin & testing with Jasmine
Testing with Codeception (Webelement #30)
Ultimate Survival - React-Native edition
Automate Your Automation | DrupalCon Vienna
Writing a Jenkins / Hudson plugin
Concourse CI Meetup Demo
Structure your Play application with the cake pattern (and test it)
Introduction to Concourse CI #渋谷Java
Modern Web Application Development Workflow - web2day 2014
Супер быстрая автоматизация тестирования на iOS
Jenkins Plugin Development With Gradle And Groovy
Compile time dependency injection in Play 2.4 with macwire
How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016
Plugins 2.0: The Overview
Ad

Similar to Instrumentación de entrega continua con Gitlab (20)

PDF
Deploying Symfony | symfony.cat
PDF
Continuous Delivery: The Next Frontier
PPTX
Toolbox of a Ruby Team
PDF
Using Nix and Docker as automated deployment solutions
KEY
Railsconf2011 deployment tips_for_slideshare
PDF
Managing and Monitoring Application Performance
PDF
PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...
PDF
Challenges of container configuration
PDF
Bundling Packages and Deploying Applications with RPM
PPTX
Running Docker in Development & Production (#ndcoslo 2015)
PDF
Dependencies Managers in C/C++. Using stdcpp 2014
PDF
Converting Your Dev Environment to a Docker Stack - php[world]
PDF
Zero Downtime Deployment with Ansible
PPTX
drupal ci cd concept cornel univercity.pptx
PPTX
Control your deployments with Capistrano
PDF
2017-03-11 02 Денис Нелюбин. Docker & Ansible - лучшие друзья DevOps
PDF
Scaling up development of a modular code base
PDF
Использование Docker в CI / Александр Акбашев (HERE Technologies)
KEY
Ruby and Rails Packaging to Production
PPTX
NLIT 2011: Chef & Capistrano
Deploying Symfony | symfony.cat
Continuous Delivery: The Next Frontier
Toolbox of a Ruby Team
Using Nix and Docker as automated deployment solutions
Railsconf2011 deployment tips_for_slideshare
Managing and Monitoring Application Performance
PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...
Challenges of container configuration
Bundling Packages and Deploying Applications with RPM
Running Docker in Development & Production (#ndcoslo 2015)
Dependencies Managers in C/C++. Using stdcpp 2014
Converting Your Dev Environment to a Docker Stack - php[world]
Zero Downtime Deployment with Ansible
drupal ci cd concept cornel univercity.pptx
Control your deployments with Capistrano
2017-03-11 02 Денис Нелюбин. Docker & Ansible - лучшие друзья DevOps
Scaling up development of a modular code base
Использование Docker в CI / Александр Акбашев (HERE Technologies)
Ruby and Rails Packaging to Production
NLIT 2011: Chef & Capistrano
Ad

More from Software Guru (20)

PDF
Hola Mundo del Internet de las Cosas
PDF
Estructuras de datos avanzadas: Casos de uso reales
PPTX
Building bias-aware environments
PDF
El secreto para ser un desarrollador Senior
PDF
Cómo encontrar el trabajo remoto ideal
PDF
Automatizando ideas con Apache Airflow
PPTX
How thick data can improve big data analysis for business:
PDF
Introducción al machine learning
PDF
Democratizando el uso de CoDi
PDF
Gestionando la felicidad de los equipos con Management 3.0
PDF
Taller: Creación de Componentes Web re-usables con StencilJS
PPTX
El camino del full stack developer (o como hacemos en SERTI para que no solo ...
PDF
¿Qué significa ser un programador en Bitso?
PDF
Colaboración efectiva entre desarrolladores del cliente y tu equipo.
PDF
Pruebas de integración con Docker en Azure DevOps
PDF
Elixir + Elm: Usando lenguajes funcionales en servicios productivos
PDF
Así publicamos las apps de Spotify sin stress
PPTX
Achieving Your Goals: 5 Tips to successfully achieve your goals
PDF
Acciones de comunidades tech en tiempos del Covid19
PDF
De lo operativo a lo estratégico: un modelo de management de diseño
Hola Mundo del Internet de las Cosas
Estructuras de datos avanzadas: Casos de uso reales
Building bias-aware environments
El secreto para ser un desarrollador Senior
Cómo encontrar el trabajo remoto ideal
Automatizando ideas con Apache Airflow
How thick data can improve big data analysis for business:
Introducción al machine learning
Democratizando el uso de CoDi
Gestionando la felicidad de los equipos con Management 3.0
Taller: Creación de Componentes Web re-usables con StencilJS
El camino del full stack developer (o como hacemos en SERTI para que no solo ...
¿Qué significa ser un programador en Bitso?
Colaboración efectiva entre desarrolladores del cliente y tu equipo.
Pruebas de integración con Docker en Azure DevOps
Elixir + Elm: Usando lenguajes funcionales en servicios productivos
Así publicamos las apps de Spotify sin stress
Achieving Your Goals: 5 Tips to successfully achieve your goals
Acciones de comunidades tech en tiempos del Covid19
De lo operativo a lo estratégico: un modelo de management de diseño

Recently uploaded (20)

PDF
“A New Era of 3D Sensing: Transforming Industries and Creating Opportunities,...
PDF
Flame analysis and combustion estimation using large language and vision assi...
PPTX
Configure Apache Mutual Authentication
DOCX
search engine optimization ppt fir known well about this
PPT
Galois Field Theory of Risk: A Perspective, Protocol, and Mathematical Backgr...
PDF
Consumable AI The What, Why & How for Small Teams.pdf
PPTX
Microsoft Excel 365/2024 Beginner's training
PPTX
Training Program for knowledge in solar cell and solar industry
PDF
Improvisation in detection of pomegranate leaf disease using transfer learni...
DOCX
Basics of Cloud Computing - Cloud Ecosystem
PPTX
Final SEM Unit 1 for mit wpu at pune .pptx
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PPTX
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
PPTX
Modernising the Digital Integration Hub
PDF
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
PPT
Geologic Time for studying geology for geologist
PDF
Zenith AI: Advanced Artificial Intelligence
PDF
Convolutional neural network based encoder-decoder for efficient real-time ob...
PDF
Statistics on Ai - sourced from AIPRM.pdf
PDF
CloudStack 4.21: First Look Webinar slides
“A New Era of 3D Sensing: Transforming Industries and Creating Opportunities,...
Flame analysis and combustion estimation using large language and vision assi...
Configure Apache Mutual Authentication
search engine optimization ppt fir known well about this
Galois Field Theory of Risk: A Perspective, Protocol, and Mathematical Backgr...
Consumable AI The What, Why & How for Small Teams.pdf
Microsoft Excel 365/2024 Beginner's training
Training Program for knowledge in solar cell and solar industry
Improvisation in detection of pomegranate leaf disease using transfer learni...
Basics of Cloud Computing - Cloud Ecosystem
Final SEM Unit 1 for mit wpu at pune .pptx
NewMind AI Weekly Chronicles – August ’25 Week III
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
Modernising the Digital Integration Hub
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
Geologic Time for studying geology for geologist
Zenith AI: Advanced Artificial Intelligence
Convolutional neural network based encoder-decoder for efficient real-time ob...
Statistics on Ai - sourced from AIPRM.pdf
CloudStack 4.21: First Look Webinar slides

Instrumentación de entrega continua con Gitlab

  • 1. CI/CD con Gitlab David Padilla @dabit
  • 15. Control de versiones (git) Merge Requests / Retroalimentación Orquesta deploys Corre pruebas Registry de Docker
  • 17. require 'application_system_test_case' class HomepagesTest < ApplicationSystemTestCase test 'homepage' do visit root_path assert_content 'SGNext' end end
  • 18. require 'application_system_test_case' class HomepagesTest < ApplicationSystemTestCase test 'homepage' do visit root_path assert_content 'SGNext' end end
  • 19. require 'application_system_test_case' class HomepagesTest < ApplicationSystemTestCase test 'homepage' do visit root_path assert_content 'SGNext' end end
  • 22. Como Usuario cuando voy a la pagina principal quiero ver el slogan "La mejor conferencia de México"
  • 23. require 'application_system_test_case' class HomepagesTest < ApplicationSystemTestCase test 'homepage' do visit root_path assert_content 'SGNext' end end
  • 24. require 'application_system_test_case' class HomepagesTest < ApplicationSystemTestCase test 'homepage' do visit root_path assert_content 'SGNext' assert_content 'La mejor conferencia de Mexico' end end
  • 27. <div class="row align-items-center"> <div class="col-md-12"> <div class="jumbotron"> <h1 class="display-3">SGNext</h1> <p class="lead"> La mejor conferencia de Mexico </p> </div> </div> </div>
  • 28. <div class="row align-items-center"> <div class="col-md-12"> <div class="jumbotron"> <h1 class="display-3">SGNext</h1> <p class="lead"> La mejor conferencia de Mexico </p> </div> </div> </div>
  • 29. <div class="row align-items-center"> <div class="col-md-12"> <div class="jumbotron"> <h1 class="display-3">SGNext</h1> <p class="lead"> La mejor conferencia de Mexico </p> </div> </div> </div>
  • 32. $ git checkout -b slogan $ git add . $ git commit -m "Nuevo slogan" [slogan d287522] Nuevo slogan 2 files changed, 2 insertions(+)
  • 44. require 'application_system_test_case' class HomepagesTest < ApplicationSystemTestCase test 'homepage' do visit root_path assert_content 'SGNext' assert_content 'La mejor conferencia de México' end end
  • 45. <div class="row align-items-center"> <div class="col-md-12"> <div class="jumbotron"> <h1 class="display-3">SGNext</h1> <p class="lead"> La mejor conferencia de México </p> </div> </div> </div>
  • 59. FROM ruby:2.4.1 ENV PHANTOM_JS="phantomjs-2.1.1-linux-x86_64" RUN apt-get update RUN apt-get install -y software-properties-common apt-transport-https RUN add-apt-repository "deb https://cli-assets.heroku.com/branches/stable/apt ./" RUN curl -L https://cli-assets.heroku.com/apt/release.key | apt-key add - RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list RUN curl -sL https://deb.nodesource.com/setup_6.x | bash - RUN apt-get update && apt-get upgrade -y RUN apt-get install -y build-essential chrpath libssl-dev libxft-dev libfreetype6 libfreetype6-dev libfontconfig1 libfontconfig1-dev qt5-default libqt5webkit5-dev gstreamer1.0-plugins-base gstreamer1.0-tools gstreamer1.0-x imagemagick cmake yarn nodejs RUN apt-get install heroku RUN gem install dpl RUN curl -L -O https://bitbucket.org/ariya/phantomjs/downloads/$PHANTOM_JS.tar.bz2 RUN tar xvjf $PHANTOM_JS.tar.bz2 && mv $PHANTOM_JS /usr/local/share && ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/bin
  • 60. FROM ruby:2.4.1 ENV PHANTOM_JS="phantomjs-2.1.1-linux-x86_64" RUN apt-get update RUN apt-get install -y software-properties-common apt-transport-https RUN add-apt-repository "deb https://cli-assets.heroku.com/branches/stable/apt ./" RUN curl -L https://cli-assets.heroku.com/apt/release.key | apt-key add - RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list RUN curl -sL https://deb.nodesource.com/setup_6.x | bash - RUN apt-get update && apt-get upgrade -y RUN apt-get install -y build-essential chrpath libssl-dev libxft-dev libfreetype6 libfreetype6-dev libfontconfig1 libfontconfig1-dev qt5-default libqt5webkit5-dev gstreamer1.0-plugins-base gstreamer1.0-tools gstreamer1.0-x imagemagick cmake yarn nodejs RUN apt-get install heroku RUN gem install dpl RUN curl -L -O https://bitbucket.org/ariya/phantomjs/downloads/$PHANTOM_JS.tar.bz2 RUN tar xvjf $PHANTOM_JS.tar.bz2 && mv $PHANTOM_JS /usr/local/share && ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/bin
  • 61. FROM ruby:2.4.1 ENV PHANTOM_JS="phantomjs-2.1.1-linux-x86_64" RUN apt-get update RUN apt-get install -y software-properties-common apt-transport-https RUN add-apt-repository "deb https://cli-assets.heroku.com/branches/stable/apt ./" RUN curl -L https://cli-assets.heroku.com/apt/release.key | apt-key add - RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list RUN curl -sL https://deb.nodesource.com/setup_6.x | bash - RUN apt-get update && apt-get upgrade -y RUN apt-get install -y build-essential chrpath libssl-dev libxft-dev libfreetype6 libfreetype6-dev libfontconfig1 libfontconfig1-dev qt5-default libqt5webkit5-dev gstreamer1.0-plugins-base gstreamer1.0-tools gstreamer1.0-x imagemagick cmake yarn nodejs RUN apt-get install heroku RUN gem install dpl RUN curl -L -O https://bitbucket.org/ariya/phantomjs/downloads/$PHANTOM_JS.tar.bz2 RUN tar xvjf $PHANTOM_JS.tar.bz2 && mv $PHANTOM_JS /usr/local/share && ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/bin
  • 62. FROM ruby:2.4.1 ENV PHANTOM_JS="phantomjs-2.1.1-linux-x86_64" RUN apt-get update RUN apt-get install -y software-properties-common apt-transport-https RUN add-apt-repository "deb https://cli-assets.heroku.com/branches/stable/apt ./" RUN curl -L https://cli-assets.heroku.com/apt/release.key | apt-key add - RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list RUN curl -sL https://deb.nodesource.com/setup_6.x | bash - RUN apt-get update && apt-get upgrade -y RUN apt-get install -y build-essential chrpath libssl-dev libxft-dev libfreetype6 libfreetype6-dev libfontconfig1 libfontconfig1-dev qt5-default libqt5webkit5-dev gstreamer1.0-plugins-base gstreamer1.0-tools gstreamer1.0-x imagemagick cmake yarn nodejs RUN apt-get install heroku RUN gem install dpl RUN curl -L -O https://bitbucket.org/ariya/phantomjs/downloads/$PHANTOM_JS.tar.bz2 RUN tar xvjf $PHANTOM_JS.tar.bz2 && mv $PHANTOM_JS /usr/local/share && ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/bin
  • 65. image: registry.michelada.io/demos/sgnext/image services: - postgres stages: - test - review - staging - production variables: DISABLE_SPRING: 'true' before_script: - gem install bundler --no-ri --no-rdoc - rm -rf vendor/ruby/2.4.0/cache/bundler/git || true - ruby -v cache: paths: - vendor/ruby - node_modules build: stage: test script: - bundle install -j $(nproc) --path vendor --full-index --clean - bin/yarn - cp config/database.ci.yml config/database.yml - bundle exec rails db:create RAILS_ENV=test - bundle exec rails db:test:prepare RAILS_ENV=test - bundle exec rails test - bundle exec rails test:system deploy_review: stage: review script: - gem install dpl - heroku apps:fork --from $HEROKU_STAGING_APP --to $CI_ENVIRONMENT_SLUG || true - dpl --provider=heroku --app=$CI_ENVIRONMENT_SLUG --api-key=$HEROKU_API_KEY - heroku run rake db:migrate --app=$CI_ENVIRONMENT_SLUG environment: name: review/$CI_BUILD_REF_NAME url: https://$CI_ENVIRONMENT_SLUG.herokuapp.com only: - branches except: - master staging: stage: staging environment: staging script: - gem install dpl - dpl --provider=heroku --app=$HEROKU_STAGING_APP --api-key=$HEROKU_API_KEY - heroku run rake db:migrate --app=$HEROKU_STAGING_APP only: - master production: stage: production environment: production script: - gem install dpl - dpl --provider=heroku --app=$HEROKU_PROD_APP --api-key=$HEROKU_API_KEY - heroku run rake db:migrate --app=$HEROKU_PROD_APP only: - master when: manual
  • 66. image: registry.michelada.io/demos/sgnext/image services: - postgres stages: - test - review - staging - production variables: DISABLE_SPRING: 'true' before_script: - gem install bundler --no-ri --no-rdoc - rm -rf vendor/ruby/2.4.0/cache/bundler/git || true - ruby -v cache: paths: - vendor/ruby - node_modules build: stage: test script:
  • 67. image: registry.michelada.io/demos/sgnext/image services: - postgres stages: - test - review - staging - production variables: DISABLE_SPRING: 'true' before_script: - gem install bundler --no-ri --no-rdoc - rm -rf vendor/ruby/2.4.0/cache/bundler/git || true - ruby -v cache: paths: - vendor/ruby - node_modules build: stage: test script:
  • 68. image: registry.michelada.io/demos/sgnext/image services: - postgres stages: - test - review - staging - production variables: DISABLE_SPRING: 'true' before_script: - gem install bundler --no-ri --no-rdoc - rm -rf vendor/ruby/2.4.0/cache/bundler/git || true - ruby -v cache: paths: - vendor/ruby - node_modules build: stage: test script:
  • 69. image: registry.michelada.io/demos/sgnext/image services: - postgres stages: - test - review - staging - production variables: DISABLE_SPRING: 'true' before_script: - gem install bundler --no-ri --no-rdoc - rm -rf vendor/ruby/2.4.0/cache/bundler/git || true - ruby -v cache: paths: - vendor/ruby - node_modules build: stage: test script:
  • 70. - gem install bundler --no-ri --no-rdoc - rm -rf vendor/ruby/2.4.0/cache/bundler/git || true - ruby -v cache: paths: - vendor/ruby - node_modules build: stage: test script: - bundle install -j $(nproc) --path vendor --full-index --clean - bin/yarn - cp config/database.ci.yml config/database.yml - bundle exec rails db:create RAILS_ENV=test - bundle exec rails db:test:prepare RAILS_ENV=test - bundle exec rails test - bundle exec rails test:system deploy_review: stage: review script: - gem install dpl - heroku apps:fork --from $HEROKU_STAGING_APP --to $CI_ENVIRONMENT_SLUG || true - dpl --provider=heroku --app=$CI_ENVIRONMENT_SLUG --api-key=$HEROKU_API_KEY - heroku run rake db:migrate --app=$CI_ENVIRONMENT_SLUG environment: name: review/$CI_BUILD_REF_NAME url: https://$CI_ENVIRONMENT_SLUG.herokuapp.com
  • 71. - gem install bundler --no-ri --no-rdoc - rm -rf vendor/ruby/2.4.0/cache/bundler/git || true - ruby -v cache: paths: - vendor/ruby - node_modules build: stage: test script: - bundle install -j $(nproc) --path vendor --full-index --clean - bin/yarn - cp config/database.ci.yml config/database.yml - bundle exec rails db:create RAILS_ENV=test - bundle exec rails db:test:prepare RAILS_ENV=test - bundle exec rails test - bundle exec rails test:system deploy_review: stage: review script: - gem install dpl - heroku apps:fork --from $HEROKU_STAGING_APP --to $CI_ENVIRONMENT_SLUG || true - dpl --provider=heroku --app=$CI_ENVIRONMENT_SLUG --api-key=$HEROKU_API_KEY - heroku run rake db:migrate --app=$CI_ENVIRONMENT_SLUG environment: name: review/$CI_BUILD_REF_NAME url: https://$CI_ENVIRONMENT_SLUG.herokuapp.com
  • 72. staging: stage: staging environment: staging script: - gem install dpl - dpl --provider=heroku --app=$HEROKU_STAGING_APP --api-key=$HEROKU_API_KEY - heroku run rake db:migrate --app=$HEROKU_STAGING_APP only: - master production: stage: production environment: production script: - gem install dpl - dpl --provider=heroku --app=$HEROKU_PROD_APP --api-key=$HEROKU_API_KEY - heroku run rake db:migrate --app=$HEROKU_PROD_APP only: - master when: manual rubocop: stage: test script: - bundle install -j $(nproc) --path vendor - bundle exec rubocop
  • 73. staging: stage: staging environment: staging script: - gem install dpl - dpl --provider=heroku --app=$HEROKU_STAGING_APP --api-key=$HEROKU_API_KEY - heroku run rake db:migrate --app=$HEROKU_STAGING_APP only: - master production: stage: production environment: production script: - gem install dpl - dpl --provider=heroku --app=$HEROKU_PROD_APP --api-key=$HEROKU_API_KEY - heroku run rake db:migrate --app=$HEROKU_PROD_APP only: - master when: manual rubocop: stage: test script: - bundle install -j $(nproc) --path vendor - bundle exec rubocop
  • 75. - gem install bundler --no-ri --no-rdoc - rm -rf vendor/ruby/2.4.0/cache/bundler/git || true - ruby -v cache: paths: - vendor/ruby - node_modules build: stage: test script: - bundle install -j $(nproc) --path vendor --full-index --clean - bin/yarn - cp config/database.ci.yml config/database.yml - bundle exec rails db:create RAILS_ENV=test - bundle exec rails db:test:prepare RAILS_ENV=test - bundle exec rails test - bundle exec rails test:system deploy_review: stage: review script: - gem install dpl - heroku apps:fork --from $HEROKU_STAGING_APP --to $CI_ENVIRONMENT_SLUG || true - dpl --provider=heroku --app=$CI_ENVIRONMENT_SLUG --api-key=$HEROKU_API_KEY - heroku run rake db:migrate --app=$CI_ENVIRONMENT_SLUG environment: name: review/$CI_BUILD_REF_NAME url: https://$CI_ENVIRONMENT_SLUG.herokuapp.com
  • 76. iOS build_project: stage: build script: - xcodebuild clean -project ProjectName.xcodeproj -scheme SchemeName | xcpretty - xcodebuild test -project ProjectName.xcodeproj -scheme SchemeName -destination 'platform=iOS Simulator,name=iPhone 6s,OS=9.2' | xcpretty -s
  • 77. php image: php:5.6 before_script: # Install dependencies - bash ci/docker_install.sh > /dev/null test:app: script: - phpunit --configuration phpunit_myapp.xml
  • 83. TATFT