-
Notifications
You must be signed in to change notification settings - Fork 0
Cm/vbuild support #57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| import { isTlsEnabledFromEnvFile } from "../../../utils/tls"; | ||
| import type { SubmitBuildRequest } from "@layr-labs/ecloud-sdk"; | ||
|
|
||
| export default class AppDeploy extends Command { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
appears this isn't a new bug, but can't deploy in dev without explicitly passing the sepolia-dev environment flag because otherwise it defaults to sepolia, which is not available.
const environment = flags.environment || "sepolia";
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yea this needs to be fixed separately
|
an
Right now, it's unclear how I'd get the info to deploy a build if I closed the terminal after submitting it |
|
Related to the above, it would be nice if |
|
Should do some quick UUID validation on the passed build ID before passing to the API. For example, removing one character from the end of a build ID returns |
| return `${status} ${repoName}@${shortSha} ${shortId} ${created}`; | ||
| } | ||
|
|
||
| export async function promptBuildIdFromRecentBuilds(options: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you hook this up to ecloud compute build verify as well pls
| }); | ||
| } | ||
|
|
||
| export default class AppReleases extends Command { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be able to view releases for inactive apps as well. need to add "view releases for" to isEligible
| this.log(ruleLine); | ||
|
|
||
| for (const r of rows) { | ||
| this.log( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: for future, should just use a lib for this and app list. cli-table3, table, or console-table-printer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahhh yeah will fix it now
…om direct SDK function calls to the unified compute client interface.
|
|
||
| verifiableImageUrl = imageRef; | ||
| verifiableImageDigest = digest; | ||
| suggestedAppBaseName = suggestAppBaseNameFromRepoUrl(verify.repoUrl); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: for prebuilt verifiable images, verify.repoUrl points to the shared eigencloud-containers repo, so the suggested app name isn't useful - we should probably just prompt without a default here


Goals
SDK: Build module
Entry
createBuildModule(config: BuildModuleConfig): BuildModuleBuildModuleConfig
environment?: string(default:sepolia)privateKey?: string(required for submit/logs; not required for public reads)verbose?: booleanclientId?: stringskipTelemetry?: booleanAPI
submit(request: SubmitBuildRequest): Promise<{ buildId: string }>(requires private key)submitAndWait(request, { onLog?, onProgress?, pollIntervalMs?, timeoutMs? }?): Promise<Build>waitForBuild(buildId, { onLog?, onProgress?, pollIntervalMs?, timeoutMs? }?): Promise<Build>get(buildId: string): Promise<Build>getByDigest(digest: string): Promise<Build>verify(identifier: string): Promise<VerifyProvenanceResult>getLogs(buildId: string): Promise<string>(requires private key)streamLogs(buildId: string, pollIntervalMs?: number): AsyncGenerator<LogChunk>Key types
SubmitBuildRequest
repoUrl: stringgitRef: string(40-char commit SHA recommended)dockerfilePath?: string(default:Dockerfile)buildContextPath?: string(default:.)dependencies?: string[](eachsha256:<64hex>)caddyfilePath?: string(path inside repo, relative to build context; if omitted, no Caddyfile is copied)Build
buildId,repoUrl,gitRef,status,buildType,imageName,imageUrl?,imageDigest?,provenanceJson?,provenanceSignature?,errorMessage?,createdAt,updatedAt,dependencies?: Record<string, Build>Errors (not exhaustive)
AuthRequiredError,BuildFailedError,TimeoutErrorCLI: Build commands (
ecloud compute build ...)Common flags
--environment(ECLOUD_ENV)--rpc-url(ECLOUD_RPC_URL)--private-key(ECLOUD_PRIVATE_KEY) (only required when needed)--verbosecompute build submitSubmits a verifiable build from GitHub source, optionally follows logs and verifies.
Flags
--repo(ECLOUD_BUILD_REPO) (prompts if missing)--commit(ECLOUD_BUILD_COMMIT) (prompts if missing)--dockerfile(ECLOUD_BUILD_DOCKERFILE, default:Dockerfile) (prompt default)--context(ECLOUD_BUILD_CONTEXT, default:.) (prompt default)--dependencies sha256:...(repeatable; prompt supports comma-separated)--build-caddyfile(ECLOUD_BUILD_CADDYFILE) (optional)--no-follow(submit and exit)--jsonBehavior
--no-follow: prints/returnsbuildId.--no-follow: streams logs, waits for completion, then callsverify()and prints a concise provenance summary.compute build status <buildId>--jsonprints raw JSON).compute build logs <buildId> [--follow]--followpolls and appends.compute build verify <identifier>compute build info <buildId>get(buildId)and prints full build details, including dependencies recursively (--jsonprints raw JSON).CLI: App commands (
ecloud compute app ...)compute app deploy/compute app upgradeBoth support a normal flow and a verifiable flow.
Normal flow (no
--verifiable)--env-file/ECLOUD_ENVFILE_PATHfor env vars.Verifiable flow (either by
--verifiableor interactive prompt)If
--verifiableis not provided and you didn’t explicitly pass--dockerfile, you’ll be prompted:docker.io/eigenlayer/eigencloud-containers:<tag>, resolves digest, verifies provenance, then deploys/upgrades as-is.If
--verifiableis provided:--repo+--commit(+ optional build flags)--image-ref docker.io/eigenlayer/eigencloud-containers:<tag>TLS + Caddyfile behavior (verifiable git mode)
DOMAINfrom the selected--env-file:DOMAINis set and notlocalhost, it submits the build withcaddyfile_path: "Caddyfile"(unless a Caddyfile path was already provided)./etc/caddy/Caddyfilein verifiable builds.CLI: App releases
compute app releases [app-id]GET /apps/:idviaUserApiClient.getApp()and prints releases.rmsReleaseId,publicEnv,upgradeByTime,createdAt,createdAtBlock) plus attachedbuildand dependency builds.