Eric Guimarães de Sousa Silva
Mmm.... Don't know what to say. >D
#meetupnaindra
Linha de montagem
Pode ser entendida como uma forma de produção em série; ocorre quando um estabelecimento industrial com o auxílio de máquinas transformam as matérias-primas e produtos semi-acabados em produtos acabados destinados ao consumo. (Wikipédia)
Pipeline de Pipelines
Diferença:
* Application Release Automation
Senta que lá vem história...
Build - Test - Push
---
stages:
- CI
ci:
stage: CI
image: docker:1.11
services:
- docker:dind
script:
# Build
- docker build -t registry.gitlab.com/meetup-assembly-lines/01-demo-ci .
# Test
- docker run --rm registry.gitlab.com/meetup-assembly-lines/01-demo-ci npm test
# Push
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
- docker push registry.gitlab.com/meetup-assembly-lines/01-demo-ci
Test
Build
Push
---
image: docker:1.11
stages:
- Build
- Test
- Push
docker:build:
stage: Build
services:
- docker:dind
script:
- docker build -t registry.gitlab.com/meetup-assembly-lines/02-demo-ci-stages:temp .
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
- docker push registry.gitlab.com/meetup-assembly-lines/02-demo-ci-stages:temp
npm:test:
stage: Test
services:
- docker:dind
script:
- docker run --rm registry.gitlab.com/meetup-assembly-lines/02-demo-ci-stages:temp npm test
docker:push:
stage: Push
services:
- docker:dind
script:
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
- docker pull registry.gitlab.com/meetup-assembly-lines/02-demo-ci-stages:temp
- docker tag registry.gitlab.com/meetup-assembly-lines/02-demo-ci-stages:temp registry.gitlab.com/meetup-assembly-lines/02-demo-ci-stages
- docker push registry.gitlab.com/meetup-assembly-lines/02-demo-ci-stages
Test
Build
Push
---
image: docker:1.11
stages:
- Build
- Test
- Push
Docker Build:
stage: Build
services:
- docker:dind
script:
- docker build -t registry.gitlab.com/meetup-assembly-lines/03-demo-ci-parallel:temp .
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
- docker push registry.gitlab.com/meetup-assembly-lines/03-demo-ci-parallel:temp
Image 1:
stage: Test
services:
- docker:dind
script:
- docker run --rm registry.gitlab.com/meetup-assembly-lines/01-demo-ci npm test
Image 2:
stage: Test
services:
- docker:dind
script:
- docker run --rm registry.gitlab.com/meetup-assembly-lines/02-demo-ci-stages npm test
Image 3:
stage: Test
services:
- docker:dind
script:
- docker run --rm registry.gitlab.com/meetup-assembly-lines/03-demo-ci-parallel:temp npm test
Docker Push:
stage: Push
services:
- docker:dind
script:
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
- docker pull registry.gitlab.com/meetup-assembly-lines/03-demo-ci-parallel:temp
- docker tag registry.gitlab.com/meetup-assembly-lines/03-demo-ci-parallel:temp registry.gitlab.com/meetup-assembly-lines/03-demo-ci-parallel
- docker push registry.gitlab.com/meetup-assembly-lines/03-demo-ci-parallel
Test
Build
Push
Deploy
---
stages:
- Build
- Test
- Push
- Deploy:Staging
- Deploy:Production
Docker Build:
stage: Build
image: docker:1.11
services:
- docker:dind
script:
- docker build -t registry.gitlab.com/meetup-assembly-lines/04-demo-cd-decision:temp .
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
- docker push registry.gitlab.com/meetup-assembly-lines/04-demo-cd-decision:temp
Image 1:
stage: Test
image: docker:1.11
services:
- docker:dind
script:
- docker run --rm registry.gitlab.com/meetup-assembly-lines/01-demo-ci npm test
Image 2:
stage: Test
image: docker:1.11
services:
- docker:dind
script:
- docker run --rm registry.gitlab.com/meetup-assembly-lines/02-demo-ci-stages npm test
Image 3:
stage: Test
image: docker:1.11
services:
- docker:dind
script:
- docker run --rm registry.gitlab.com/meetup-assembly-lines/03-demo-ci-parallel npm test
Image 4:
stage: Test
image: docker:1.11
services:
- docker:dind
script:
- docker run --rm registry.gitlab.com/meetup-assembly-lines/04-demo-cd-decision:temp npm test
Docker Push:
stage: Push
image: docker:1.11
services:
- docker:dind
script:
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
- docker pull registry.gitlab.com/meetup-assembly-lines/04-demo-cd-decision:temp
- docker tag registry.gitlab.com/meetup-assembly-lines/04-demo-cd-decision:temp registry.gitlab.com/meetup-assembly-lines/04-demo-cd-decision
- docker push registry.gitlab.com/meetup-assembly-lines/04-demo-cd-decision
Deploy to Staging:
stage: Deploy:Staging
retry: 2
script:
- echo "Loading config..."
- echo sleep 5
- echo "Deploying to awesome [Staging] server... "
- echo sleep 7
- echo "OK - End of deploy"
Deploy to Production:
stage: Deploy:Production
when: manual
retry: 2
script:
- echo "Loading config..."
- echo sleep 5
- echo "Deploying to awesome [Production] server... "
- echo sleep 7
- echo "OK - End of deploy"
Adoçar Suco
Cortar Limões
Espremer Limões
Suco de Limão
Açúcar
Limão
Suco Adoçado
Limão Cortado
Espremedor
Limão Cortado
Suco de Limão
Adoçar Suco
Cortar Limões
Espremer Limões
Açúcar
Limão
Suco Adoçado
Limão Cortado
Espremedor
Suco de Limão
Os Resources e os Jobs podem estar espalhados entre diversos repositórios diferentes.
By Eric Guimarães de Sousa Silva
In this presentation we will walk through pipeline evolution, 'til we reach the concept of DevOps Assembly Lines.