Sign inSign up

mablhq/bitbucket-deployment

By mablhq

•Updated about 5 years ago

Bitbucket pipe to create a mabl deployment event.

Image
0

7.6K

mablhq/bitbucket-deployment repository overview

⁠Bitbucket Pipelines Pipe: mabl deployment

Creates a mabl⁠ deployment event, triggering any functional tests associated with that deployment and waiting for their results.

⁠YAML Definition

Add the following snippet to the script section of your bitbucket-pipelines.yml file:

- pipe: mablhq/bitbucket-deployment:0.2.0
  variables:
    MABL_API_KEY: "<string>"
    # At least one of MABL_APPLICATION_ID or MABL_ENVIRONMENT_ID id must be specified.
    # MABL_APPLICATION_ID: "<string>" 
    # MABL_ENVIRONMENT_ID: "<string>"
    # MABL_AWAIT_COMPLETION: "<boolean>" # Optional.
    # MABL_FAST_FAILURE: "<boolean>" # Optional.
    # MABL_BROWSERS: "<string>" # Optional.
    # MABL_LABELS: "<string>" # Optional.
    # MABL_URL: "<string>" # Optional.
    # MABL_REBASELINE_IMAGES: "<boolean>" # Optional.
    # MABL_SET_STATIC_BASELINE: "<boolean>" # Optional.
    # MABL_REVISION: "<string>" # Optional.
    # DEBUG: "<boolean>" # Optional

⁠Variables

VariableUsage
MABL_API_KEY (*)Your mabl api key available here⁠. Should be stored as a secured variable.
MABL_APPLICATION_ID (**)mabl id for the deployed application. Use the curl builder⁠ to find the id.
MABL_ENVIRONMENT_ID (**)mabl id for the deployed environment. Use the curl builder⁠ to find the id.
MABL_AWAIT_COMPLETIONWait for the deployment tests to finish before proceeding. Default: true
MABL_FAST_FAILUREStop waiting if one test fails. This allows you to fail your build as soon as possible. Default: true
MABL_BROWSERSSpace separated list of browsers to test against (internet_explorer safari chrome firefox). If not provided, mabl will test the browsers configured on the triggered test.
MABL_LABELSSpace separated list of test labels to test against.
MABL_URLThe base uri to test against. If provided, this will override the default uri associated with the environment in mabl.
MABL_REBASELINE_IMAGESSet true to reset the visual baseline to the current deployment. Default: false
MABL_SET_STATIC_BASELINESet true to use current deployment as an exact static baseline. If set, mabl will not model dynamic areas and will use the current deployment as the pixel-exact visual baseline. Default: false
MABL_REVISIONThe code revision hash for the application under test. Defaults to the current commit hash.
DEBUGEnable debug logging. By default debug logging is disabled.

(*) = required variable.

(**) = MABL_APPLICATION_ID or MABL_ENVIRONMENT_ID must be specified, or both.

⁠Details

This Bitbucket Pipe⁠ allows you to easily integrate your Bitbucket pipeline with mabl⁠. When the pipe is triggered, it will create a deployment event in mabl. mabl then executes the tests associated with this deployment. The pipe will wait for completion of the tests and will return success if all tests have passed or fail if any tests fail.

⁠Prerequisites

We recommend storing your mabl API key as a secured variable in your Bitbucket repository. See the example below.

⁠Examples

Basic examples:

- pipe: mablhq/bitbucket-deployment
  variables:
    MABL_API_KEY: $MABL_API_KEY
    MABL_APPLICATION_ID: "application123-a"
- pipe: mablhq/bitbucket-deployment
  variables:
    MABL_API_KEY: $MABL_API_KEY
    MABL_ENVIRONMENT_ID: "environment123-e"

Advanced example:

- pipe: mablhq/bitbucket-deployment
  variables:
    MABL_API_KEY: $MABL_API_KEY
    MABL_APPLICATION_ID: "application123-a"
    MABL_ENVIRONMENT_ID: "environment-e"
    MABL_AWAIT_COMPLETION: true
    MABL_FAST_FAILURE: false
    MABL_BROWSERS: "internet_explorer chrome firefox safari"
    MABL_LABELS: "smoketest"
    MABL_URL: "https://staging.mycompany/"
    MABL_REBASELINE_IMAGES: true
    MABL_SET_STATIC_BASELINE: true
    MABL_REVISION: '600d8eb'

⁠Support

If you would like help with this pipe, or would like to report an issue, please contact mabl support⁠.

Tag summary

Content type

Image

Digest

Size

58 MB

Last updated

about 6 years ago

docker pull mablhq/bitbucket-deployment