Skip to main content

Generic build tool.

Project description

Generic build tool for NeuronSphere compliant projects.

Declaring Build Steps

A NeuronSphere Project declares which HMD CLI commands are required to build it in the ./meta-data/manifest.json file. The package hmd-cli-build installs a general build command, hmd build that handles calling each required command in order. The hmd build command reads the ./meta-data/manifest.json, and attempts to run the HMD tools listed in the build.commands section. The tools listed must be installed separately (most are included in the neuronsphere package).

Example:

{
  "name": "example-project",
  "build": {
    "commands": [["mickey"], ["python"]]
  }
}

In the above example, hmd build will first run hmd mickey build and then hmd python build. If a build command errors or fails, the entire build will exit and fail. All subsequent commands listed will not be called. Build commands are run sequentially in the order listed. It is not possible to run commands in parallel.

Build Secrets

The ./meta-data/manifest.json file can also contain a build.secrets section. This section is used to reference secrets that are required by the build commands. The secrets must be stored in the Admin Environment Secrets Manager. Valid types are file and env. The file type will write the secret to a file in /tmp/secrets, and the env type will set the secret as an environment variable.

Example:

{
  "name": "example-project",
  "build": {
    "commands": [["mickey"], ["python"]],
    "secrets": [
      {
        "name": "<aws-secret-name>",
        "type": "env",
        "env": "API_KEY",
        "key": "API_KEY"
      },
      {
        "name": "<aws-secret-name>",
        "type": "file",
      }
    ]
  }
}

Strict Mode

By default, hmd build runs with HMD_BUILD_STRICT_MODE=true, or in strict mode. While in strict mode, the build will error and fail if one of the listed build commands is not installed. This behavior is desirable on a CI or build server, but not for local development. You can turn off strict mode by setting HMD_BUILD_STRICT_MODE=false. This will be set for you when you run hmd configure after installing the neuronsphere package.

When strict mode is disabled, hmd build will only warn about a missing command and continue on to the next command.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hmd_cli_build-0.1.77-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file hmd_cli_build-0.1.77-py3-none-any.whl.

File metadata

  • Download URL: hmd_cli_build-0.1.77-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.14

File hashes

Hashes for hmd_cli_build-0.1.77-py3-none-any.whl
Algorithm Hash digest
SHA256 b4f2ff9034b8dfb7318cd105e63a6f40fafc34d36df98065ba0fc2fa2a1f8b5a
MD5 144e0348ed90a71fad4907a31c7841d4
BLAKE2b-256 ad216e1a5831dd603feee7ef2afb50ce49176b762211e225002e3644b1cdef47

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page