An introduction to Atlassian Bitbucket Pipelines
-
Upload
dave-clark -
Category
Software
-
view
259 -
download
2
Transcript of An introduction to Atlassian Bitbucket Pipelines
Reminder about this session The slides will be made available after the session and you are more than welcome to share them if you find them useful.
We have people attending from all manner of different backgrounds with different levels of experience and you’re welcome to ask questions and share knowledge after the session.
Let’s get started….
Build, test and deploy from Bitbucket
Bitbucket Pipelines uses Docker containers to run build plans
Benefits:- Potential for faster feedback- Sensible default containers- Can use your private containers- Easy to set environment vars
Enabling Pipelines for your repository
In the Settings area, you need to enable Pipelines…
Next, you need to configure your bitbucket-pipelines.yml
Building on a basic example Let’s build on that basic example by adding some tests to run using Pipelines
For an example I’ll reuse a simple API test collection which I previously created with Postman when experimenting with serverless-graphql
I’ll export from Postman and commit:
- the request collection file, including pre-request scripts and tests
- an environment file which “should” mean the tests pass when they are run
Building on that basic example Additionally I’ll need to do a few more things so the tests can run
I’ll create a package.json file defining newman (The CLI test runner for Postman) as a dependency so it will be installed during the build process
I’ll update:
- the package.json file so tests can be run using npm to call newman
- the bitbucket-pipelines.yml file to run the relevant commands
Need to create your own image? Check out this link:
https://answers.atlassian.com/questions/39140980/how-do-i-create-a-docker-image-for-bitbucket-pipelines?_ga=1.125432457.263526773.1473156356
Need to test with a database? Check out this link:
https://confluence.atlassian.com/bitbucket/test-with-databases-856697462.html
Need to use environment variables?
Check out this link:
https://confluence.atlassian.com/bitbucket/environment-variables-in-bitbucket-pipelines-794502608.html
All of those questions are in the docs! \o/
Check out this link:
https://confluence.atlassian.com/bitbucket/bitbucket-pipelines-792496469.html
Example: SugarCRM XHProf viewer
The project is very useful for SugarCRM developers however some setup is required to be able to make use of it.
Link: https://developer.sugarcrm.com/2016/09/05/sugar-xhprof-viewer-released-as-open-source-project/
Making it easy for a team to useThe project can be set up and “containerized” with a volume made available for the files to be analyzed.
Benefits:- Minimizes friction prior to using the tool- Allows a simplified workflow for sharing
What tools will your team containerize?What will the benefits be?
A useful YouTube channel! \o/ Check out this link:
https://www.youtube.com/channel/UCnxrdFPXJMeHru_b4Q_vTPQ
An awesome technology festival! \o/
Check out this link:
https://buzzconf.io/go/dkcwd