Skip to content

dmitryvinn/applitools-demo-mvn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Pipelines Java

Pipelines allows you to put your Bitbucket hosted code to work. It enables you to build, test, and deploy your code using the cloud and the principals of CI/CD. You might like to run tests triggered by any git push to Bitbucket, to confirm that your commit did not introduce any new problems. Or, you could deploy a new version of your code, automatically, whenever your tests complete successfully; turning on features at your leisure using feature flags. Let's get started!

This is an example repo showing Bitbucket Pipelines in a Java environment.

Pipeline example repos:

Pipelines's Java reference page

Setup

For this demo, all you need to do is import this repo and enable pipelines to get your first pipeline to run!

Note: Make sure you have Maven installed.

  1. Import this repository by:

    Import gif

  2. On the left navigation bar, click Pipelines and scroll down to view the bitbucket-pipelines.yml file. Click Enable

    Enable gif

  3. Watch your build run!

    Build gif

Note: Bitbucket Pipelines includes fifty free minutes per account, at the time of writing. You can check your team or account's minutes usage for the month by clicking your Avatar > Bitbucket settings > Plan details.

Basic Commands

File: bitbucket-pipelines.yml

image: maven:3.3.9

pipelines:
  default:
    - step:
        caches:
          - maven
        script: # Modify the commands below to build your repository.
          - mvn -B verify # -B batch mode makes Maven less verbose

For in-depth configuration information, visit the Bitbucket Pipelines YAML Configuration Page. A list of the more common keywords are listed below.

step: Each step loads a new Docker container that includes a clone of the current repository.

script: A list of commands that are run, in order.

caches: Store downloaded dependencies on our server, to avoid re-downloading for each step.

artifacts: Defines files that are produced by a step, such as reports and JAR files, that you want to share with a following step.

Advanced Commands

Connecting to a database can be as simple as adding a few lines to bitbucket-pipelines.yml to specify and define the database.

The resulting file may look something like this:

image: maven:3.3.9

pipelines:
  default:
    - step:
        caches:
          - maven
        script: # Modify the commands below to build your repository.
          - mvn -B verify # -B batch mode makes Maven less verbose
          
        services: 
          - mongo 

definitions: 
  services: 
    mongo: 
      image: mongo

Checking Your Database Works

For different database examples, visit the Bitbucket Pipelines Database Page.

About

Sample Applitools Test Automation run using Maven

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages