1. Who am I
Giuseppe Morelli -Freelance
Magento Backend Developer
(10+ years)
Laravel enthusiastic
DevOps when needed
extra info: giuseppemorelli.net
•
•
•
•
1
2. Pipeline with Gitlab / Bitbucket
Index
Rule of 5 W: Who, What, When, Where, Why
Difference between Gitlab and Bitbucket
Deploy with Deployer PHP
How to choose pipeline provider
Live demo
•
•
•
•
•
2
5. WHAT
What are pipelines? (extra)
A tool that you can configure via yaml file without install any additional
software.
5
6. WHAT
Main features 1/2
Run in a docker container any task you want with inside your repository as
main folder
Add extra docker service (ex. mysql server) linked to your task
Create a chain of tasks and choose the workflow in case of failure
•
•
•
6
8. WHEN
When I have to use pipelines?
Well, always!
Ex. check coding standard, tests, build artifact and many more
8
9. WHERE
Where you can find pipelines?
Gitlab
Bitbucket
Github (called Github Actions)
SaaS Circle CI
SaaS Travis CI
•
•
•
•
•
9
10. WHY
Why I have to use pipelines? 1/5
1) Integrated with your repository
Configuration and tasks are saved in your repository under git.
10
11. WHY
Why I have to use pipelines? 2/5
2) Simple to use
Use a pipeline is simple like running simple commands in docker container
(or in a shell).
11
12. WHY
Why I have to use pipelines? 3/5
3) No extra server needed to run your tasks
If you want to run some tasks for check/testing etc... you don't need to setup
a new server.
12
13. WHY
Why I have to use pipelines? 4/5
4) Jenkins? What?
If docker for you is the future, pipelines are too.
13
14. WHY
Why I have to use pipelines? 5/5
5) Isolated test
Fast way to create isolated test without delete cache or config files manually
on your computer
14
15. Main differences between Gitlab and Bitbucket 1/3
Gitlab
You can decide where pipeline has
to run (through gitlab runnes)
You can create a chain of tasks
sequentially or in parallel mode
(called jobs)
Bitbucket
Pipeline runs in bitbucket cloud
(you don't know where exactly)
Chain of tasks can be created with
yaml anchors (little tricky) and not
in parallel mode
•
•
•
•
15
16. Main differences between Gitlab and Bitbucket 2/3
Gitlab
Possibility to create any stage in
your yaml file
Every job can use different docker
image
Bitbucket
List of stages are fixed
Every job can use different docker
image
Artifact can be used in different
jobs
•
•
•
•
•
16
17. Main differences between Gitlab and Bitbucket 3/3
Gitlab
ssh keys need to be stored in a
variable
possibility to run different step in
case of failure or success
Bitbucket
ssh keys are stored in docker
container via bitbucket config
steps are sequentially
•
•
•
•
17
18. What is Deployer PHP?
A deployment tool written in PHP with support for popular frameworks out of the
box.
deployer.org“
18
19. What is Deployer PHP? (extra)
A tool that execute your tasks remotely in your server. You can configure via
PHP file and save it in your repository.
It is based on release/folder structure.
19
20. What is Deployer PHP? (extra)
Example of deployer folder
Wait live demo to have a more
clear view :)
20