Bitbucket pipe for HubSpot project deployments. This is NOT an official pipe maintained by HubSpot.
1.2K
Automatic deployment for HubSpot projects.
Note: This is not an official pipe maintained by HubSpot. However, we aim to keep it up to date with new features from the official HubSpot GitHub Action.
Add the following snippet to the script section of your bitbucket-pipelines.yml file:
script:
- pipe: docker://hunxoft/hubspot-bitbucket-pipe:latest
variables:
COMMAND: "upload" # upload|deploy|validate
PROJECT_DIR: "./" # directory containing hsproject.json
HUBSPOT_ACCOUNT_ID: "<string>"
HUBSPOT_PERSONAL_ACCESS_KEY: "<string>"
# CLI_VERSION: "8.0.0" # Optional
# DEBUG: "false" # Optional
# PROFILE: "<string>" # Optional
| Variable | Usage |
|---|---|
| COMMAND | Which action to run: upload, deploy, validate. Default: upload. |
| PROJECT_DIR | Path to a single HubSpot project directory (must contain hsproject.json). Default: ./. Ignored when PROJECT_DIRS is set. The existance of the PROJECT_DIRS will overwrite this. |
| PROJECT_DIRS | Comma-separated list of HubSpot project directories to process. Each must contain an hsproject.json. |
| HUBSPOT_ACCOUNT_ID (*) | HubSpot account ID (portal ID). |
| HUBSPOT_PERSONAL_ACCESS_KEY (*) | HubSpot personal access key. Use a secured repository variable. |
| CLI_VERSION | HubSpot CLI version to install. Default: 8.0.0. |
| DEBUG | Enables verbose logs and passes --debug to hs. Default: false. |
| FORCE_CREATE | For COMMAND=upload, passes --force-create. Default: true. |
| MESSAGE | For COMMAND=upload, sets the build message. Default: Uploaded via Bitbucket Pipe (<sha>). |
| BUILD_ID | For COMMAND=deploy, deploy a specific build ID (mutually exclusive with DEPLOY_LATEST_BUILD). |
| DEPLOY_LATEST_BUILD | For COMMAND=deploy, deploy the most recent build. Default: false. |
| DRY_RUN | If true, prints what would run and exits success (useful for testing). Default: false. |
| PROFILE | The HubSpot CLI profile to use. Ex. "dev" or "prod". Optional. |
(*) = required variable.
hsproject.json in PROJECT_DIR.HUBSPOT_ACCOUNT_IDHUBSPOT_PERSONAL_ACCESS_KEYThis pipe writes the following variables to the BITBUCKET_PIPE_SHARED_STORAGE for use in subsequent pipes:
| Variable | Description |
|---|---|
build_id | The ID of the build created during upload. |
deploy_id | The ID of the deployment created during upload or deploy. |
script:
- pipe: docker://hunxoft/hubspot-bitbucket-pipe:latest
variables:
COMMAND: "upload"
PROJECT_DIR: "./"
HUBSPOT_ACCOUNT_ID: $HUBSPOT_ACCOUNT_ID
HUBSPOT_PERSONAL_ACCESS_KEY: $HUBSPOT_PERSONAL_ACCESS_KEY
script:
- pipe: docker://hunxoft/hubspot-bitbucket-pipe:latest
variables:
COMMAND: "deploy"
PROJECT_DIR: "./"
HUBSPOT_ACCOUNT_ID: $HUBSPOT_ACCOUNT_ID
HUBSPOT_PERSONAL_ACCESS_KEY: $HUBSPOT_PERSONAL_ACCESS_KEY
DEPLOY_LATEST_BUILD: "true"
script:
- pipe: docker://hunxoft/hubspot-bitbucket-pipe:latest
variables:
COMMAND: "upload"
PROJECT_DIRS: "project1,project2"
HUBSPOT_ACCOUNT_ID: $HUBSPOT_ACCOUNT_ID
HUBSPOT_PERSONAL_ACCESS_KEY: $HUBSPOT_PERSONAL_ACCESS_KEY
If you’d like help with this pipe, or you have an issue or feature request, let us know. The pipe is maintained by HunXoft.
If you’re reporting an issue, please include:
https://bitbucket.org/hunxoft/hubspot-bitbucket-pipe/
Copyright (c) 2019 Atlassian and others. Apache 2.0 licensed, see LICENSE file.
Content type
Image
Digest
sha256:ef56b1f7e…
Size
295.4 MB
Last updated
7 months ago
docker pull hunxoft/hubspot-bitbucket-pipe