Skip to content

chore: Add devfile for workspaces

Vishal Tak requested to merge add_devfile into main

What does this MR do?

Closes : Add devfile for gitlab-ui (gitlab#415666 - closed)

chore: Add devfile for workspaces

Adding a devfile allows us to create a workspaces in GitLab

For the storybook server to be accessible over the network, we need the host to be 0.0.0.0. This is achieved by setting the STORYBOOK_HOST to 0.0.0.0 inside a workspace(through the devfile).

The added devfile is basically saying the following

  • Let's create a container component named gitlab-ui using the image registry.gitlab.com/gitlab-org/remote-development/gitlab-remote-development-docs/debian-bullseye-ruby-3.2.patched-golang-1.20-rust-1.65-node-18.16-postgresql-15@sha256:216b9bf0555349f4225cd16ea37d7a627f2dad24b7e85aa68f4d364319832754 i.e. SHA256 for the tag rubygems-3.4-git-2.36-lfs-2.9-chrome-109-yarn-1.22-graphicsmagick-1.3.36-gitlab-workspaces
  • There will be an environment variables STORYBOOK_HOST whose value would be 0.0.0.0
  • It will expose an endpoint named storybook on port 9001 which will be accessible on https and will be secure(protected by some authentication i.e. OAuth)

In the below video demo, I've first shown how to create a workspace and then used an existing workspace to show that we started the storybook inside the workspace and accessed it directly. Right now I'm doing it on my local GDK. The reviewer/maintainer will be able to try it out on SaaS GitLab.com only after merging it since we do not yet allow creating workspaces from non-main branches.

Screen_Recording_2023-06-19_at_2.38.36_PM

Does this MR meet the acceptance criteria?

Conformity

  • Code review guidelines.
  • GitLab UI's contributing guidlines.
  • If it changes a Pajamas-compliant component's look & feel, the MR has been reviewed by a UX designer.
  • If it changes GitLab UI's documentation guidelines, the MR has been reviewed by a Technical Writer.
  • If the MR changes a component's API, integration MR(s) have been opened in the following projects to ensure that the @gitlab/ui package can be upgraded quickly after the changes are released:
  • Added the ~"component:*" label(s) if applicable.

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • Security reports checked/validated by a reviewer from the AppSec team

Accessibility

If this MR adds or modifies a component, take a few moments to review the following:

  • All actions and functionality can be done with a keyboard.
  • Links, buttons, and controls have a visible focus state.
  • All content is presented in text or with a text equivalent. For example, alt text for SVG, or aria-label for icons that have meaning or perform actions.
  • Changes in a component’s state are announced by a screen reader. For example, changing aria-expanded="false" to aria-expanded="true" when an accordion is expanded.
  • Color combinations have sufficient contrast.
Edited by Vishal Tak

Merge request reports