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.63-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hmd_cli_build-0.1.63-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.10.15

File hashes

Hashes for hmd_cli_build-0.1.63-py3-none-any.whl
Algorithm Hash digest
SHA256 962c84edc69ac24c5bc2ee19129f080d6ee562ab160e1f4c2f91cb1e9e629465
MD5 64773ec395870eaa4b0442f3f0c61d8e
BLAKE2b-256 9765ad417d039abfe2dc737615fa6b9580db1cc58a71ef4f0355b54832a7b4ed

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