Přeskočit na obsah

Tato stránka byla automaticky přeložena z angličtiny, jediného jazyka, ve kterém se tento web píše. Číst originál.

deploy.slug

Writes, into a directory outside the checkout that is absent or empty, the tree the deployment's provider receives (ADR 0219): the object's build inputs except the package the executable is compiled from, read from git at one commit (HEAD unless named); the provider's generated files of that commit at the slug's root, each held to what the object renders and the hooks made executable; the provider's buildpack line; the executable built at that commit; and a record naming the deployment, the commit, the executable's digest and the provider. Refuses an out directory inside the checkout or not empty, a deployment that names no provider, a build input the commit does not track, a provider file the object does not render, and two files that would land on one path. Changes nothing in the repository and reaches no network; pushing the slug is the provider workflow's.

Writes, into a directory outside the checkout that is absent or empty, the tree the deployment's provider receives (ADR 0219): the object's build inputs except the package the executable is compiled from, read from git at one commit (HEAD unless named); the provider's generated files of that commit at the slug's root, each held to what the object renders and the hooks made executable; the provider's buildpack line; the executable built at that commit; and a record naming the deployment, the commit, the executable's digest and the provider. Refuses an out directory inside the checkout or not empty, a deployment that names no provider, a build input the commit does not track, a provider file the object does not render, and two files that would land on one path. Changes nothing in the repository and reaches no network; pushing the slug is the provider workflow's.

Zpřístupnění

Kde je tato jedna definice dosažitelná. Absence je explicitní: povrch, který není uveden, ji nenese.

povrchjako
MCP—
HTTP—
příkazová řádkamajordomus deploy slug

Schémata

Kanonický vstup a výstup z typů Rustu; schéma nástroje MCP a parametry a odpovědi OpenAPI se odvozují z nich.

input · SlugInput

The input of deploy.slug: which deployment, at which commit, with which executable, and where the slug is written. Relative paths are read against the working directory.
vlastnosttyppovinnépopis
commit string | null ne The commit every file is read at, any revision git resolves; HEAD when absent.
nasazení string | null ne The deployment's id; when absent, the one deployment that names a provider.
spustitelný soubor string ano The executable built at that commit.
out string ano The directory the slug is written into: outside the checkout, absent or empty.
web string | null ne The site built at that commit (scripts/site-build --serve), required exactly when the deployment declares build.site: the object says the slug carries one, this says where the build left it.
JSON Schema
{
  "additionalProperties": false,
  "description": "The input of `deploy.slug`: which deployment, at which commit, with which executable, and\nwhere the slug is written. Relative paths are read against the working directory.",
  "properties": {
    "commit": {
      "description": "The commit every file is read at, any revision git resolves; `HEAD` when absent.",
      "type": [
        "string",
        "null"
      ]
    },
    "deployment": {
      "description": "The deployment's `id`; when absent, the one deployment that names a provider.",
      "type": [
        "string",
        "null"
      ]
    },
    "executable": {
      "description": "The executable built at that commit.",
      "type": "string"
    },
    "out": {
      "description": "The directory the slug is written into: outside the checkout, absent or empty.",
      "type": "string"
    },
    "site": {
      "description": "The site built at that commit (`scripts/site-build --serve`), required exactly when the\ndeployment declares `build.site`: the object says the slug carries one, this says where\nthe build left it.",
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "executable",
    "out"
  ],
  "title": "SlugInput",
  "type": "object"
}

output · Slug

What was assembled: where, from what, and the provider facts a publisher needs to push it and to ask the deployment what it serves.

use majordomus_cli::deploy::slug::Slug;
let json = r#"{"deployment":"majordomus","commit":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "out":"/tmp/slug","entries":[".buildpacks","Procfile"],"files":2,"bytes":10,
  "executable":".majordomus/bin/majordomus","executable_sha256":"00",
  "buildpack":"https://example.org/bp#0","liveness":"/api/v1/live",
  "provider":{"name":"gigalixir","app":"a-b","stack":"gigalixir-24",
              "url":"https://a-b.gigalixirapp.com"}}"#;
let s: Slug = serde_json::from_str(json).unwrap();
assert_eq!(s.provider.app, "a-b");
assert_eq!(s.entries.len(), 2);
vlastnosttyppovinnépopis
buildpack string ano The buildpack line written to BUILDPACKS_FILE.
bajty integer ano Their total size in bytes.
commit string ano The full commit every file was read at.
nasazení string ano id nasazení.
entries array ano Every top-level entry of the slug, sorted: the whole of what a provider receives at its root.
spustitelný soubor string ano Where the executable sits, relative to the slug's root.
executable_sha256 string ano Its hex SHA-256.
soubory integer ano How many files (and links) were written.
živost string ano The route the deployment answers its commit on (health.liveness).
out string ano The directory the slug was written into, absolute.
provider reference ano The provider block of the object, as read at the commit.
web string | null ne Where the built site sits in the slug, when the object declares one.
site_files integer | null ne How many of its files the slug carries.
site_sha256 string | null ne The digest over them, as Source::site_sha256.
JSON Schema
{
  "$defs": {
    "Provider": {
      "additionalProperties": false,
      "description": "The hosting provider that runs the deployment, and the facts that are the provider's\nalone. Every file the provider reads is rendered from this block and the generic keys\n(see `render`); its credential is never one of these fields.\n\n```\nuse majordomus_cli::deploy::{Provider, ProviderName};\n\nlet p: Provider = serde_json::from_value(serde_json::json!({\n    \"name\": \"gigalixir\",\n    \"app\": \"prismatic-majordomus\",\n    \"stack\": \"gigalixir-24\",\n    \"url\": \"https://prismatic-majordomus.gigalixirapp.com\",\n}))\n.unwrap();\nassert_eq!(p.name, ProviderName::Gigalixir);\nassert_eq!(p.app, \"prismatic-majordomus\");\n\n// a key the provider block does not have is refused, a token above all\nassert!(serde_json::from_value::<Provider>(serde_json::json!({\n    \"name\": \"gigalixir\", \"app\": \"a-b-c\", \"stack\": \"gigalixir-24\",\n    \"url\": \"https://a-b-c.gigalixirapp.com\", \"api_key\": \"x\",\n}))\n.is_err());\n```",
      "properties": {
        "app": {
          "description": "The application's name at the provider.",
          "type": "string"
        },
        "name": {
          "$ref": "#/$defs/ProviderName",
          "description": "Which provider."
        },
        "stack": {
          "description": "The provider's stack the application runs on (`gigalixir-24`).",
          "type": "string"
        },
        "url": {
          "description": "The public URL the deployment answers on; always `https://`.",
          "type": "string"
        }
      },
      "required": [
        "name",
        "app",
        "stack",
        "url"
      ],
      "type": "object"
    },
    "ProviderName": {
      "description": "A hosting provider the contract knows. A name outside this list is refused at parse time:\na provider whose files nothing renders would be a block nothing reads.\n\n```\nuse majordomus_cli::deploy::ProviderName;\n\nlet name: ProviderName = serde_json::from_value(serde_json::json!(\"gigalixir\")).unwrap();\nassert_eq!(name, ProviderName::Gigalixir);\nassert_eq!(name.as_str(), \"gigalixir\");\nassert!(serde_json::from_value::<ProviderName>(serde_json::json!(\"fly\")).is_err());\n```",
      "oneOf": [
        {
          "const": "gigalixir",
          "description": "Gigalixir: a Heroku-compatible platform that runs a Procfile over a buildpack.",
          "type": "string"
        }
      ]
    }
  },
  "description": "What was assembled: where, from what, and the provider facts a publisher needs to push\nit and to ask the deployment what it serves.\n\n```\nuse majordomus_cli::deploy::slug::Slug;\nlet json = r#\"{\"deployment\":\"majordomus\",\"commit\":\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\n  \"out\":\"/tmp/slug\",\"entries\":[\".buildpacks\",\"Procfile\"],\"files\":2,\"bytes\":10,\n  \"executable\":\".majordomus/bin/majordomus\",\"executable_sha256\":\"00\",\n  \"buildpack\":\"https://example.org/bp#0\",\"liveness\":\"/api/v1/live\",\n  \"provider\":{\"name\":\"gigalixir\",\"app\":\"a-b\",\"stack\":\"gigalixir-24\",\n              \"url\":\"https://a-b.gigalixirapp.com\"}}\"#;\nlet s: Slug = serde_json::from_str(json).unwrap();\nassert_eq!(s.provider.app, \"a-b\");\nassert_eq!(s.entries.len(), 2);\n```",
  "properties": {
    "buildpack": {
      "description": "The buildpack line written to `BUILDPACKS_FILE`.",
      "type": "string"
    },
    "bytes": {
      "description": "Their total size in bytes.",
      "format": "uint64",
      "minimum": 0,
      "type": "integer"
    },
    "commit": {
      "description": "The full commit every file was read at.",
      "type": "string"
    },
    "deployment": {
      "description": "The deployment's `id`.",
      "type": "string"
    },
    "entries": {
      "description": "Every top-level entry of the slug, sorted: the whole of what a provider receives at\nits root.",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "executable": {
      "description": "Where the executable sits, relative to the slug's root.",
      "type": "string"
    },
    "executable_sha256": {
      "description": "Its hex SHA-256.",
      "type": "string"
    },
    "files": {
      "description": "How many files (and links) were written.",
      "format": "uint",
      "minimum": 0,
      "type": "integer"
    },
    "liveness": {
      "description": "The route the deployment answers its commit on (`health.liveness`).",
      "type": "string"
    },
    "out": {
      "description": "The directory the slug was written into, absolute.",
      "type": "string"
    },
    "provider": {
      "$ref": "#/$defs/Provider",
      "description": "The provider block of the object, as read at the commit."
    },
    "site": {
      "description": "Where the built site sits in the slug, when the object declares one.",
      "type": [
        "string",
        "null"
      ]
    },
    "site_files": {
      "description": "How many of its files the slug carries.",
      "format": "uint",
      "minimum": 0,
      "type": [
        "integer",
        "null"
      ]
    },
    "site_sha256": {
      "description": "The digest over them, as `Source::site_sha256`.",
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "deployment",
    "commit",
    "out",
    "entries",
    "files",
    "bytes",
    "executable",
    "executable_sha256",
    "buildpack",
    "liveness",
    "provider"
  ],
  "title": "Slug",
  "type": "object"
}

Politiky

benchmark
waived — prominuto: destructive
cache
vypnuto — každé volání spustí handler

Cíle benchmarku

Odvozeno z registru pro tento repozitář: jeden požadavek na transport a případy, které poskytuje typ vstupu. Celá matice je na stránce měření výkonu.

transportstatepřípadytargets
directprominuto (destruktivní)0

Prohledává názvy a popisy všech stránek, které tento web publikuje.