SlideShare a Scribd company logo
Gitlab CI Hands-on experience
Ivan Rimac
COPYRIGHT
Barrage — Visual identity © Barrage d.o.o. 2020. All Rights Reserved.
About the speaker
- Background in programming
- 8 years of experience
- Currently @ barrage.net - Osijek - Croatia
- Specialized in devops practices and security
- Successfully using Gitlab CI in production over 6 years
2
Barrage d.o.o. | Dedication - Technology - Progression - Productivity - Flexibility | Intro
Why did we started practicing DevOps
- Shift from occasionally performed, to routinely performed
- Enabled via automation - automation isn't the goal it’s the technique to achieve
the goal
- Drive consistency
- Detect problems early
- Remove friction
- Increase your bus factor!
Intro | Pipeline configuration | Pipeline reuse | Pipeline controls
3
Barrage d.o.o. | Dedication - Technology - Progression - Productivity - Flexibility | Intro
Gitlab CI configuration management
- Pipeline configuration
- DAG
- Parent/Child
- Multi-project
- Pipeline component reuse
- Before and after scripts
- Includes, templates and extends
- Pipeline controls
- Variables
- Rules
Intro | Pipeline configuration | Pipeline reuse | Pipeline controls
4
Barrage d.o.o. | Dedication - Technology - Progression - Productivity - Flexibility | Intro
Pipeline configuration - basic
Intro | Pipeline configuration | Pipeline reuse | Pipeline controls
5
Barrage d.o.o. | Dedication - Technology - Progression - Productivity - Flexibility | Pipeline configuration
All jobs in a Stage must
complete successfully before
proceeding to the next stage
Pipeline configuration - with options
Intro | Pipeline configuration | Pipeline reuse | Pipeline controls
6
Barrage d.o.o. | Dedication - Technology - Progression - Productivity - Flexibility | Pipeline configuration
This job has
`allow_failure: true`
…so the pipeline proceeds
even though job failed
This job has
`when: manual`
...so it waits for someone
with the permission to click
a “Play” button”
Pipeline configuration - Directed Acyclic Graph (DAG)
Intro | Pipeline configuration | Pipeline reuse | Pipeline controls
7
Barrage d.o.o. | Dedication - Technology - Progression - Productivity - Flexibility | Pipeline configuration
Pipeline configuration - DAG visualization
Intro | Pipeline configuration | Pipeline reuse | Pipeline controls
8
Barrage d.o.o. | Dedication - Technology - Progression - Productivity - Flexibility | Pipeline configuration
Pipeline configuration - DAG visualization
Intro | Pipeline configuration | Pipeline reuse | Pipeline controls
9
Barrage d.o.o. | Dedication - Technology - Progression - Productivity - Flexibility | Pipeline configuration
Pipeline configuration - Parent/Child pipelines for
Monorepos
Intro | Pipeline configuration | Pipeline reuse | Pipeline controls
10
Barrage d.o.o. | Dedication - Technology - Progression - Productivity - Flexibility | Pipeline configuration
Run the job if there are
changes in those files
Include files from
elsewhere in the project -
must reference a YAML file
`strategy: depend`
Means to hold this pipeline
until the other pipeline
finishes
Pipeline configuration - Multi-Project pipelines
Intro | Pipeline configuration | Pipeline reuse | Pipeline controls
11
Barrage d.o.o. | Dedication - Technology - Progression - Productivity - Flexibility | Pipeline configuration
The job with trigger is
referred to as the “bridge”
job
Specify project and branch
Pipeline reuse - “before” and “after” scripts
Intro | Pipeline configuration | Pipeline reuse | Pipeline controls
12
Barrage d.o.o. | Dedication - Technology - Progression - Productivity - Flexibility | Pipeline reuse
The “Before” script is
concatenated to the main
script and runs in the same
shell
The “After” script is run in a
separate shell and does not
not impact the success exit
code
Both works well with a
“default” block
Pipeline reuse - Local include
Intro | Pipeline configuration | Pipeline reuse | Pipeline controls
13
Barrage d.o.o. | Dedication - Technology - Progression - Productivity - Flexibility | Pipeline reuse
Includes are processed
when the CI is parsed (on
Gitlab itself, not on a
Runner)
`local` is the default.
It includes CI configuration
from elsewhere in this
project.
Pipeline reuse - Project and Remote include
Intro | Pipeline configuration | Pipeline reuse | Pipeline controls
14
Barrage d.o.o. | Dedication - Technology - Progression - Productivity - Flexibility | Pipeline reuse
Include CI configuration
from another project on the
Gitlab instance
Or from a raw URL
anywhere in the network
Pipeline reuse - Extending templates of Gitlab
Intro | Pipeline configuration | Pipeline reuse | Pipeline controls
15
Barrage d.o.o. | Dedication - Technology - Progression - Productivity - Flexibility | Pipeline reuse
Templates are developed
by Gitlab and come with
Gitlab instance
Different types of “templates” in Gitlab
- CI configuration templates
- Project templates
- Issue and Merge request description
templates
Pipeline reuse - Project and Remote include
Intro | Pipeline configuration | Pipeline reuse | Pipeline controls
16
Barrage d.o.o. | Dedication - Technology - Progression - Productivity - Flexibility | Pipeline reuse
Jobs starting with a dot (“.”)
are “hidden” - they are only
used for inheritance and
don’t run on their own.
The `extends` block means
to inherit the references
block, and override any
hashes that are listed here.
Pipeline controls - Variables in the UI at the Project Level
Intro | Pipeline configuration | Pipeline reuse | Pipeline controls
17
Barrage d.o.o. | Dedication - Technology - Progression - Productivity - Flexibility | Pipeline controls
Variables can also be set at
the Group and Instance
level
Pipeline controls - Variables for a Pipeline run
Intro | Pipeline configuration | Pipeline reuse | Pipeline controls
18
Barrage d.o.o. | Dedication - Technology - Progression - Productivity - Flexibility | Pipeline controls
Prepopulate the keys and values using
URL parameters
.../pipelines/new?ref=<branch>&var=[<v
ariable_key>]=<value>
Pipeline controls - Variables in the CI Configuration
Intro | Pipeline configuration | Pipeline reuse | Pipeline controls
19
Barrage d.o.o. | Dedication - Technology - Progression - Productivity - Flexibility | Pipeline controls
Pipeline controls - Predefined Variables
Intro | Pipeline configuration | Pipeline reuse | Pipeline controls
20
Barrage d.o.o. | Dedication - Technology - Progression - Productivity - Flexibility | Pipeline controls
Pipeline controls - How variables are processed
- Values for this run
- Manually (UI) or in API request
- Values configured
- For Project, Group or Instance
- Values inherited
- From Jobs in previous Stages
- Values in YAML
- Using the `variables:` block
- Values from Gitlab
- “Predefined Variables”
Intro | Pipeline configuration | Pipeline reuse | Pipeline controls
21
Barrage d.o.o. | Dedication - Technology - Progression - Productivity - Flexibility | Pipeline controls
CI Engine
Main Gitlab
server
CI Jobs
Gitlab Runner
Pipeline controls - rules: The Basics
-
Intro | Pipeline configuration | Pipeline reuse | Pipeline controls
22
Barrage d.o.o. | Dedication - Technology - Progression - Productivity - Flexibility | Pipeline controls
“If” statements can
reference Variables -
including the predefined
ones, as in this case
Pipeline controls - rules Quick Reference
-
Intro | Pipeline configuration | Pipeline reuse | Pipeline controls
23
Barrage d.o.o. | Dedication - Technology - Progression - Productivity - Flexibility | Pipeline controls
Clauses
if
changes
exists
(... or none)
Operators
(just the variable)
==
!=
=~
!~
&&
||
Results
when
allow_failure
start_in
“when” options
always
never
on_success
on_failure
manual
delayed
(... or none)
Pipeline controls - rules examples
-
Intro | Pipeline configuration | Pipeline reuse | Pipeline controls
24
Barrage d.o.o. | Dedication - Technology - Progression - Productivity - Flexibility | Pipeline controls
If $CI_PIPELINE_SOURCE is set to
merge_request_event
or schedule, the job is executed
Any other value for $CI_PIPELINE_SOURCE
does not execute the job because there is no
standalone `when:` clause
If $CI_PIPELINE_SOURCE is set to any valid
value other than
merge_request_event or schedule, the job is
executed
Pipeline controls - when do pipelines run?
-
Intro | Pipeline configuration | Pipeline reuse | Pipeline controls
25
Barrage d.o.o. | Dedication - Technology - Progression - Productivity - Flexibility | Pipeline control
New commit
New branch
New tag
Manual
API call
Scheduled
The variable
ci_pipeline_source
...can help us with this. Values include:
- push
- web
- schedule
- api
- chat
- webide
- trigger
- pipeline
- external
- external_pull_request_event
- parent_pipeline
- merge_request_event
Extra information
- Gitlab API
- Gitlab CLI CLI https://python-gitlab.readthedocs.io/
- Leveraging and extending Auto Devops feature
- Job artifacts
- Container and language-specific registries
- Parallel and Matrix Testing
- ………..
26
Barrage d.o.o. | Dedication - Technology - Progression - Productivity - Flexibility
Thank you!
Q&A
Feel free to reach out if you have any questions!
hello@barrage.net || www.barrage.net
27
Barrage d.o.o. | Dedication - Technology - Progression - Productivity - Flexibility

More Related Content

DOC
cv_eugene_engels 2015 attachment
PPTX
Baijan Savalan _ Avans High School lecture 27.10.16
PDF
Kamaelia - Networking Using Generators
PPTX
XP Days Ukraine 2016 Building CD Pipeline in Azure
PPTX
Introducing Performance Awareness in an Integrated Specification Environment
PDF
Accordion Pipelines - A Cloud-native declarative Pipelines and Dynamic workfl...
PDF
Delivery Pipelines as a First Class Citizen @deliverAgile2019
PDF
Nextflow on Velsera: a data-driven journey from failure to cutting-edge
cv_eugene_engels 2015 attachment
Baijan Savalan _ Avans High School lecture 27.10.16
Kamaelia - Networking Using Generators
XP Days Ukraine 2016 Building CD Pipeline in Azure
Introducing Performance Awareness in an Integrated Specification Environment
Accordion Pipelines - A Cloud-native declarative Pipelines and Dynamic workfl...
Delivery Pipelines as a First Class Citizen @deliverAgile2019
Nextflow on Velsera: a data-driven journey from failure to cutting-edge

Similar to Shift Remote: DevOps: Gitlab ci hands-on experience - Ivan Rimac (Barrage) (20)

PDF
Quality in a Square. K8s-native Quality Assurance of Microservices with Testkube
PPTX
Quadratisch. Praktisch. Gut. K8s-native Quality Assurance mit Testkube @ Java...
PPT
Conway Case Study - Optimizing Application Integration SDLC
PDF
Containerising bootiful microservices javaeeconf
PPTX
20161124 - Final Presentation - Luuk Moonen - brede versie
PDF
Components of CI/CD in DevOps
PPTX
CI CD OPS WHATHAVEYOU
PDF
OSMC 2010 | Monitoring mit Icinga by Icinga Team
PDF
Mastering FPGA Design through Debug, Adrian Hernandez, Xilinx
PPTX
Advances in Verification - Workshop at BMS College of Engineering
PDF
Pipeline_Patterns_R7.pdf
PDF
Why Kubernetes? Cloud Native and Developer Experience at Zalando - Enterprise...
PDF
Abhay-Resume
PPTX
TEC118 – How Do You Manage the Configuration of Your Environments from Metal ...
PDF
Automated Virtualized Testing (AVT) with Docker, Kubernetes, WireMock and Gat...
PPTX
XP Days Ukraine 2019
PPTX
Continuous Integration and Delivery using TeamCity and Jenkins
PDF
Extend Agile and DevOps Practices Across Hybrid IT
PPSX
Process selection for manufacturing fms
PDF
Template Design for SAGD
Quality in a Square. K8s-native Quality Assurance of Microservices with Testkube
Quadratisch. Praktisch. Gut. K8s-native Quality Assurance mit Testkube @ Java...
Conway Case Study - Optimizing Application Integration SDLC
Containerising bootiful microservices javaeeconf
20161124 - Final Presentation - Luuk Moonen - brede versie
Components of CI/CD in DevOps
CI CD OPS WHATHAVEYOU
OSMC 2010 | Monitoring mit Icinga by Icinga Team
Mastering FPGA Design through Debug, Adrian Hernandez, Xilinx
Advances in Verification - Workshop at BMS College of Engineering
Pipeline_Patterns_R7.pdf
Why Kubernetes? Cloud Native and Developer Experience at Zalando - Enterprise...
Abhay-Resume
TEC118 – How Do You Manage the Configuration of Your Environments from Metal ...
Automated Virtualized Testing (AVT) with Docker, Kubernetes, WireMock and Gat...
XP Days Ukraine 2019
Continuous Integration and Delivery using TeamCity and Jenkins
Extend Agile and DevOps Practices Across Hybrid IT
Process selection for manufacturing fms
Template Design for SAGD
Ad

More from Shift Conference (20)

PDF
Shift Remote: AI: How Does Face Recognition Work (ars futura)
PDF
Shift Remote: AI: Behind the scenes development in an AI company - Matija Ili...
PDF
Shift Remote: AI: Smarter AI with analytical graph databases - Victor Lee (Ti...
PDF
Shift Remote: DevOps: Devops with Azure Devops and Github - Juarez Junior (Mi...
PDF
Shift Remote: DevOps: Autodesks research into digital twins for AEC - Kean W...
PPTX
Shift Remote: DevOps: When metrics are not enough, and everyone is on-call - ...
PDF
Shift Remote: DevOps: Modern incident management with opsgenie - Kristijan L...
PDF
Shift Remote: DevOps: DevOps Heroes - Adding Advanced Automation to your Tool...
PDF
Shift Remote: DevOps: An (Un)expected Journey - Zeljko Margeta (RBA)
PDF
Shift Remote: Game Dev - Localising Mobile Games - Marta Kunic (Nanobit)
PDF
Shift Remote: Game Dev - Challenges Introducing Open Source to the Games Indu...
PDF
Shift Remote: Game Dev - Ghost in the Machine: Authorial Voice in System Desi...
PDF
Shift Remote: Game Dev - Building Better Worlds with Game Culturalization - K...
PPTX
Shift Remote: Game Dev - Open Match: An Open Source Matchmaking Framework - J...
PDF
Shift Remote: Game Dev - Designing Inside the Box - Fernando Reyes Medina (34...
PDF
Shift Remote: Mobile - Efficiently Building Native Frameworks for Multiple Pl...
PDF
Shift Remote: Mobile - Introduction to MotionLayout on Android - Denis Fodor ...
PDF
Shift Remote: Mobile - Devops-ify your life with Github Actions - Nicola Cort...
PPTX
Shift Remote: WEB - GraphQL and React – Quick Start - Dubravko Bogovic (Infobip)
PDF
Shift Remote: WEB - The Features of WebXR Beyond Virtual Reality - Ada Rose C...
Shift Remote: AI: How Does Face Recognition Work (ars futura)
Shift Remote: AI: Behind the scenes development in an AI company - Matija Ili...
Shift Remote: AI: Smarter AI with analytical graph databases - Victor Lee (Ti...
Shift Remote: DevOps: Devops with Azure Devops and Github - Juarez Junior (Mi...
Shift Remote: DevOps: Autodesks research into digital twins for AEC - Kean W...
Shift Remote: DevOps: When metrics are not enough, and everyone is on-call - ...
Shift Remote: DevOps: Modern incident management with opsgenie - Kristijan L...
Shift Remote: DevOps: DevOps Heroes - Adding Advanced Automation to your Tool...
Shift Remote: DevOps: An (Un)expected Journey - Zeljko Margeta (RBA)
Shift Remote: Game Dev - Localising Mobile Games - Marta Kunic (Nanobit)
Shift Remote: Game Dev - Challenges Introducing Open Source to the Games Indu...
Shift Remote: Game Dev - Ghost in the Machine: Authorial Voice in System Desi...
Shift Remote: Game Dev - Building Better Worlds with Game Culturalization - K...
Shift Remote: Game Dev - Open Match: An Open Source Matchmaking Framework - J...
Shift Remote: Game Dev - Designing Inside the Box - Fernando Reyes Medina (34...
Shift Remote: Mobile - Efficiently Building Native Frameworks for Multiple Pl...
Shift Remote: Mobile - Introduction to MotionLayout on Android - Denis Fodor ...
Shift Remote: Mobile - Devops-ify your life with Github Actions - Nicola Cort...
Shift Remote: WEB - GraphQL and React – Quick Start - Dubravko Bogovic (Infobip)
Shift Remote: WEB - The Features of WebXR Beyond Virtual Reality - Ada Rose C...
Ad

Recently uploaded (20)

PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Machine learning based COVID-19 study performance prediction
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
cuic standard and advanced reporting.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
Spectroscopy.pptx food analysis technology
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPT
Teaching material agriculture food technology
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Spectral efficient network and resource selection model in 5G networks
Review of recent advances in non-invasive hemoglobin estimation
Dropbox Q2 2025 Financial Results & Investor Presentation
Machine learning based COVID-19 study performance prediction
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Programs and apps: productivity, graphics, security and other tools
cuic standard and advanced reporting.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Spectroscopy.pptx food analysis technology
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Teaching material agriculture food technology
Understanding_Digital_Forensics_Presentation.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
Spectral efficient network and resource selection model in 5G networks

Shift Remote: DevOps: Gitlab ci hands-on experience - Ivan Rimac (Barrage)

  • 1. Gitlab CI Hands-on experience Ivan Rimac COPYRIGHT Barrage — Visual identity © Barrage d.o.o. 2020. All Rights Reserved.
  • 2. About the speaker - Background in programming - 8 years of experience - Currently @ barrage.net - Osijek - Croatia - Specialized in devops practices and security - Successfully using Gitlab CI in production over 6 years 2 Barrage d.o.o. | Dedication - Technology - Progression - Productivity - Flexibility | Intro
  • 3. Why did we started practicing DevOps - Shift from occasionally performed, to routinely performed - Enabled via automation - automation isn't the goal it’s the technique to achieve the goal - Drive consistency - Detect problems early - Remove friction - Increase your bus factor! Intro | Pipeline configuration | Pipeline reuse | Pipeline controls 3 Barrage d.o.o. | Dedication - Technology - Progression - Productivity - Flexibility | Intro
  • 4. Gitlab CI configuration management - Pipeline configuration - DAG - Parent/Child - Multi-project - Pipeline component reuse - Before and after scripts - Includes, templates and extends - Pipeline controls - Variables - Rules Intro | Pipeline configuration | Pipeline reuse | Pipeline controls 4 Barrage d.o.o. | Dedication - Technology - Progression - Productivity - Flexibility | Intro
  • 5. Pipeline configuration - basic Intro | Pipeline configuration | Pipeline reuse | Pipeline controls 5 Barrage d.o.o. | Dedication - Technology - Progression - Productivity - Flexibility | Pipeline configuration All jobs in a Stage must complete successfully before proceeding to the next stage
  • 6. Pipeline configuration - with options Intro | Pipeline configuration | Pipeline reuse | Pipeline controls 6 Barrage d.o.o. | Dedication - Technology - Progression - Productivity - Flexibility | Pipeline configuration This job has `allow_failure: true` …so the pipeline proceeds even though job failed This job has `when: manual` ...so it waits for someone with the permission to click a “Play” button”
  • 7. Pipeline configuration - Directed Acyclic Graph (DAG) Intro | Pipeline configuration | Pipeline reuse | Pipeline controls 7 Barrage d.o.o. | Dedication - Technology - Progression - Productivity - Flexibility | Pipeline configuration
  • 8. Pipeline configuration - DAG visualization Intro | Pipeline configuration | Pipeline reuse | Pipeline controls 8 Barrage d.o.o. | Dedication - Technology - Progression - Productivity - Flexibility | Pipeline configuration
  • 9. Pipeline configuration - DAG visualization Intro | Pipeline configuration | Pipeline reuse | Pipeline controls 9 Barrage d.o.o. | Dedication - Technology - Progression - Productivity - Flexibility | Pipeline configuration
  • 10. Pipeline configuration - Parent/Child pipelines for Monorepos Intro | Pipeline configuration | Pipeline reuse | Pipeline controls 10 Barrage d.o.o. | Dedication - Technology - Progression - Productivity - Flexibility | Pipeline configuration Run the job if there are changes in those files Include files from elsewhere in the project - must reference a YAML file `strategy: depend` Means to hold this pipeline until the other pipeline finishes
  • 11. Pipeline configuration - Multi-Project pipelines Intro | Pipeline configuration | Pipeline reuse | Pipeline controls 11 Barrage d.o.o. | Dedication - Technology - Progression - Productivity - Flexibility | Pipeline configuration The job with trigger is referred to as the “bridge” job Specify project and branch
  • 12. Pipeline reuse - “before” and “after” scripts Intro | Pipeline configuration | Pipeline reuse | Pipeline controls 12 Barrage d.o.o. | Dedication - Technology - Progression - Productivity - Flexibility | Pipeline reuse The “Before” script is concatenated to the main script and runs in the same shell The “After” script is run in a separate shell and does not not impact the success exit code Both works well with a “default” block
  • 13. Pipeline reuse - Local include Intro | Pipeline configuration | Pipeline reuse | Pipeline controls 13 Barrage d.o.o. | Dedication - Technology - Progression - Productivity - Flexibility | Pipeline reuse Includes are processed when the CI is parsed (on Gitlab itself, not on a Runner) `local` is the default. It includes CI configuration from elsewhere in this project.
  • 14. Pipeline reuse - Project and Remote include Intro | Pipeline configuration | Pipeline reuse | Pipeline controls 14 Barrage d.o.o. | Dedication - Technology - Progression - Productivity - Flexibility | Pipeline reuse Include CI configuration from another project on the Gitlab instance Or from a raw URL anywhere in the network
  • 15. Pipeline reuse - Extending templates of Gitlab Intro | Pipeline configuration | Pipeline reuse | Pipeline controls 15 Barrage d.o.o. | Dedication - Technology - Progression - Productivity - Flexibility | Pipeline reuse Templates are developed by Gitlab and come with Gitlab instance Different types of “templates” in Gitlab - CI configuration templates - Project templates - Issue and Merge request description templates
  • 16. Pipeline reuse - Project and Remote include Intro | Pipeline configuration | Pipeline reuse | Pipeline controls 16 Barrage d.o.o. | Dedication - Technology - Progression - Productivity - Flexibility | Pipeline reuse Jobs starting with a dot (“.”) are “hidden” - they are only used for inheritance and don’t run on their own. The `extends` block means to inherit the references block, and override any hashes that are listed here.
  • 17. Pipeline controls - Variables in the UI at the Project Level Intro | Pipeline configuration | Pipeline reuse | Pipeline controls 17 Barrage d.o.o. | Dedication - Technology - Progression - Productivity - Flexibility | Pipeline controls Variables can also be set at the Group and Instance level
  • 18. Pipeline controls - Variables for a Pipeline run Intro | Pipeline configuration | Pipeline reuse | Pipeline controls 18 Barrage d.o.o. | Dedication - Technology - Progression - Productivity - Flexibility | Pipeline controls Prepopulate the keys and values using URL parameters .../pipelines/new?ref=<branch>&var=[<v ariable_key>]=<value>
  • 19. Pipeline controls - Variables in the CI Configuration Intro | Pipeline configuration | Pipeline reuse | Pipeline controls 19 Barrage d.o.o. | Dedication - Technology - Progression - Productivity - Flexibility | Pipeline controls
  • 20. Pipeline controls - Predefined Variables Intro | Pipeline configuration | Pipeline reuse | Pipeline controls 20 Barrage d.o.o. | Dedication - Technology - Progression - Productivity - Flexibility | Pipeline controls
  • 21. Pipeline controls - How variables are processed - Values for this run - Manually (UI) or in API request - Values configured - For Project, Group or Instance - Values inherited - From Jobs in previous Stages - Values in YAML - Using the `variables:` block - Values from Gitlab - “Predefined Variables” Intro | Pipeline configuration | Pipeline reuse | Pipeline controls 21 Barrage d.o.o. | Dedication - Technology - Progression - Productivity - Flexibility | Pipeline controls CI Engine Main Gitlab server CI Jobs Gitlab Runner
  • 22. Pipeline controls - rules: The Basics - Intro | Pipeline configuration | Pipeline reuse | Pipeline controls 22 Barrage d.o.o. | Dedication - Technology - Progression - Productivity - Flexibility | Pipeline controls “If” statements can reference Variables - including the predefined ones, as in this case
  • 23. Pipeline controls - rules Quick Reference - Intro | Pipeline configuration | Pipeline reuse | Pipeline controls 23 Barrage d.o.o. | Dedication - Technology - Progression - Productivity - Flexibility | Pipeline controls Clauses if changes exists (... or none) Operators (just the variable) == != =~ !~ && || Results when allow_failure start_in “when” options always never on_success on_failure manual delayed (... or none)
  • 24. Pipeline controls - rules examples - Intro | Pipeline configuration | Pipeline reuse | Pipeline controls 24 Barrage d.o.o. | Dedication - Technology - Progression - Productivity - Flexibility | Pipeline controls If $CI_PIPELINE_SOURCE is set to merge_request_event or schedule, the job is executed Any other value for $CI_PIPELINE_SOURCE does not execute the job because there is no standalone `when:` clause If $CI_PIPELINE_SOURCE is set to any valid value other than merge_request_event or schedule, the job is executed
  • 25. Pipeline controls - when do pipelines run? - Intro | Pipeline configuration | Pipeline reuse | Pipeline controls 25 Barrage d.o.o. | Dedication - Technology - Progression - Productivity - Flexibility | Pipeline control New commit New branch New tag Manual API call Scheduled The variable ci_pipeline_source ...can help us with this. Values include: - push - web - schedule - api - chat - webide - trigger - pipeline - external - external_pull_request_event - parent_pipeline - merge_request_event
  • 26. Extra information - Gitlab API - Gitlab CLI CLI https://python-gitlab.readthedocs.io/ - Leveraging and extending Auto Devops feature - Job artifacts - Container and language-specific registries - Parallel and Matrix Testing - ……….. 26 Barrage d.o.o. | Dedication - Technology - Progression - Productivity - Flexibility
  • 27. Thank you! Q&A Feel free to reach out if you have any questions! hello@barrage.net || www.barrage.net 27 Barrage d.o.o. | Dedication - Technology - Progression - Productivity - Flexibility