-
Notifications
You must be signed in to change notification settings - Fork 788
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
Stop cloudchamber build from trying to push image when build fails #8220
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 059dc67 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
A wrangler prerelease is available for testing. You can install this latest build in your project with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13467233733/npm-package-wrangler-8220 You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/8220/npm-package-wrangler-8220 Or you can use npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13467233733/npm-package-wrangler-8220 dev path/to/script.js Additional artifacts:cloudflare-workers-bindings-extension: wget https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13467233733/npm-package-cloudflare-workers-bindings-extension-8220 -O ./cloudflare-workers-bindings-extension.0.0.0-vf17949989.vsix && code --install-extension ./cloudflare-workers-bindings-extension.0.0.0-vf17949989.vsix create-cloudflare: npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13467233733/npm-package-create-cloudflare-8220 --no-auto-update @cloudflare/kv-asset-handler: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13467233733/npm-package-cloudflare-kv-asset-handler-8220 miniflare: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13467233733/npm-package-miniflare-8220 @cloudflare/pages-shared: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13467233733/npm-package-cloudflare-pages-shared-8220 @cloudflare/unenv-preset: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13467233733/npm-package-cloudflare-unenv-preset-8220 @cloudflare/vite-plugin: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13467233733/npm-package-cloudflare-vite-plugin-8220 @cloudflare/vitest-pool-workers: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13467233733/npm-package-cloudflare-vitest-pool-workers-8220 @cloudflare/workers-editor-shared: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13467233733/npm-package-cloudflare-workers-editor-shared-8220 @cloudflare/workers-shared: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13467233733/npm-package-cloudflare-workers-shared-8220 @cloudflare/workflows-shared: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13467233733/npm-package-cloudflare-workflows-shared-8220 Note that these links will no longer work once the GitHub Actions artifact expires.
Please ensure constraints are pinned, and |
ce0245b
to
d5e3fc7
Compare
d5e3fc7
to
059dc67
Compare
logRaw(`Error when checking ${args.PATH}: ${error}`); | ||
return; | ||
} | ||
|
||
try { | ||
await constructBuildCommand({ | ||
imageTag: args.tag, | ||
pathToDockerfile: args.PATH, | ||
pathToDocker: args.pathToDocker, | ||
}) |
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, no need for async keyword: maybe .then(bc => dockerBuild({ buildCmd: bc })
?
); | ||
await new Promise((resolve) => { | ||
child.on("close", resolve); | ||
export async function dockerBuild(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.
nit: I think we shouldnt mark the function async as we are already returning a promise and we dont call await
Describe your change...
Fixes issue where cloudchamber build --push ... would continue trying to push the image even if the build failed. Adds a check to verify the passed in context dir is actually a directory and also checks the builds error code on exit to stop progressing to pushing if that fails.
The behavior now is:
With a file that doesn't exist:
When given a file and not a directory:
When docker build returns a non-zero exit code: