Skip to content

feat(job-service): publish dedicated knative-job-service image#46

Open
Anmol1696 wants to merge 3 commits into
mainfrom
feat/job-service-image
Open

feat(job-service): publish dedicated knative-job-service image#46
Anmol1696 wants to merge 3 commits into
mainfrom
feat/job-service-image

Conversation

@Anmol1696
Copy link
Copy Markdown
Contributor

Summary

  • Adds job/service/Dockerfile — a multi-stage build for @constructive-io/knative-job-service so the deployment no longer depends on the monolithic ghcr.io/constructive-io/constructive image. Mirrors the shape of templates/node-graphql/Dockerfile and entrypoints at dist/run.js.
  • Adds a build-job-service job to .github/workflows/docker.yaml that publishes ghcr.io/constructive-io/knative-job-service to GHCR using the same tag strategy as the function images (latest on main, short SHA, semver/tag refs).
  • Updates k8s/base/constructive/knative-job-service.yaml to point at the new image and adjusts args from jobs/knative-job-service/dist/run.jsdist/run.js.

The job-service code lived in the constructive monorepo at jobs/knative-job-service/ until it moved to this repo (job/service/). The k8s manifest still pointed at the old monolithic image at a pinned SHA — this PR cuts that dependency.

The local-simple overlay (k8s/overlays/local-simple/job-service.yaml) is intentionally left alone — it builds from the dev image with Skaffold hot reload and works as-is for local development.

Test plan

  • docker build -f job/service/Dockerfile . builds successfully locally
  • Image boots cleanly — entrypoint loads, waitForJobsPrereqs runs and retries on DB connect failure as expected
  • CI build-job-service job runs green on this PR (build only, no push on PR)
  • After merge to main, confirm GHCR publishes ghcr.io/constructive-io/knative-job-service:latest and the short-SHA tag
  • After publish, bump the manifest tag from :latest to a pinned short SHA (matching the previous :e0b55cc style) before applying to a real cluster
  • E2E (pnpm test:e2e) with the new image deployed — jobs inserted into app_jobs.jobs still get picked up and dispatched

Anmol1696 added 3 commits May 19, 2026 10:51
Multi-stage build for @constructive-io/knative-job-service, mirroring
templates/node-graphql/Dockerfile but targeted at the job-service package
so it no longer ships from the monolithic constructive image.
Adds a build-job-service job alongside the function matrix that builds
job/service/Dockerfile and pushes ghcr.io/constructive-io/knative-job-service
with the same tag strategy as the function images (latest on main,
short SHA, semver/tag refs).
Switches the deployment from the monolithic ghcr.io/constructive-io/constructive
image to the new ghcr.io/constructive-io/knative-job-service image. Adjusts
args from jobs/knative-job-service/dist/run.js to dist/run.js — the deployed
package roots dist/ at /app inside the new image.

Tag left at :latest as a starting point; deployers should pin to a short
SHA once CI publishes the first build.
Copilot AI review requested due to automatic review settings May 19, 2026 04:09
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR decouples the Knative job-service deployment from the monolithic ghcr.io/constructive-io/constructive image by introducing a dedicated Docker image build and updating the Kubernetes manifest to run the job-service entrypoint from that new image.

Changes:

  • Added a multi-stage Dockerfile to build and package @constructive-io/knative-job-service as its own image.
  • Added a new build-job-service job to the existing Docker publishing workflow to build/push ghcr.io/<owner>/knative-job-service with the same tag strategy as function images.
  • Updated the base k8s deployment to reference the new image and updated the Node entrypoint args.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
k8s/base/constructive/knative-job-service.yaml Switches the deployment to the new knative-job-service image and updates the entrypoint args.
job/service/Dockerfile Introduces a dedicated multi-stage build for the job-service package, producing dist/run.js as the runtime entrypoint.
.github/workflows/docker.yaml Adds a CI job to build and publish the new job-service image to GHCR with consistent tagging/caching.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +25 to +31
# Pin to a short SHA at deploy time (e.g. ghcr.io/constructive-io/knative-job-service:abc1234).
# Built by .github/workflows/docker.yaml from job/service/Dockerfile.
image: ghcr.io/constructive-io/knative-job-service:latest
imagePullPolicy: Always

# Run the knative job service entrypoint from the root image
command: ["node"]
args: ["jobs/knative-job-service/dist/run.js"]
args: ["dist/run.js"]
Comment on lines +120 to +131
- name: Setup pnpm
uses: pnpm/action-setup@v6

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'

- name: Generate workspace packages
run: |
node --experimental-strip-types scripts/generate.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants