Skip to content

Support Dockerfile build mode for applications#601

Open
psanghvi17 wants to merge 1 commit into
mainfrom
feat/dockerfile-build
Open

Support Dockerfile build mode for applications#601
psanghvi17 wants to merge 1 commit into
mainfrom
feat/dockerfile-build

Conversation

@psanghvi17

@psanghvi17 psanghvi17 commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

PR Checklist

  • Linting Test is passing
  • Code is well documented
  • If applicable, a PR in the epinio/docs repository has been opened

Summary

Fixes #
Add an explicit build mode (buildpack or Dockerfile) and Dockerfile path to application source handling. UI: add build mode dropdown and Dockerfile path input with validation and i18n strings. Types: introduce APPLICATION_BUILD_MODE enum and extend EpinioAppSource with buildMode and dockerfilePath. Models: propagate buildMode and dockerfilePath through staging, async build/deploy flows and API payloads so the backend receives the selected build method.

Occurred changes and/or fixed issues

Technical notes summary

Added APPLICATION_BUILD_MODE enum (buildpack | dockerfile) and extended EpinioAppSource with optional buildMode and dockerfilePath.
AppSource.vue
New Build Method dropdown under Advanced Settings (archive, folder, git URL sources).
New Dockerfile Path input when Dockerfile mode is selected (default: Dockerfile).
Paketo Builder Image section is hidden when build mode is dockerfile.
Validation updated: Dockerfile mode requires archive/git source + Dockerfile path; buildpack mode still requires builder image.
Source change event now includes buildMode and dockerfilePath.
application-action.js — build and deploy pass buildMode and dockerfilePath from source into async build/deploy (skipped for container-image sources).
applications.js — stage(), ensureAsyncDeployStarted(), and sync staging propagate buildmode and dockerfilepath in API payloads (POST .../stage and POST .../deployments).
en-us.yaml — i18n strings for build method and Dockerfile path labels.
Vue ref fix — dropdown/input handlers updated to assign ref.value instead of reassigning the ref (e.g. buildMode.value = ...). Without this, buildmode was sent as undefined and the API defaulted to buildpack.

Areas or cases that should be tested

Prerequisites

Cluster running epinio + helm-chart branches with Dockerfile build support.
Local UI dev setup or rebuilt extension (see UI dev docs).
Sample app with Dockerfile (e.g. epinio-dockerfile-test).
Browser used for local testing: Chrome.

Create application — folder/archive source

Epinio UI → Applications → Create.
Source type: Folder (or Archive).
Upload/select a folder containing Dockerfile, app.py, etc.
Advanced Settings → Build Method → Dockerfile.
Dockerfile Path → Dockerfile.
Confirm Paketo Builder Image is hidden.
Complete wizard → Build should succeed; staging logs show Kaniko, not Paketo.
App reaches Running and route responds.
Create application — buildpack (regression)

Same flow with Build Method → Buildpack (Paketo).
Builder image field visible; default builder pre-filled.
Deploy succeeds via Paketo lifecycle.
Git URL source

Source type: Git URL with a repo containing a Dockerfile.
Build Method → Dockerfile, set Dockerfile path.
Deploy succeeds.
Container image source (regression)

Source type: Container Image.
Build Method / Dockerfile fields should not appear.
Deploy from image URL only; no buildmode in API payload.
Validation

Dockerfile mode without Dockerfile path → wizard blocks progress (invalid source step).
Buildpack mode without uploaded source → blocked as before.
Network verification (optional)

DevTools → Network → POST .../deployments body includes "buildmode":"dockerfile" and "dockerfilepath":"Dockerfile".

Areas which could experience regressions

Application create wizard — source step validation for archive, folder, git URL, git hub/gitlab.
Async deploy flow — ensureAsyncDeployStarted, build phase polling, sync fallback when async endpoints unavailable.
Sync staging path — buildSyncOnly / stage() still work when buildmode is omitted (buildpack default).
Container-image deploys — must not send buildmode / dockerfilepath.
Builder image UI — show/hide and custom vs default builder when switching build modes.
App chart dropdown — ref assignment fix for appChart (unrelated but touched in same component).
Source type dropdown — ref fix for type switching between archive/folder/git.
Edit/view modes — build mode controls in _EDIT / view (disabled states).
GitHub/GitLab sources — build mode UI visible but Dockerfile path validation not enforced in validate() for these types; verify expected behavior.
Application detail / origin display — builder image may still show for Dockerfile-built apps (display-only; no functional impact on deploy).

Screenshot/Video

Add an explicit build mode (buildpack or Dockerfile) and Dockerfile path to application source handling. UI: add build mode dropdown and Dockerfile path input with validation and i18n strings. Types: introduce APPLICATION_BUILD_MODE enum and extend EpinioAppSource with buildMode and dockerfilePath. Models: propagate buildMode and dockerfilePath through staging, async build/deploy flows and API payloads so the backend receives the selected build method.
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.

1 participant