core concepts

Builds

Builds are the processes that create a Component’s deployment artifact. They are defined in the Noop Blueprint (blueprint.yaml) for each Application Component.

Each step in the build process creates a container image layer. The image from the final step becomes the Service or Task runtime, or defines the directory for a Static Component (the artifact in this case is a collection of static files).

Here’s an example build for a Static Component:

components:
  - name: StaticApp
    type: static
    image: node:24-alpine
    build:
      variables:
        NODE_ENV: production
        APP_NAME:
          $app: name
      steps:
        - copy: package*.json
          destination: ./
        - run: npm ci
        - copy: index.html
        - copy: vite.config.js
        - copy: public/
        - copy: src/
        - run: npm run build
        - directory: dist/

As you can see, there are several steps that culminate in producing a dist directory, which includes the static assets for hosting.

Build Steps Schema

The schema for a build definition can include a steps array property that includes at least one of the following: run, copy, image, or test.

  • steps (array): Length must be at least 1.
    • Items
      • One of
        • object: Cannot contain additional properties.
          • run (string, required)
        • object: Cannot contain additional properties.
          • test (string, required)
        • object: Cannot contain additional properties.
          • directory (string, required)
        • object: Cannot contain additional properties.
          • copy
            • One of
              • string
              • array: Length must be at least 1.
                • Items (string)
          • destination (string)
          • from (string)
        • object: Cannot contain additional properties.
          • image (string, required)
          • stage (string)

Multi-stage Builds

The image property referenced above makes it possible to configure multi-stage builds. Here’s an example that shows constructing a build using multiple images:

components:
  - name: WebsiteStatic
    type: service
    image: node:24-alpine
    build:
      variables:
        NODE_ENV: production
        APP_NAME:
          $app: name
      steps:
        - copy: package*.json
          destination: ./
        - run: npm ci
        - copy: index.html
        - copy: vite.config.js
        - copy: public/
        - copy: src/
        - run: npm run build
        - image: nginx:1-alpine
          stage: nginx
        - copy: dist
          destination: /usr/share/nginx/html/
          from: main
        - copy: nginx.conf
          destination: /etc/nginx
    runtime:
      command: 'nginx -g "daemon off;"'
      variables:
        NGINX_ENTRYPOINT_QUIET_LOGS: '1'

Build Variables and Secrets

Build Variables can be assigned to either static or dynamic Noop Logic-based values under the variables key within a Component’s build manifest. These variables will only be present as environment variables during run build steps, and will be unassigned at the component’s runtime.

Check out the Variables and Secrets guide for further usage details.