Backend: Use default devfile with golden image to create workspace if no devfile is present
MR - Use default devfile with golden image to create... (!171230 - merged)
Description
As per the plan in Provide default devfile for projects if not pre... (&14644 - closed) , use default devfile with golden image to create workspace if no .devfile.yaml is present in the root of the repository. The default devfile would be very simple.
e.g.
schemaVersion: 2.2.0
components:
- name: development-environment
attributes:
gl/inject-editor: true
container:
image: "GOLDEN_IMAGE"
- Add a new settings in the settings module. This will be a string type. The value would be as follows (use a HEREDOC to define it inline)
schemaVersion: 2.2.0
components:
- name: development-environment
attributes:
gl/inject-editor: true
container:
image: "registry.gitlab.com/gitlab-org/gitlab-build-images/workspace/ubuntu-22.04:go-1.22"
- Update
devfile_fetcher.rb- If
devfile_pathis not null, fetch the value from the repository. - Else use the default value from the settings module.
- If
- Rename
devfile_reftoproject_refin the DB and the GraphQL and the codebase. - make
devfile_pathnullable at DB, and also potentially remove validation (so far do not see)
Acceptance Criteria
-
DB migration to make devfile_pathnullable -
Update devfile_fetcher.rbto take in default devfile is needed -
Rename devfile_reftoproject_refin the DB and the GraphQL and the codebase. -
Add a new settings in the settings module.
Technical Requirements
NA
Design Requirements
NA
Impact Assessment
NA
User Story
NA
Edited by zli