Add slack notifications for docker build failure#6316
Conversation
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6316 +/- ##
========================================
Coverage 42.59% 42.59%
========================================
Files 2497 2497
Lines 43401 43401
Branches 10232 9851 -381
========================================
Hits 18485 18485
Misses 24879 24879
Partials 37 37 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR updates the Docker image build to include additional config for pnpm, cleans up Dockerfile style/warnings, and introduces Slack notifications on failure for key release and container publish workflows.
Changes:
- Update Dockerfile to copy pnpm workspace/.npmrc files, normalize
ENVsyntax, and add OCI metadata labels (including commit and version). - Enhance
publish-containers.ymlto pass commit/version build args into the image and send a Slack notification when the image build fails. - Add Slack failure notifications to the
new-current-patch-release.ymlandcreate-draft-release.ymlworkflows via 1Password-managed webhook secrets.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| Dockerfile | Adjusts pnpm install context, environment variable declarations, and adds OCI labels using build args for commit and version. |
| .github/workflows/publish-containers.yml | Extends container publish workflow with commit/version build args and a Slack failure notification job using 1Password secrets. |
| .github/workflows/new-current-patch-release.yml | Adds a Slack notification job that triggers when recreating the current patch release branch fails. |
| .github/workflows/create-draft-release.yml | Adds a Slack notification job that triggers when creating a draft release fails. |
| ENV API_URL="${API_URL:-http://localhost:8000/graphql/}" | ||
| ENV APP_MOUNT_URI="${APP_MOUNT_URI:-/dashboard/}" | ||
| ENV APPS_MARKETPLACE_API_URL="${APPS_MARKETPLACE_API_URL:-https://apps.saleor.io/api/v2/saleor-apps}" | ||
| ENV EXTENSIONS_API_URL="${EXTENSIONS_API_URL:-https://apps.saleor.io/api/v1/extensions}" | ||
| ENV APPS_TUNNEL_URL_KEYWORDS="${APPS_TUNNEL_URL_KEYWORDS}" |
There was a problem hiding this comment.
The use of shell-style parameter expansion in these ENV instructions (e.g. ${API_URL:-http://localhost:8000/graphql/}) will not behave as intended in a Dockerfile: Docker only supports simple ${VAR}/$VAR expansion and does not interpret :- defaults, so the resulting environment values will not fall back to the provided defaults when the build args are unset. To ensure sensible defaults, consider either assigning explicit default values in the ARG declarations and referencing them directly, or setting ENV values without :- and relying on Docker build arguments or runtime environment variables to override them.
6ba442b to
681eb9e
Compare
Added notifications to internal #dashboard-alerts channel on Slack to get notified about failures in Docker images build, creating new releases