Support Dockerfile build mode for applications#601
Open
psanghvi17 wants to merge 1 commit into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Checklist
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