-
Notifications
You must be signed in to change notification settings - Fork 52
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
CLI deployment pipeline #814
Conversation
"core: deserializeDeployManifest", | ||
(manifest: string, options?: DeserializeManifestOptions): DeployManifest => { | ||
let anyDeployManifest: AnyDeployManifest | undefined; | ||
try { |
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.
Why don't we load json with yaml loader? Since YAML is superset of JSON, it should be possible.
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.
LGTM!
@@ -948,7 +948,7 @@ describe("Web3ApiClient", () => { | |||
).toBe(true); | |||
}); | |||
|
|||
it("simple-storage", async () => { | |||
it.only("simple-storage", async () => { |
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.
Is it debug leftover?
fd.append(formDataEntry.key, elementData, options); | ||
}); | ||
|
||
const resp = await axios.post(`${ipfsUrl}/api/v0/add`, fd, { |
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.
Will it also pin or we need separate deployer for pinning?
Closes #670.
This PR aims to create a modular deployment pipeline for Polywrap's CLI. It introduces a new
deploy
CLI command and aDeployManifest
.Users declare deployment "stages" or steps, where each one performs deployment actions. Each stage takes a
Uri
argument outputs aUri
. Additionally, stages can be chained, so that the output of a stage can automatically be used as the input of another.This aims to provide a modular, extensible, way of performing complex deployment/publishing/persistance actions that may depend on each other. An example use case would be:
Each stage has an associated (declared) external package (wrappers in the future) that implements the
Deployer
interface:The CLI determines the dependency chains, executes each stage in order of dependency and properly passes the outputs/inputs from one stage to another.
Sometimes, stages (and its packages) need additional arguments in order to execute the deployment actions. For example, an ENS deployment stage may need an ethereum provider URL. These additional arguments are declared as part of the
config
object of each stage.Each package may provide a
web3api.deploy.ext.json
manifest extension file, with the necessary rules to validate theconfig
properties it needs. The CLI extracts these extensions, links them to the appropriate stage in the "base" manifest and performs manifest validation. If the extension does not exist, theconfig
property of that stage is not validated.