Introducción a CI/CD con GitLab

GitLab Logo

Developing modern software requires an automated pipeline that builds, tests, and deploys your application, complete with its required infrastructure.

¿por qué CI/CD con GitLab?

A.) Build
i. Install NPM Dependencies
ii. Run ES-Linter
iii. Run Code-Minifier
B.) Test
i. Run unit, functional and end-to-end test.
ii. Run pkg to compile Node.js application
C.) Deploy
i. Production
1.) Launch EC2 instance on AWS
ii. Staging
1.) Launch on local development server

YAML es un formato para guardar objetos de datos con estructura de árbol. Sus siglas significan YAML Ain’t Markup Language (YAML no es otro lenguaje de marcado). Este lenguaje es muy legible para las personas, más legible que JSON y sobretodo que XML.

image: node:10.5.0

stages:
- build
- test
- deploy

before_script:
- npm install
Documentación de CI/CD en GitLab
build-min-code:
stage: build
script:
- npm install
- npm run minifier
run-unit-test:
stage: test
script:
- npm run test
deploy-staging:
stage: deploy
script:
- npm run deploy-stage
only:
- develop

deploy-production:
stage: deploy
script:
- npm run deploy-prod
only:
- master
GitLab pipeline from scratch
image: node:10.5.0

stages:
- build
- test
- deploy

before_script:
- npm install

build-min-code:
stage: build
script:
- npm install
- npm run minifier

run-unit-test:
stage: test
script:
- npm run test

deploy-staging:
stage: deploy
script:
- npm run deploy-stage
only:
- develop

deploy-production:
stage: deploy
script:
- npm run deploy-prod
only:
- master
Taller de Fundamentos de GitLab en KMMX,

--

--

Cheerleader in chief for KMMX, RPA Enthusiast, DevOps, Technical Writer & International Speaker, Dad & 2 cats.

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store