Build application

  • POST
  • /workspaces
  • /:domain
  • /projects
  • /:project_name
  • /pipelines
  • /:pipeline_id
  • /actions

Request

url PARAMETERS
domainrequired string
The workspace domain.
pipeline_idrequired integer
The numerical ID of the desired pipeline.
project_namerequired string
The name ID of the project.
POST PARAMETERS
servicesrequired Service
typerequired string
The type of the attached service. Can be one of MYSQL, MARIADB, REDIS, MONGO_DB, POSTGRE_SQL, CASSANDRA, MEMCACHED, ELASTICSEARCH, SELENIUM_CHROME, SELENIUM_FIREFOX, GANACHE, RABBITMQ, CUSTOM.
run_as_useroptional string
All build commands are run as the default user defined in the selected Docker image. Can be set to another username (on the condition that this user exists in the selected image). Available when type is set to CUSTOM.
volume_mappingsoptional string[]
The path preceding the colon is the filesystem path (the folder from the filesystem to be mounted in the container). The path after the colon is the container path (the path in the container, where this filesystem will be located).
connectionrequired Connection
The service’s connection details.
hostrequired string
The hostname that will be available within the docker network upon the execution.
dboptional string
The initial database name. Available when type is set to MARIADB, POSTGRE_SQL or MYSQL.
portoptional integer
The service’s connection port.
useroptional string
Defines the username used in the desired service. Available and required when type is set to MYSQL, MARIADB, POSTGRE_SQL or RABBITMQ.
passwordoptional string
Defines the password used in the desired service. Available and required when type is set to MYSQL, MARIADB, POSTGRE_SQL or RABBITMQ.
run_as_useroptional string
All build commands are run as the default user defined in the selected Docker image. Can be set to another username (on the condition that this user exists in the selected image).
persistentoptional boolean
If set to true, the database content will be cached between executions. Available when type is set to MYSQL, MARIADB, REDIS, MONGO_DB, POSTGRE_SQL, CASSANDRA or GANACHE.
versionoptional string
The version of the predefined service’s base image. Required for every type except for CUSTOM.
dump_pathoptional string
The path to the SQL dump file that will be used to populate service’s database. Available when type is set to MARIADB, POSTGRE_SQL or MYSQL.
docker_image_nameoptional string
The name of the Docker image. Available when type is set to CUSTOM.
docker_image_tagoptional string
The tag of the Docker image. Available when type is set to CUSTOM.
registryoptional string
The url to the Docker registry or GCR. Available when type is set to CUSTOM.
loginoptional string
When type is set to custom, this is the username required to connect to private registry or GCR.
passwordoptional string
When type is set to custom, this is the password required to connect to private registry or GCR.
working_directoryoptional string
The directory in which the commands are executed. Available when type is set to CUSTOM.
inline_commandsoptional string
The command that will be executed upon running the container with the service. Available when type is set to CUSTOM.
cached_dirsoptional string[]
The additional container’s directories that will be cached between executions. Available when type is set to CUSTOM.
use_image_from_actionoptional boolean
If set to true the Docker image will be taken from action defined by docker_build_action_id. Available when type is set to CUSTOM.
docker_build_action_idoptional integer
The ID of the action which built the desired Docker image. If set to 0, the image will be taken from previous pipeline action. Available when type is set to CUSTOM.
integrationoptional Integration
The integration. Required for using the image from the Amazon ECR and Dockerhub. Available when type is set to CUSTOM.
regionoptional string
The name of the Amazon S3 region. Available when type is set to CUSTOM. Required for using the image from the Amazon ECR. The full list of regions is available here.
wait_for_portoptional integer
Build commands in the main container will be executed only if the entered service port is responding. Available when type is set to CUSTOM.
execute_every_commandoptional boolean
If set to true all commands will be executed regardless of the result of the previous command.
pass_variablesoptional boolean
Allow passing variables to this service.
entrypointoptional string
Default command to execute at runtime. Overwrites the default entrypoint set by the image.
ignore_image_pull_failuresoptional boolean
if set to true, use cached image on timeouts (only for official images) Available when type is set to CUSTOM
cache_base_imageoptional boolean
If set to true the cached version of the image is used, instead of being pulled each time. Available when type is set to CUSTOM .
run_as_useroptional string
All build commands are run as the default user defined in the selected Docker image. Can be set to another username (on the condition that this user exists in the selected image). Available when type is set to CUSTOM .

Last modified on Sep 23, 2024

{
  "name": "Build application",
  "type": "BUILD",
  "trigger_time": "ON_EVERY_EXECUTION",
  "docker_image_name": "library/ubuntu",
  "docker_image_tag": "latest",
  "volume_mappings": [
    "/:/buddy/mount/directory"
  ],
  "execute_commands": [
    "ls -al > $fileName"
  ],
  "setup_commands": [
    "apt-get update -y",
    "apt-get install -y wget"
  ],
  "cached_dirs": [
    "/build/test",
    "/bin/Debug"
  ],
  "variables": [
    {
      "key": "fileName",
      "value": "ls.log"
    }
  ],
  "working_directory": "/buddy/my-repo-dir",
  "shell": "SH",
  "main_service_name": "my-app.svc",
  "cacheBaseImage": true,
  "services": [
    {
      "type": "MYSQL",
      "version": "5.7"
    },
    {
      "type": "MONGO_DB",
      "version": "3.2.4"
    }
  ]
}
{
  "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/2/actions/2",
  "html_url": "https://app.buddy.works/buddy/company-website/pipelines/action/2/edit",
  "id": 2,
  "name": "Build application",
  "type": "BUILD",
  "trigger_time": "ON_EVERY_EXECUTION",
  "last_execution_status": "INITIAL",
  "docker_image_name": "library/ubuntu",
  "docker_image_tag": "latest",
  "volume_mappings": [
    "/:/buddy/mount/directory"
  ],
  "execute_commands": [
    "ls -al > $fileName"
  ],
  "setup_commands": [
    "apt-get update -y",
    "apt-get install -y wget"
  ],
  "cached_dirs": [
    "/build/test",
    "/bin/Debug"
  ],
  "variables": [
    {
      "key": "fileName",
      "value": "ls.log"
    }
  ],
  "working_directory": "/buddy/my-repo-dir",
  "shell": "SH",
  "main_service_name": "my-app.svc",
  "cacheBaseImage": true,
  "services": [
    {
      "type": "MYSQL",
      "version": "5.7",
      "connection": {
        "address": "mysql:3306",
        "user": "root",
        "password": "qwerty"
      }
    },
    {
      "type": "MONGO_DB",
      "version": "3.2.4",
      "connection": {
        "address": "mongo:27017"
      }
    }
  ],
  "pipeline": {
    "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/2",
    "html_url": "https://app.buddy.works/buddy/company-website/pipelines/pipeline/2",
    "id": 2,
    "name": "Live mirror",
    "refs": [
      "refs/heads/master"
    ],
    "last_execution_status": "SUCCESSFUL",
    "last_execution_revision": "506a3963507943d6908154f4bc9646e829128a08"
  }
}