SlideShare une entreprise Scribd logo
1  sur  23
Télécharger pour lire hors ligne
5 things I wish I knew about Gitlab CI
Sebastian Witowski
5 things I wish I knew about Gitlab CI
Sebastian Witowski
Have an hour to spare?
1. Interruptible jobs
build:
stage: build
interruptible: true
script:
- docker compose build
1. Interruptible jobs
2. Caching
You can use caching to, well,
cache stuff between jobs.
2. Caching
You can use caching to, well,
cache stuff between jobs.
But you can also specify if
you want to push or pull stuff
to cache using policy key.
default:
cache: &global_cache
key: $CI_COMMIT_REF_SLUG
paths:
- .cache/pip
- some/other/path/
policy: pull-push
job:
cache:
# inherit all global cache settings
<<: *global_cache
# override the policy
policy: pull
2. Caching with Fastzip
For caching/artifacts, you
can choose different level
of compression (low level of
compression runs faster, but
results in a larger zip file).
variables:
FF_USE_FASTZIP: "true"
# Available options are:
# fastest, fast, default, slow,
# or slowest
ARTIFACT_COMPRESSION_LEVEL: "fastest"
CACHE_COMPRESSION_LEVEL: "fastest"
3. Split slow tests into multiple jobs
• Make MR pipelines fast and main branch pipelines
thorough.
3. Split slow tests into multiple jobs
• Make MR pipelines fast and main branch pipelines
thorough.
• Or run the slow tests at the end of the test suite
(https:/
/stackoverflow.com/a/61539510)
4. Hidden jobs and anchors
Allows you to reuse parts of the config
# Source: https://github.com/wemake-services/wemake-django-template
.docker:
image: wemakeservices/wemake-dind:latest
interruptible: true
services:
- docker:dind
variables:
DOCKER_DRIVER: overlay2
DOCKER_BUILDKIT: 1
COMPOSE_DOCKER_CLI_BUILD: 1
before_script:
- pwd && echo "$CI_PROJECT_DIR" && cd "$CI_PROJECT_DIR"
- echo "$CI_JOB_TOKEN" | docker login "$REGISTRY" -u gitlab-ci-token --
password-stdin
- docker info && docker-compose --version && git --version
test:
stage: test
extends: .docker
before_script:
# Pulling cache:
- docker pull "${IMAGE_FULL_NAME}:dev" || true
- ...
# Source: https://github.com/wemake-services/wemake-django-template
.docker:
image: wemakeservices/wemake-dind:latest
interruptible: true
services:
- docker:dind
variables:
DOCKER_DRIVER: overlay2
DOCKER_BUILDKIT: 1
COMPOSE_DOCKER_CLI_BUILD: 1
before_script:
- pwd && echo "$CI_PROJECT_DIR" && cd "$CI_PROJECT_DIR"
- echo "$CI_JOB_TOKEN" | docker login "$REGISTRY" -u gitlab-ci-token --
password-stdin
- docker info && docker-compose --version && git --version
test:
stage: test
extends: .docker
before_script:
# Pulling cache:
- docker pull "${IMAGE_FULL_NAME}:dev" || true
- ...
# Source: https://github.com/wemake-services/wemake-django-template
.docker:
image: wemakeservices/wemake-dind:latest
interruptible: true
services:
- docker:dind
variables:
DOCKER_DRIVER: overlay2
DOCKER_BUILDKIT: 1
COMPOSE_DOCKER_CLI_BUILD: 1
before_script:
- pwd && echo "$CI_PROJECT_DIR" && cd "$CI_PROJECT_DIR"
- echo "$CI_JOB_TOKEN" | docker login "$REGISTRY" -u gitlab-ci-token --
password-stdin
- docker info && docker-compose --version && git --version
test:
stage: test
extends: .docker
before_script:
# Pulling cache:
- docker pull "${IMAGE_FULL_NAME}:dev" || true
- ...
# Source: https://github.com/wemake-services/wemake-django-template
.docker:
image: wemakeservices/wemake-dind:latest
interruptible: true
services:
- docker:dind
variables:
DOCKER_DRIVER: overlay2
DOCKER_BUILDKIT: 1
COMPOSE_DOCKER_CLI_BUILD: 1
before_script:
- pwd && echo "$CI_PROJECT_DIR" && cd "$CI_PROJECT_DIR"
- echo "$CI_JOB_TOKEN" | docker login "$REGISTRY" -u gitlab-ci-token --
password-stdin
- docker info && docker-compose --version && git --version
test:
stage: test
extends: .docker
before_script:
# Pulling cache:
- docker pull "${IMAGE_FULL_NAME}:dev" || true
- ...
# Source: https://github.com/wemake-services/wemake-django-template
.docker:
image: wemakeservices/wemake-dind:latest
interruptible: true
services:
- docker:dind
variables:
DOCKER_DRIVER: overlay2
DOCKER_BUILDKIT: 1
COMPOSE_DOCKER_CLI_BUILD: 1
before_script:
- pwd && echo "$CI_PROJECT_DIR" && cd "$CI_PROJECT_DIR"
- echo "$CI_JOB_TOKEN" | docker login "$REGISTRY" -u gitlab-ci-token --
password-stdin
- docker info && docker-compose --version && git --version
test:
stage: test
extends: .docker
before_script:
# Pulling cache:
- docker pull "${IMAGE_FULL_NAME}:dev" || true
- ...
# Source: https://github.com/wemake-services/wemake-django-template
.docker:
image: wemakeservices/wemake-dind:latest
interruptible: true
services:
- docker:dind
variables:
DOCKER_DRIVER: overlay2
DOCKER_BUILDKIT: 1
COMPOSE_DOCKER_CLI_BUILD: 1
before_script: &docker-before-script
- pwd && echo "$CI_PROJECT_DIR" && cd "$CI_PROJECT_DIR"
- echo "$CI_JOB_TOKEN" | docker login "$REGISTRY" -u gitlab-ci-token --
password-stdin
- docker info && docker-compose --version && git --version
test:
stage: test
extends: .docker
before_script:
- *docker-before-script
# Pulling cache:
- docker pull "${IMAGE_FULL_NAME}:dev" || true
- ...
5. Runners
5. Runners
• Very easy to set up and use (it's just a binary)
5. Runners
• Very easy to set up and use (it's just a binary)
• Save you money if you run many jobs
5. Runners
• Very easy to set up and use (it's just a binary)
• Save you money if you run many jobs
• Allows for much more flexibility (e.g. access to
proprietary code on your servers)
Wanna learn more?
Questions?
switowski.com
@SebaWitowski
Slides: https:/
/www.slideshare.net/SebastianWitowski

Contenu connexe

Similaire à 5 Things I Wish I Knew About Gitlab CI

Coscup x ruby conf tw 2021 google cloud buildpacks 剖析與實踐
Coscup x ruby conf tw 2021  google cloud buildpacks 剖析與實踐Coscup x ruby conf tw 2021  google cloud buildpacks 剖析與實踐
Coscup x ruby conf tw 2021 google cloud buildpacks 剖析與實踐KAI CHU CHUNG
 
Build optimization mechanisms in GitLab and Docker
Build optimization mechanisms in GitLab and DockerBuild optimization mechanisms in GitLab and Docker
Build optimization mechanisms in GitLab and DockerDmytro Patkovskyi
 
Hands on Docker - Launch your own LEMP or LAMP stack
Hands on Docker -  Launch your own LEMP or LAMP stackHands on Docker -  Launch your own LEMP or LAMP stack
Hands on Docker - Launch your own LEMP or LAMP stackDana Luther
 
Gitlab ci, cncf.sk
Gitlab ci, cncf.skGitlab ci, cncf.sk
Gitlab ci, cncf.skJuraj Hantak
 
Baking docker using chef
Baking docker using chefBaking docker using chef
Baking docker using chefMukta Aphale
 
Baking Docker Using Chef - ChefConf 2015
Baking Docker Using Chef - ChefConf 2015Baking Docker Using Chef - ChefConf 2015
Baking Docker Using Chef - ChefConf 2015Chef
 
Docker security
Docker securityDocker security
Docker securityJanos Suto
 
Lean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and DrushLean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and DrushPantheon
 
PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...
PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...
PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...Puppet
 
Challenges of container configuration
Challenges of container configurationChallenges of container configuration
Challenges of container configurationlutter
 
How To Install GitLab As Your Private GitHub Clone
How To Install GitLab As Your Private GitHub CloneHow To Install GitLab As Your Private GitHub Clone
How To Install GitLab As Your Private GitHub CloneVEXXHOST Private Cloud
 
Kubernetes Story - Day 2: Quay.io Container Registry for Publishing, Building...
Kubernetes Story - Day 2: Quay.io Container Registry for Publishing, Building...Kubernetes Story - Day 2: Quay.io Container Registry for Publishing, Building...
Kubernetes Story - Day 2: Quay.io Container Registry for Publishing, Building...Mihai Criveti
 
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 Containersinside-BigData.com
 
ContainerDayVietnam2016: Django Development with Docker
ContainerDayVietnam2016: Django Development with DockerContainerDayVietnam2016: Django Development with Docker
ContainerDayVietnam2016: Django Development with DockerDocker-Hanoi
 
Drone CI/CD 自動化測試及部署
Drone CI/CD 自動化測試及部署Drone CI/CD 自動化測試及部署
Drone CI/CD 自動化測試及部署Bo-Yi Wu
 
Docker Essentials Workshop— Innovation Labs July 2020
Docker Essentials Workshop— Innovation Labs July 2020Docker Essentials Workshop— Innovation Labs July 2020
Docker Essentials Workshop— Innovation Labs July 2020CloudHero
 
Running Docker in Development & Production (#ndcoslo 2015)
Running Docker in Development & Production (#ndcoslo 2015)Running Docker in Development & Production (#ndcoslo 2015)
Running Docker in Development & Production (#ndcoslo 2015)Ben Hall
 
[Devconf.cz][2017] Understanding OpenShift Security Context Constraints
[Devconf.cz][2017] Understanding OpenShift Security Context Constraints[Devconf.cz][2017] Understanding OpenShift Security Context Constraints
[Devconf.cz][2017] Understanding OpenShift Security Context ConstraintsAlessandro Arrichiello
 

Similaire à 5 Things I Wish I Knew About Gitlab CI (20)

Coscup x ruby conf tw 2021 google cloud buildpacks 剖析與實踐
Coscup x ruby conf tw 2021  google cloud buildpacks 剖析與實踐Coscup x ruby conf tw 2021  google cloud buildpacks 剖析與實踐
Coscup x ruby conf tw 2021 google cloud buildpacks 剖析與實踐
 
Build optimization mechanisms in GitLab and Docker
Build optimization mechanisms in GitLab and DockerBuild optimization mechanisms in GitLab and Docker
Build optimization mechanisms in GitLab and Docker
 
Hands on Docker - Launch your own LEMP or LAMP stack
Hands on Docker -  Launch your own LEMP or LAMP stackHands on Docker -  Launch your own LEMP or LAMP stack
Hands on Docker - Launch your own LEMP or LAMP stack
 
Gitlab ci, cncf.sk
Gitlab ci, cncf.skGitlab ci, cncf.sk
Gitlab ci, cncf.sk
 
Baking docker using chef
Baking docker using chefBaking docker using chef
Baking docker using chef
 
Baking Docker Using Chef - ChefConf 2015
Baking Docker Using Chef - ChefConf 2015Baking Docker Using Chef - ChefConf 2015
Baking Docker Using Chef - ChefConf 2015
 
Docker security
Docker securityDocker security
Docker security
 
Lean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and DrushLean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and Drush
 
PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...
PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...
PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...
 
Challenges of container configuration
Challenges of container configurationChallenges of container configuration
Challenges of container configuration
 
How To Install GitLab As Your Private GitHub Clone
How To Install GitLab As Your Private GitHub CloneHow To Install GitLab As Your Private GitHub Clone
How To Install GitLab As Your Private GitHub Clone
 
Gradle como alternativa a maven
Gradle como alternativa a mavenGradle como alternativa a maven
Gradle como alternativa a maven
 
Docker, c'est bonheur !
Docker, c'est bonheur !Docker, c'est bonheur !
Docker, c'est bonheur !
 
Kubernetes Story - Day 2: Quay.io Container Registry for Publishing, Building...
Kubernetes Story - Day 2: Quay.io Container Registry for Publishing, Building...Kubernetes Story - Day 2: Quay.io Container Registry for Publishing, Building...
Kubernetes Story - Day 2: Quay.io Container Registry for Publishing, Building...
 
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
 
ContainerDayVietnam2016: Django Development with Docker
ContainerDayVietnam2016: Django Development with DockerContainerDayVietnam2016: Django Development with Docker
ContainerDayVietnam2016: Django Development with Docker
 
Drone CI/CD 自動化測試及部署
Drone CI/CD 自動化測試及部署Drone CI/CD 自動化測試及部署
Drone CI/CD 自動化測試及部署
 
Docker Essentials Workshop— Innovation Labs July 2020
Docker Essentials Workshop— Innovation Labs July 2020Docker Essentials Workshop— Innovation Labs July 2020
Docker Essentials Workshop— Innovation Labs July 2020
 
Running Docker in Development & Production (#ndcoslo 2015)
Running Docker in Development & Production (#ndcoslo 2015)Running Docker in Development & Production (#ndcoslo 2015)
Running Docker in Development & Production (#ndcoslo 2015)
 
[Devconf.cz][2017] Understanding OpenShift Security Context Constraints
[Devconf.cz][2017] Understanding OpenShift Security Context Constraints[Devconf.cz][2017] Understanding OpenShift Security Context Constraints
[Devconf.cz][2017] Understanding OpenShift Security Context Constraints
 

Plus de Sebastian Witowski

Python Versions and Dependencies Made Easy
Python Versions and Dependencies Made EasyPython Versions and Dependencies Made Easy
Python Versions and Dependencies Made EasySebastian Witowski
 
Productivity tips for developers
Productivity tips for developersProductivity tips for developers
Productivity tips for developersSebastian Witowski
 
Wait, IPython can do that?! (30 minutes)
Wait, IPython can do that?! (30 minutes)Wait, IPython can do that?! (30 minutes)
Wait, IPython can do that?! (30 minutes)Sebastian Witowski
 
It's 2019 & I'm still using Python 2! Should I be worried?
It's 2019 & I'm still using Python 2! Should I be worried?It's 2019 & I'm still using Python 2! Should I be worried?
It's 2019 & I'm still using Python 2! Should I be worried?Sebastian Witowski
 

Plus de Sebastian Witowski (6)

Writing Faster Python 3
Writing Faster Python 3Writing Faster Python 3
Writing Faster Python 3
 
Python Versions and Dependencies Made Easy
Python Versions and Dependencies Made EasyPython Versions and Dependencies Made Easy
Python Versions and Dependencies Made Easy
 
Productivity tips for developers
Productivity tips for developersProductivity tips for developers
Productivity tips for developers
 
Wait, IPython can do that?! (30 minutes)
Wait, IPython can do that?! (30 minutes)Wait, IPython can do that?! (30 minutes)
Wait, IPython can do that?! (30 minutes)
 
It's 2019 & I'm still using Python 2! Should I be worried?
It's 2019 & I'm still using Python 2! Should I be worried?It's 2019 & I'm still using Python 2! Should I be worried?
It's 2019 & I'm still using Python 2! Should I be worried?
 
Wait, IPython can do that?
Wait, IPython can do that?Wait, IPython can do that?
Wait, IPython can do that?
 

Dernier

How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
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.
 

Dernier (20)

How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
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...
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 

5 Things I Wish I Knew About Gitlab CI

  • 1. 5 things I wish I knew about Gitlab CI Sebastian Witowski
  • 2. 5 things I wish I knew about Gitlab CI Sebastian Witowski
  • 3. Have an hour to spare?
  • 5. build: stage: build interruptible: true script: - docker compose build 1. Interruptible jobs
  • 6. 2. Caching You can use caching to, well, cache stuff between jobs.
  • 7. 2. Caching You can use caching to, well, cache stuff between jobs. But you can also specify if you want to push or pull stuff to cache using policy key. default: cache: &global_cache key: $CI_COMMIT_REF_SLUG paths: - .cache/pip - some/other/path/ policy: pull-push job: cache: # inherit all global cache settings <<: *global_cache # override the policy policy: pull
  • 8. 2. Caching with Fastzip For caching/artifacts, you can choose different level of compression (low level of compression runs faster, but results in a larger zip file). variables: FF_USE_FASTZIP: "true" # Available options are: # fastest, fast, default, slow, # or slowest ARTIFACT_COMPRESSION_LEVEL: "fastest" CACHE_COMPRESSION_LEVEL: "fastest"
  • 9. 3. Split slow tests into multiple jobs • Make MR pipelines fast and main branch pipelines thorough.
  • 10. 3. Split slow tests into multiple jobs • Make MR pipelines fast and main branch pipelines thorough. • Or run the slow tests at the end of the test suite (https:/ /stackoverflow.com/a/61539510)
  • 11. 4. Hidden jobs and anchors Allows you to reuse parts of the config
  • 12. # Source: https://github.com/wemake-services/wemake-django-template .docker: image: wemakeservices/wemake-dind:latest interruptible: true services: - docker:dind variables: DOCKER_DRIVER: overlay2 DOCKER_BUILDKIT: 1 COMPOSE_DOCKER_CLI_BUILD: 1 before_script: - pwd && echo "$CI_PROJECT_DIR" && cd "$CI_PROJECT_DIR" - echo "$CI_JOB_TOKEN" | docker login "$REGISTRY" -u gitlab-ci-token -- password-stdin - docker info && docker-compose --version && git --version test: stage: test extends: .docker before_script: # Pulling cache: - docker pull "${IMAGE_FULL_NAME}:dev" || true - ...
  • 13. # Source: https://github.com/wemake-services/wemake-django-template .docker: image: wemakeservices/wemake-dind:latest interruptible: true services: - docker:dind variables: DOCKER_DRIVER: overlay2 DOCKER_BUILDKIT: 1 COMPOSE_DOCKER_CLI_BUILD: 1 before_script: - pwd && echo "$CI_PROJECT_DIR" && cd "$CI_PROJECT_DIR" - echo "$CI_JOB_TOKEN" | docker login "$REGISTRY" -u gitlab-ci-token -- password-stdin - docker info && docker-compose --version && git --version test: stage: test extends: .docker before_script: # Pulling cache: - docker pull "${IMAGE_FULL_NAME}:dev" || true - ...
  • 14. # Source: https://github.com/wemake-services/wemake-django-template .docker: image: wemakeservices/wemake-dind:latest interruptible: true services: - docker:dind variables: DOCKER_DRIVER: overlay2 DOCKER_BUILDKIT: 1 COMPOSE_DOCKER_CLI_BUILD: 1 before_script: - pwd && echo "$CI_PROJECT_DIR" && cd "$CI_PROJECT_DIR" - echo "$CI_JOB_TOKEN" | docker login "$REGISTRY" -u gitlab-ci-token -- password-stdin - docker info && docker-compose --version && git --version test: stage: test extends: .docker before_script: # Pulling cache: - docker pull "${IMAGE_FULL_NAME}:dev" || true - ...
  • 15. # Source: https://github.com/wemake-services/wemake-django-template .docker: image: wemakeservices/wemake-dind:latest interruptible: true services: - docker:dind variables: DOCKER_DRIVER: overlay2 DOCKER_BUILDKIT: 1 COMPOSE_DOCKER_CLI_BUILD: 1 before_script: - pwd && echo "$CI_PROJECT_DIR" && cd "$CI_PROJECT_DIR" - echo "$CI_JOB_TOKEN" | docker login "$REGISTRY" -u gitlab-ci-token -- password-stdin - docker info && docker-compose --version && git --version test: stage: test extends: .docker before_script: # Pulling cache: - docker pull "${IMAGE_FULL_NAME}:dev" || true - ...
  • 16. # Source: https://github.com/wemake-services/wemake-django-template .docker: image: wemakeservices/wemake-dind:latest interruptible: true services: - docker:dind variables: DOCKER_DRIVER: overlay2 DOCKER_BUILDKIT: 1 COMPOSE_DOCKER_CLI_BUILD: 1 before_script: - pwd && echo "$CI_PROJECT_DIR" && cd "$CI_PROJECT_DIR" - echo "$CI_JOB_TOKEN" | docker login "$REGISTRY" -u gitlab-ci-token -- password-stdin - docker info && docker-compose --version && git --version test: stage: test extends: .docker before_script: # Pulling cache: - docker pull "${IMAGE_FULL_NAME}:dev" || true - ...
  • 17. # Source: https://github.com/wemake-services/wemake-django-template .docker: image: wemakeservices/wemake-dind:latest interruptible: true services: - docker:dind variables: DOCKER_DRIVER: overlay2 DOCKER_BUILDKIT: 1 COMPOSE_DOCKER_CLI_BUILD: 1 before_script: &docker-before-script - pwd && echo "$CI_PROJECT_DIR" && cd "$CI_PROJECT_DIR" - echo "$CI_JOB_TOKEN" | docker login "$REGISTRY" -u gitlab-ci-token -- password-stdin - docker info && docker-compose --version && git --version test: stage: test extends: .docker before_script: - *docker-before-script # Pulling cache: - docker pull "${IMAGE_FULL_NAME}:dev" || true - ...
  • 19. 5. Runners • Very easy to set up and use (it's just a binary)
  • 20. 5. Runners • Very easy to set up and use (it's just a binary) • Save you money if you run many jobs
  • 21. 5. Runners • Very easy to set up and use (it's just a binary) • Save you money if you run many jobs • Allows for much more flexibility (e.g. access to proprietary code on your servers)