Web ide gitlab что такое
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Open with Desktop
- View raw
- Copy raw contents Copy raw contents
Copy raw contents
Copy raw contents
Web IDE (FREE)
The Web Integrated Development Environment (IDE) editor streamlines the process to contribute changes to your projects, by providing an advanced editor with commit staging.
Open the Web IDE
Use the . keyboard shortcut to open the Web IDE. You can also open the Web IDE when viewing a file, from the repository file list, and from merge requests:
- When viewing a file, or the repository file list -
- In the upper right corner of the page, select Open in Web IDE if it is visible.
- If Open in Web IDE is not visible:
- Select the (angle-down) next to Edit or Gitpod, depending on your configuration.
- Select Open in Web IDE from the list to display it as the editing option.
- Select Open in Web IDE to open the editor.
- When viewing a merge request -
- Go to your merge request, and select the Overview tab.
- Scroll to the widgets section, after the merge request description.
- Select Open in Web IDE if it is visible.
- If Open in Web IDE is not visible:
- Select the (angle-down) next to Open in Gitpod.
- Select Open in Web IDE from the list to display it as the editing option.
- Select Open in Web IDE to open the editor.
The file finder allows you to quickly open files in the current branch by searching for fragments of the file path. The file finder is launched using the keyboard shortcut Command + p , Control + p , or t (when editor is not in focus). Type the filename or file path fragments to start seeing results.
You can see all available commands for manipulating editor content by pressing the F1 key when the editor is in focus. After that, the editor displays a complete list of available commands for manipulating editor content. The editor supports commands for multi-cursor editing, code block folding, commenting, searching and replacing, navigating editor warnings and suggestions, and more.
Some commands have a keyboard shortcut assigned to them. The command palette displays this shortcut next to each command. You can use this shortcut to invoke the command without having to select it in the command palette.
For a full list of keyboard shortcuts in the Web IDE, refer to the Keyboard shortcuts list.
As expected from an IDE, syntax highlighting for many languages in the Web IDE makes your direct editing even easier.
The Web IDE currently provides:
Because the Web IDE is based on the Monaco Editor, you can find a more complete list of supported languages in the Monaco languages repository. Under the hood, Monaco uses the Monarch library for syntax highlighting.
If you are missing Syntax Highlighting support for any language, we prepared a short guide on how to add support for a missing language Syntax Highlighting.
-
in GitLab 13.0.
- Full Solarized Dark Theme introduced in GitLab 13.1.
- Full Solarized Light and Monokai Themes introduced in GitLab 13.6.
All the themes GitLab supports for syntax highlighting are applied to the Web IDE's entire screen. You can pick a theme from your profile preferences.
Solarized Dark Theme | Dark Theme |
---|---|
WebIDE is built with the Web Editor. This enables WebIDE to share the same core features for highlighting and linking to particular lines in the edited files described for the Web Editor.
Schema based validation
Introduced validation based on predefined schemas in GitLab 13.2 with a flag named schema_linting . Disabled by default.
The Web IDE provides validation support for certain JSON and YAML files using schemas based on the JSON Schema Store.
The Web IDE has validation for certain files built in. This feature is only supported for the *.gitlab-ci.yml files.
Custom schemas (PREMIUM)
The Web IDE also allows you to define custom schemas for certain JSON/YAML files in your project. You can do so by defining a schemas entry in the .gitlab/.gitlab-webide.yml file inside the repository's root. Here is an example configuration:
Each schema entry supports two properties:
- uri : please provide an absolute URL for the schema definition file here. The schema from this URL is loaded when a matching file is open.
- match : a list of matching paths or glob expressions. If a schema matches a particular path pattern, it is applied to that file. Please enclose the pattern in quotes if it begins with an asterisk ( * ), it's be applied to that file. If a pattern begins with an asterisk ( * ), enclose it in quotation marks. Otherwise, the configuration file is not valid YAML.
Configure the Web IDE
The Web IDE supports configuration of certain editor settings by using .editorconfig files. When opening a file, the Web IDE looks for a file named .editorconfig in the current directory and all parent directories. If a configuration file is found and has settings that match the file's path, these settings are enforced on the opened file.
The Web IDE currently supports the following .editorconfig settings:
- indent_style
- indent_size
- end_of_line
- trim_trailing_whitespace
- tab_width
- insert_final_newline
-
with GitLab 12.7, files are automatically staged.
- In GitLab 12.9, support for staging files was removed to prevent loss of unstaged data. All of your current changes must be committed or discarded.
After making your changes, select Commit on the bottom-left to review the list of changed files.
After you have finalized your changes, you can add a commit message, commit the changes and directly create a merge request. In case you don't have write access to the selected branch, you see a warning, but can still create a new branch and start a merge request.
To discard a change in a particular file, select Discard changes on that file in the changes tab. To discard all the changes, select the trash icon on the top-right corner of the changes sidebar.
Before you commit your changes, you can compare them with the previous commit by switching to the review mode or selecting the file from the list of changes.
An additional review mode is available when you open a merge request, which shows you a preview of the merge request diff if you commit your changes.
View CI job logs
You can use the Web IDE to quickly fix failing tests by opening the branch or merge request in the Web IDE and opening the logs of the failed job. You can access the status of all jobs for the most recent pipeline and job traces for the current commit by clicking the Pipelines button in the top right.
The pipeline status is also shown at all times in the status bar in the bottom left.
Switching merge requests
To switch between your authored and assigned merge requests, click the dropdown in the top of the sidebar to open a list of merge requests. You must commit or discard all your changes before switching to a different merge request.
To switch between branches of the current project repository, click the dropdown in the top of the sidebar to open a list of branches. You must commit or discard all your changes before switching to a different branch.
- Support for pasting images introduced in GitLab 13.1.
- Side-by-side Markdown preview introduced in GitLab 14.3.
To edit Markdown files in the Web IDE:
- Go to your repository, and navigate to the Markdown page you want to edit.
- Select Open in Web IDE, and GitLab loads the page in a tab in the editor.
- Make your changes to the file. GitLab supports GitLab Flavored Markdown (GLFM).
- When your changes are complete, select Commit in the left sidebar.
- Add a commit message, select the branch you want to commit to, and select Commit.
When editing, you can upload local images by pasting them directly in the Markdown file. The image is uploaded to the same directory and is named image.jpg by default. If another file already exists with the same name, a numeric suffix is automatically added to the filename.
There are two ways to preview Markdown content in the Web IDE:
- At the top of the file's tab, select Preview Markdown to preview the formatting in your file. You can't edit the file in this view.
- To add more changes to the file, select Edit.
Renamed from Client Side Evaluation to Live Preview in GitLab 13.0.
You can use the Web IDE to preview JavaScript projects right in the browser. This feature uses CodeSandbox to compile and bundle the JavaScript used to preview the web application.
Additionally, for public projects an Open in CodeSandbox button is available to transfer the contents of the project into a public CodeSandbox project to quickly share your project with others.
Enable Live Preview
With Live Preview enabled, you can preview projects with a package.json file and a main entry point inside the Web IDE.
An example package.json :
Interactive Web Terminals for the Web IDE
Moved from GitLab Ultimate to GitLab Free in 13.1.
Interactive Web Terminals give the project Maintainers user access to a terminal to interact with the runner directly from GitLab, including through the Web IDE.
Some things must be configured in the runner for the interactive web terminal to work:
- The runner needs to have [session_server] configured properly. This section requires at least a session_timeout value (which defaults to 1800 seconds) and a listen_address value. If advertise_address is not defined, listen_address is used.
- If you are using a reverse proxy with your GitLab instance, web terminals must be enabled.
If you have the terminal open and the job has finished with its tasks, the terminal blocks the job from finishing for the duration configured in [session_server].session_timeout until you close the terminal window.
NOTE: Not all executors are supported. The File Sync feature is supported on Kubernetes runners only.
Web IDE configuration file
To enable the Web IDE terminals you must create the file .gitlab/.gitlab-webide.yml inside the repository's root. This file is fairly similar to the CI configuration file syntax but with some restrictions:
- No global blocks (such as before_script or after_script ) can be defined.
- Only one job named terminal can be added to this file.
- Only the keywords image , services , tags , before_script , script , and variables are allowed to be used to configure the job.
- To connect to the interactive terminal, the terminal job must be still alive and running, otherwise the terminal cannot connect to the job's session. By default the script keyword has the value sleep 60 to prevent the job from ending and giving the Web IDE enough time to connect. This means that, if you override the default script value, you have to add a command which would keep the job running, like sleep .
In the code below there is an example of this configuration file:
After the terminal has started, the console is displayed and we could access the project repository files.
When you use the image keyword, a container with the specified image is created. If you specify an image, it has no effect. This is the case when you use the shell executor.
Important. The terminal job is branch dependent. This means that the configuration file used to trigger and configure the terminal is the one in the selected branch of the Web IDE.
If there is no configuration file in a branch, an error message is shown.
Running interactive terminals in the Web IDE
If Interactive Terminals are available for the current user, the Terminal button is visible in the right sidebar of the Web IDE. Click this button to open or close the terminal tab.
After opening, the tab shows the Start Web Terminal button. This button may be disabled if the environment is not configured correctly. If so, a status message describes the issue. Here are some reasons why Start Web Terminal may be disabled:
- .gitlab/.gitlab-webide.yml does not exist or is set up incorrectly.
- No active private runners are available for the project.
If active, clicking the Start Web Terminal button loads the terminal view and start connecting to the runner's terminal. At any time, the Terminal tab can be closed and reopened and the state of the terminal is not affected.
When the terminal is started and is successfully connected to the runner, then the runner's shell prompt appears in the terminal. From here, you can enter commands executed in the runner's environment. This is similar to running commands in a local terminal or through SSH.
While the terminal is running, it can be stopped by clicking Stop Terminal. This disconnects the terminal and stops the runner's terminal job. From here, click Restart Terminal to start a new terminal session.
File syncing to web terminal
-
in GitLab 12.0. from GitLab Ultimate to GitLab Free in 13.1.
File changes in the Web IDE can be synced to a running web terminal. This enables users to test their code changes in a preconfigured terminal environment.
NOTE: Only file changes in the Web IDE are synced to the terminal. Changes made in the terminal are not synced to the Web IDE. This feature is only available for Kubernetes runners.
To enable file syncing to the web terminal, the .gitlab/.gitlab-webide.yml file needs to have a webide-file-sync service configured. Here is an example configuration for a Node JS project which uses this service:
- The webide-file-sync executable must start after the project directory is available. This is why we must add sleep 5 to the command . See this issue for more information.
- $CI_PROJECT_DIR is a predefined CI/CD variable for GitLab Runners. This is where your project's repository resides.
After you have configured the web terminal for file syncing, then when the web terminal is started, a Terminal status is visible in the status bar.
Changes made to your files via the Web IDE sync to the running terminal when:
- Control + S (or Command + S on Mac) is pressed while editing a file.
- You select any area outside the file editor after editing a file.
- A file or folder is created, deleted, or renamed.
The Web IDE has a few limitations:
Interactive Terminals is in a beta phase and continues to be improved in upcoming releases. In the meantime, the user is limited to having only one active terminal at a time.
LFS files can be rendered and displayed but they cannot be updated and committed using the Web IDE. If an LFS file is modified and pushed to the repository, the LFS pointer in the repository is overwritten with the modified LFS file content.
В первом релизе 2018 года мы внесли улучшения в процессы планирования, тестирования, развертывания и работы с мерж-реквестами. Кроме того, в данный релиз включены новые возможности тестирования безопасности, а также первая версия Web IDE, который является частью нашего амбициозного проекта Complete DevOps.
Commit changes
- Introduced in GitLab Ultimate 10.4.
- Moved to GitLab Free in 10.7.
- From GitLab 12.7 onward, files were automatically staged.
- From GitLab 12.9 onward, support for staging files was removed to prevent loss of unstaged data. All your current changes necessarily have to be committed or discarded.
After making your changes, click the Commit button on the bottom-left to review the list of changed files.
After you have finalized your changes, you can add a commit message, commit the changes and directly create a merge request. In case you don't have write access to the selected branch, you see a warning, but can still create a new branch and start a merge request.
To discard a change in a particular file, click the Discard changes button on that file in the changes tab. To discard all the changes, click the trash icon on the top-right corner of the changes sidebar.
View CI job logs
You can use the Web IDE to quickly fix failing tests by opening the branch or merge request in the Web IDE and opening the logs of the failed job. You can access the status of all jobs for the most recent pipeline and job traces for the current commit by clicking the Pipelines button in the top right.
The pipeline status is also shown at all times in the status bar in the bottom left.
Markdown editing
- Markdown preview introduced in GitLab Free 10.7.
- Support for pasting images introduced in GitLab Free 13.1.
When you edit Markdown files in the Web IDE, you can preview your changes by clicking the Preview Markdown tab above the file editor. The Markdown preview supports GitLab Flavored Markdown.
You can also upload any local images by pasting them directly in the Markdown file. The image is uploaded to the same directory and is named image.jpg by default. If another file already exists with the same name, a numeric suffix is automatically added to the filename.
Web IDE configuration file
In order to enable the Web IDE terminals you need to create the file .gitlab/.gitlab-webide.yml inside the repository's root. This file is fairly similar to the CI configuration file syntax but with some restrictions:
- No global blocks can be defined (ie: before_script or after_script )
- Only one job named terminal can be added to this file.
- Only the keywords image , services , tags , before_script , script , and variables are allowed to be used to configure the job.
- To connect to the interactive terminal, the terminal job must be still alive and running, otherwise the terminal won't be able to connect to the job's session. By default the script keyword has the value sleep 60 to prevent the job from ending and giving the Web IDE enough time to connect. This means that, if you override the default script value, you'll have to add a command which would keep the job running, like sleep .
In the code below there is an example of this configuration file:
Once the terminal has started, the console will be displayed and we could access the project repository files.
Important. The terminal job is branch dependent. This means that the configuration file used to trigger and configure the terminal will be the one in the selected branch of the Web IDE.
If there is no configuration file in a branch, an error message will be shown.
Switching branches
To switch between branches of the current project repository, click the dropdown in the top of the sidebar to open a list of branches. You need to commit or discard all your changes before switching to a different branch.
Поддержка GitLab Geo для HA теперь общедоступна (EEP)
В GitLab 10.2 и Geo, и Postgres HA по отдельности стали общедоступными, но использовать Geo вместе с HA можно было только в бета-версии.
Конфигурации, использующие GitLab Geo вместе с HA теперь общедоступны. Это позволит распределенным командам наслаждаться повышенной скоростью fetch-операций Git при использовании GitLab Geo и избыточности высокодоступных конфигураций.
Limitations
Interactive Terminals is in a beta phase and will continue to be improved upon in upcoming releases. In the meantime, please note that the user is limited to having only one active terminal at a time.
Switching merge requests
To switch between your authored and assigned merge requests, click the dropdown in the top of the sidebar to open a list of merge requests. You will need to commit or discard all your changes before switching to a different merge request.
Command palette
You can see all available commands for manipulating editor content by pressing the F1 key when the editor is in focus. After that, the editor displays a complete list of available commands for manipulating editor content. The editor supports commands for multi-cursor editing, code block folding, commenting, searching and replacing, navigating editor warnings and suggestions, and more.
Some commands have a keyboard shortcut assigned to them. The command palette displays this shortcut next to each command. You can use this shortcut to invoke the command without having to select it in the command palette.
MVP месяца — George Tsiolis
George присоединился к работе над GitLab только с прошлой версии и на протяжении последнего месяца внес серьезный вклад в улучшение интерфейса, добавив семь мерж-реквестов, в том числе фиксы иконок боковой панели и иерархии списков в пользовательских настройках.
Спасибо George за его внимательность и работу!
Улучшения производительности (CE, EES, EEP)
В GitLab 10.4 мы ввели улучшения производительности для задач, мерж-реквестов, репозиториев и API. Наиболее заслуживающие внимания из них:
Подробные release notes и инструкции по обновлению/установке можно прочитать в оригинальном англоязычном посте: GitLab 10.4 released with Dynamic Application Security Testing and Web IDE (beta).
Please submit issues to corresponding projects, that'll help us make issues tracking easier so that we can provide timely help to you. Submit frontend issues at WebIDE-Frontend and backend issues at WebIDE-Backend.
This is the entry point to setup and run the WebIDE Community Edition project. It includes other 3 repos as git submodules.
-
contains frontend code. packs frontend to webjar. contains backend code.
WebIDE Frontend require node v6.x as build environment (this will save you from alot of weird errors). We recommend yarn for package management, webpack and babel is used for building.
Frontend Webjars & WebIDE Backend use maven3 and java8.
The project requires at minimum 512MB memory to run. Please ensure you have corresponding tools installed in your environment before build and run the project.
Init and pull submodules:
This will also clone the other 3 repos via git submodule mechanism.
We provide a shell script ide.sh to ease the process for you.
Server runs on port 8080 by default, visit localhost:8080 to check it out.
backend/src/main/resources/application.properties contains configurations of user, project, database, etc., you can change these parameters to meet your need:
- SPACE_HOME: path to your workspace directory, default to ~/.coding-ide/workspace
- server.port: backend server port
- USERNAME: username, used by git as its user.name config when commit, defaults to "coding"
- EMAIL: email, used by git as its user.email config when commit, defaults to "coding@coding.net"
- AVATAR: user's avatar
- CODING_IDE_HOME: path to store WebIDE application's data, default to ~/.coding-ide
If changed, restart the application to let your configurations take effect. Note that changes on USERNAME , EMAIL WILL NOT apply to workspaces that are already created.
The Web Integrated Development Environment (IDE) editor makes it faster and easier to contribute changes to your projects by providing an advanced editor with commit staging.
Редактор Web IDE (бета-версия) (EEU)
В GitLab 10.4 мы вводим бета-версию нового редактора Web IDE, с помощью которого можно будет проще и быстрее вносить небольшие фиксы и реагировать на обратную связь в мерж-реквестах, благодаря исчезновению необходимости stash’а изменений и локального переключения между ветками.
В будущих релизах мы планируем усилить интеграцию Web IDE с мерж-реквестами, улучшить функциональность коммита отдельных файлов, а также добавить превью и веб-терминал для того, чтобы каждый мог внести свой вклад.
Пока Web IDE находится в стадии ранней беты, доступ к нему опционален. Чтобы получить его, зайдите в ваш профиль, далее Settings > Preferences, подключите Web IDE и нажмите Save.
Запуск запланированного конвейера вручную (CE, EES, EEP)
Запланированные конвейеры очень удобны для запуска повторяющихся работ без участия пользователя. Обычно их используют для выполнения задач сопровождения или для создания ночных сборок вашего софта. Но иногда такие задачи необходимо выполнить немедленно и вручную, а создавать идентичное окружение (например, добавляя кастомные переменные) может быть тяжело и затратно по времени.
GitLab 10.4 дает возможность запускать запланированный конвейер вручную, прямо из веб-интерфейса: вы найдете кнопку «play» в каждом расписании в списке — и запустить конвейер можно будет всего одним кликом.
Enabling Live Preview
After you have done that, you can preview projects with a package.json file and a main entry point inside the Web IDE. An example package.json is shown below.
Open the Web IDE
You can open the Web IDE when viewing a file, from the repository file list, and from merge requests.
GitLab Runner 10.4 (CE, EES, EEP)
Также в этом релизе мы выпускаем GitLab Runner 10.4! GitLab Runner — проект с открытым исходным кодом, который используется для запуска работ CI/CD и отправления результатов обратно в GitLab.
Самые важные изменения:
Полный список изменений вы найдете в CHANGELOG GitLab Runner
Live Preview
- Introduced in GitLab Free 11.2.
- Renamed from Client Side Evaluation to Live Preview in GitLab 13.0.
You can use the Web IDE to preview JavaScript projects right in the browser. This feature uses CodeSandbox to compile and bundle the JavaScript used to preview the web application.
Additionally, for public projects an Open in CodeSandbox button is available to transfer the contents of the project into a public CodeSandbox project to quickly share your project with others.
Predefined schemas
The Web IDE has validation for certain files built in. This feature is only supported for the *.gitlab-ci.yml files.
Enable or disable validation based on predefined schemas (FREE SELF)
Validation based on predefined schemas is under development and not ready for production use. It is deployed behind a feature flag that is disabled by default for self-managed instances, GitLab administrators with access to the GitLab Rails console can enable it for your instance.
Простое развертывание Prometheus на Kubernetes (CE, EES, EEP)
В данном релизе стало возможным проводить развертывание Prometheus в подключенный кластер Kubernetes в один клик, благодаря чему начать отслеживать производительность вашего приложения становится просто как никогда. Системные метрики, такие как использование процессора и памяти, передаются из Kubernetes автоматически, а ответные метрики, такие как задержка и пропускная способность доступны через NGINX ingress. Для того, чтобы начать, подключите кластер в CI/CD > Clusters .
Если у GitLab есть сетевой доступ к Prometheus, можно подключить интеграцию с Prometheus для анализа и отображения этих метрик прямо в GitLab. В следующем релизе, GitLab 10.5, интеграция будет подключена автоматически. Также она не будет требовать прямого доступа к сети, что сделает интеграцию еще более гладкой.
Кластеры GitLab теперь общедоступны (CE, EES, EEP)
Мы с гордостью сообщаем, что в версии GitLab 10.4 интеграция с кластером Kubernetes стала общедоступна. Вы можете присоединить ваши существующие кластеры к вашему проекту или создать новые с помощью Google Kubernetes
Engine (GKE) парой кликов мыши на новой странице кластеров в разделе CI/CD.Старый сервис интеграции с Kubernetes все еще доступен, но его использование возможно, только если он был включен до обновления GitLab до 10.4. В следующих релизах существующие данные будут перенесены на новую страницу кластеров, а страница интеграции в конечном итоге будет удалена. Шаблоны сервиса, доступные из зоны администратора, работают как и прежде.
Limitations
The Web IDE has a few limitations:
Interactive Terminals is in a beta phase and continues to be improved in upcoming releases. In the meantime, please note that the user is limited to having only one active terminal at a time.
LFS files can be rendered and displayed but they cannot be updated and committed using the Web IDE. If an LFS file is modified and pushed to the repository, the LFS pointer in the repository is overwritten with the modified LFS file content.
The Web IDE editor makes it faster and easier to contribute changes to your projects by providing an advanced editor with commit staging.
Switching merge requests
To switch between your authored and assigned merge requests, click the dropdown in the top of the sidebar to open a list of merge requests. You need to commit or discard all your changes before switching to a different merge request.
File syncing to web terminal
File changes in the Web IDE can be synced to a running web terminal. This enables users to test their code changes in a preconfigured terminal environment.
NOTE: Only file changes in the Web IDE are synced to the terminal. Changes made in the terminal are not synced to the Web IDE. This feature is only available for Kubernetes runners.
To enable file syncing to the web terminal, the .gitlab/.gitlab-webide.yml file needs to have a webide-file-sync service configured. Here is an example configuration for a Node JS project which uses this service:
- The webide-file-sync executable must start after the project directory is available. This is why we need to add sleep 5 to the command . See this issue for more information.
- $CI_PROJECT_DIR is a predefined CI/CD variable for GitLab Runners. This is where your project's repository resides.
After you have configured the web terminal for file syncing, then when the web terminal is started, a Terminal status is visible in the status bar.
Changes made to your files via the Web IDE sync to the running terminal when:
- Control + S (or Command + S on Mac) is pressed while editing a file.
- Anything outside the file editor is clicked after editing a file.
- A file or folder is created, deleted, or renamed.
Не пропустите новые возможности
Также в этом месяце мы внесли множество улучшений в эпики, мерж-реквесты, мониторинг, Geo, Runner, Git LFS, SSH и Auto DevOps.
Далее в статье мы подробнее остановимся на этих и других нововведениях GitLab 10.4.
Улучшения Omnibus (CE, EES, EEP)
- GitLab Mattermost обновился до версии 4.5, включающей плагин Zoom для видео, аудио, расшаривания экрана и многого другого
- Сертификаты CA обновлены до 2017.09.20
- GitLab Monitor обновлен до 2.4.0
- Ruby обновлен до 2.3.6
- Библиотеки, основанные на Go — Registry, Workhorse и Prometheus — теперь собираются с Go версии 1.9.2
Динамическое тестирование безопасности приложений (DAST) (EEU)
Проведение статических проверок кода — первый шаг к обнаружению потенциальных уязвимостей в его безопасности. Однако, после развертывания ваше приложение подвергается риску другой категории атак, например, с использованием межсайтовых скриптов или ненадежной аутентификации.
Мы продолжаем работу над автоматическим обнаружением проблем безопасности и добавляем в GitLab 10.4 систему динамического тестирования безопасности приложений (Dynamic Application Security Testing (DAST)). С ее помощью можно проверить живую версию приложения (например, Review App, созданный в предыдущей работе) прямо из конвейера CI/CD. Начиная с GitLab 10.4.1 Auto DevOps будет автоматически запускать DAST для Review Apps ваших приложений.
Reviewing changes
Before you commit your changes, you can compare them with the previous commit by switching to the review mode or selecting the file from the list of changes.
An additional review mode is available when you open a merge request, which shows you a preview of the merge request diff if you commit your changes.
Running interactive terminals in the Web IDE
If Interactive Terminals are available for the current user, the Terminal button is visible in the right sidebar of the Web IDE. Click this button to open or close the terminal tab.
After opening, the tab shows the Start Web Terminal button. This button may be disabled if the environment is not configured correctly. If so, a status message describes the issue. Here are some reasons why Start Web Terminal may be disabled:
- .gitlab/.gitlab-webide.yml does not exist or is set up incorrectly.
- No active private runners are available for the project.
If active, clicking the Start Web Terminal button loads the terminal view and start connecting to the runner's terminal. At any time, the Terminal tab can be closed and reopened and the state of the terminal is not affected.
When the terminal is started and is successfully connected to the runner, then the runner's shell prompt appears in the terminal. From here, you can enter commands executed in the runner's environment. This is similar to running commands in a local terminal or through SSH.
While the terminal is running, it can be stopped by clicking Stop Terminal. This disconnects the terminal and stops the runner's terminal job. From here, click Restart Terminal to start a new terminal session.
File syncing to web terminal
File changes in the Web IDE can be synced to a running web terminal. This enables users to test their code changes in a preconfigured terminal environment.
NOTE: Note: Only file changes in the Web IDE are synced to the terminal. Changes made in the terminal are not synced to the Web IDE. This feature is only available for Kubernetes Runners.
To enable file syncing to the web terminal, the .gitlab/.gitlab-webide.yml file needs to have a webide-file-sync service configured. Here is an example configuration for a Node JS project which uses this service:
- The webide-file-sync executable must start after the project directory is available. This is why we need to add sleep 5 to the command . See this issue for more info.
- $CI_PROJECT_DIR is a predefined environment variable for GitLab Runners. This is where your project's repository will be.
Once you have configured the web terminal for file syncing, then when the web terminal is started, a Terminal status will be visible in the status bar.
Changes made to your files via the Web IDE will sync to the running terminal when:
- Ctrl + S (or Cmd + S on Mac) is pressed while editing a file.
- Anything outside the file editor is clicked after editing a file.
- A file or folder is created, deleted, or renamed.
API эпиков (EEU)
Начиная с данной версии, GitLab API поддерживает эпики. Теперь вы можете управлять отдельными эпиками, их списками и всеми их атрибутами (название, описание и даты) через API, что позволит вашей команде создавать кастомные и/или автоматизированные рабочие процессы вне GitLab.
Также поддерживается управление списками задач эпика, в том числе изменение порядка их отображения.
SAST для контейнеров Docker (EEU)
При запуске приложений из контейнеров, их код отделяется от кода остальных контейнеров на том же хосте, что повышает их безопасность. Однако даже в таких случаях безопасность приложения может подвергаться угрозам из-за проблем в среде, на которой оно запущено (например, уязвимые системные библиотеки).
В GitLab 10.4 добавлена возможность проведения проверок безопасности образа, в котором содержится ваше приложение, перед мержем изменений в стабильную ветку. Если по результатам этой проверки найдены проблемы безопасности, соответствующие предупреждения отображаются в мерж-реквесте. Такие проверки являются частью Auto DevOps.
Улучшена панель производительности окружения (CE, EES, EEP)
В GitLab 10.4 мы улучшили интерфейс панели производительности окружения,
которая отображает системные метрики, получаемые с помощью Prometheus.Раньше при отслеживании метрик на определенный момент времени они находились в описании графика. Теперь эти метрики четко показаны в ховере. В следующем релизе мы добавим в описание графика общие метрики, отображая статистику вроде максимальной пропускной способности или средней задержки за определенный промежуток времени.
Interactive Web Terminals for the Web IDE (ULTIMATE ONLY)
CAUTION: Warning: Interactive Web Terminals for the Web IDE is currently in Beta. Shared Runners do not yet support Interactive Web Terminals, so you would need to use your own private Runner(s) to make use of this feature.
Interactive Web Terminals give the project Maintainers user access to a terminal to interact with the Runner directly from GitLab, including through the Web IDE.
Switching branches
To switch between branches of the current project repository, click the dropdown in the top of the sidebar to open a list of branches. You will need to commit or discard all your changes before switching to a different branch.
Очистка кэша Runner (CE, EES, EEP)
GitLab Runner использует кэш для того, чтобы ускорить исполнение за счет переиспользования существующих данных между разными работами. Но иногда это ведет к противоречивому поведению, например, когда одна работа изменяет локальную копию репозитория, и эти изменения влияют на работу следующей.
В GitLab 10.4 мы представляем новую кнопку на странице конвейеров, по нажатию на которую очищается существующий кэш для конкретного проекта, и новый начнется со свежим. Это решает проблему «грязного» запуска.
Ускорение редактирования
Правило двух минут от Getting Things Done гласит: если вы можете сделать что-то за две минуты, сделайте это сейчас. Написание небольшого фикса или исправление опечатки не должно занимать много времени, однако такое редко происходит, когда нужно делать stash изменений и переключаться на другой контекст.
Излишние временные затраты при работе с фиксами негативно влияют на время цикла, что особенно заметно в географически распределенных командах — избегание git stash может привести к целым дням задержки. Новый редактор, который является первым релизом GitLab Web IDE упрощает работу с такими изменениями из интерфейса GitLab.
File finder
The file finder allows you to quickly open files in the current branch by searching. The file finder is launched using the keyboard shortcut Command-p , Control-p , or t (when editor is not in focus). Type the filename or file path fragments to start seeing results.
Configure the Web IDE
The Web IDE supports configuration of certain editor settings by using .editorconfig files. When opening a file, the Web IDE looks for a file named .editorconfig in the current directory and all parent directories. If a configuration file is found and has settings that match the file's path, these settings are enforced on the opened file.
The Web IDE currently supports the following .editorconfig settings:
- indent_style
- indent_size
- end_of_line
- trim_trailing_whitespace
- tab_width
- insert_final_newline
Themes
- Introduced in GitLab 13.0.
- Full Solarized Dark Theme introduced in GitLab 13.1.
- Full Solarized Light and Monokai Themes introduced in GitLab 13.6.
All the themes GitLab supports for syntax highlighting are applied to the Web IDE's entire screen. You can pick a theme from your profile preferences.
Solarized Dark Theme Dark Theme API групповых досок задач (EEP)
Начиная с данного релиза стало возможным управлять групповыми досками задач через API таким же образом, как и проектными досками задач. Это нововведение добавляет новые возможности автоматизации и повышает гибкость управления рабочими процессами вашей команды.
К примеру, у некоторых команд есть бизнес требования по автоматическому перемещению задач между рядами доски в ответ на выполнение определенных условий. Теперь это можно настроить и для групповых досок задач через API.
Иконка статуса для файлов, отслеживаемых LFS (CE, EES, EEP)
Определяйте, какие файлы отслеживаются Git LFS, с помощью новой иконки статуса отслеживания LFS. Эта иконка отображается в блобах и в списках файлов, включая список изменений мерж-реквестов. Это дает возможность проверять, корректно ли LFS отслеживает бинарные файлы при просмотре мерж-реквеста.
Custom schemas (PREMIUM)
The Web IDE also allows you to define custom schemas for certain JSON/YAML files in your project. You can do so by defining a schemas entry in the .gitlab/.gitlab-webide.yml file inside the repository's root. Here is an example configuration:
Each schema entry supports two properties:
- uri : please provide an absolute URL for the schema definition file here. The schema from this URL is loaded when a matching file is open.
- match : a list of matching paths or glob expressions. If a schema matches a particular path pattern, it is applied to that file. Please enclose the pattern in quotes if it begins with an asterisk ( * ), it's be applied to that file. If a pattern begins with an asterisk ( * ), enclose it in quotation marks. Otherwise, the configuration file is not valid YAML.
Enabling Client Side Evaluation
Once you have done that, you can preview projects with a package.json file and a main entry point inside the Web IDE. An example package.json is shown below.
Тестирование производительности браузера теперь включено в Auto DevOps (EEP)
В прошлой версии мы добавили тестирование производительности браузера, чтобы легко определять влияние изменений на производительность веб-приложений, перед выполнением мержа. Чтобы использовать эту возможность, необходимо было добавить дополнительную работу
в .gitlab-ci.yml и адаптировать ее под ваши нужды.В GitLab 10.4 тестирование производительности браузера включено в Auto DevOps, что предоставляет автоматическую аналитику производительности корневой страницы с без какой-либо настройки.
Если вы хотите тестировать дополнительные страницы, просто добавьте соответствующие пути в файл .gitlab-urls.txt в корневой директории репозитория.
Быстрый поиск ключа SSH в CE (CE, EES, EEP)
При авторизации пользователя OpenSSH использует линейный поиск, чтобы найти ключ. Это значит, что SSH операции становятся медленнее, когда растет число пользователей инстанса GitLab. Для больших инстансов при выполнении запроса может потребоваться значительное время и высокая скорость записи на диск, что замедлит использование Git по SSH.
В GitLab 9.3 в GitLab EE был добавлен быстрый поиск ключа SSH. Это позволяет пользователям авторизоваться с помощью быстрого индексированного поиска в базе данных GitLab вместо медленного линейного поиска, который был по умолчанию. GitLab CE делается для небольших команд, поэтому предыдущие версии не включали эту оптимизацию. Однако, для поддержки Cloud Native Helm Charts в GitLab, все части кода должны поддерживать быстрый поиск ключей SSH — поэтому мы добавили эту возможность и в GitLab CE.
Commit changes
- Introduced in GitLab Ultimate 10.4 and brought to GitLab Core in 10.7.
- From GitLab 12.7 onwards, files were automatically staged.
- From GitLab 12.9 onwards, support for staging files was removed to prevent loss of unstaged data. All your current changes necessarily have to be committed or discarded.
After making your changes, click the Commit button on the bottom-left to review the list of changed files.
Once you have finalized your changes, you can add a commit message, commit the changes and directly create a merge request. In case you don't have write access to the selected branch, you will see a warning, but still be able to create a new branch and start a merge request.
To discard a change in a particular file, click the Discard changes button on that file in the changes tab. To discard all the changes, click the trash icon on the top-right corner of the changes sidebar.
Open the Web IDE
You can open the Web IDE when viewing a file, from the repository file list, and from merge requests.
Тестирование безопасности
Частью Complete Devops является поддержание мощных инструментов безопасности. С прошлым релизом мы выпустили статическое тестирование безопасности приложений, а в этом мы продолжаем расширять возможности безопасности, добавляя статическое тестирование для контейнеров Docker и динамическое тестирование безопасности приложений (Dynamic Application Security Testing (DAST)).
Поддержка openSUSE Leap 42.3 (CE, EES, EEP)
С выходом GitLab 10.4 пакеты Omnibus теперь доступны для openSUSE 42.3.
Этот релиз будет последним с поддержкой openSUSE 42.2, поскольку она официально прекращена.
Сортировка списка задач в эпиках (EEU)
Эпики позволяют вам управлять набором задач, связанных общей темой. Зачастую эпик связан с разработкой большой функциональности, разделенной на несколько задач, работа над которыми ведется параллельно на множестве майлстоунов.
Сортировка списка задач в эпике может выполняться по различным критериям, в зависимости от рабочего процесса организации. Такими критериями могут быть приоритет, сложность, выполнимость (feasibility) или порядок выполнения.
В одних организациях закрытые задачи предпочитают видеть в начале списка, а в других — в конце. В данном релизе мы добавляем возможность менять порядок задач, просто перетягивая их в списке на нужное место — так же как и в досках задач.
Web IDE configuration file
In order to enable the Web IDE terminals you need to create the file .gitlab/.gitlab-webide.yml inside the repository's root. This file is fairly similar to the CI configuration file syntax but with some restrictions:
- No global blocks (such as before_script or after_script ) can be defined.
- Only one job named terminal can be added to this file.
- Only the keywords image , services , tags , before_script , script , and variables are allowed to be used to configure the job.
- To connect to the interactive terminal, the terminal job must be still alive and running, otherwise the terminal cannot connect to the job's session. By default the script keyword has the value sleep 60 to prevent the job from ending and giving the Web IDE enough time to connect. This means that, if you override the default script value, you have to add a command which would keep the job running, like sleep .
In the code below there is an example of this configuration file:
After the terminal has started, the console is displayed and we could access the project repository files.
Important. The terminal job is branch dependent. This means that the configuration file used to trigger and configure the terminal is the one in the selected branch of the Web IDE.
If there is no configuration file in a branch, an error message is shown.
View CI job logs
You can use the Web IDE to quickly fix failing tests by opening the branch or merge request in the Web IDE and opening the logs of the failed job. You can access the status of all jobs for the most recent pipeline and job traces for the current commit by clicking the Pipelines button in the top right.
The pipeline status is also shown at all times in the status bar in the bottom left.
Перебазирование и перемотка в CE (CE, EES, EEP)
В GitLab CE стало возможным делать перебазирование (rebase) и перемотку (fast-forward) мержа прямо из интерфейса мерж-реквеста. Теперь для этого не нужно переключаться между GitLab и командной строкой; все это можно сделать внутри GitLab.
Ранее эта функциональность была доступна только в EE. Мы добавили ее в CE как следствие добавления GNOME в GitLab CE.
File finder
The file finder allows you to quickly open files in the current branch by searching for fragments of the file path. The file finder is launched using the keyboard shortcut Command + p , Control + p , or t (when editor is not in focus). Type the filename or file path fragments to start seeing results.
Schema based validation
The Web IDE provides validation support for certain JSON and YAML files using schemas based on the JSON Schema Store.
Reviewing changes
Before you commit your changes, you can compare them with the previous commit by switching to the review mode or selecting the file from the list of changes.
An additional review mode is available when you open a merge request, which shows you a preview of the merge request diff if you commit your changes.
Running interactive terminals in the Web IDE
If Interactive Terminals are available for the current user, the Terminal button will be visible in the right sidebar of the Web IDE. Click this button to open or close the terminal tab.
Once open, the tab will show the Start Web Terminal button. This button may be disabled if the environment is not configured correctly. If so, a status message will describe the issue. Here are some reasons why Start Web Terminal may be disabled:
- .gitlab/.gitlab-webide.yml does not exist or is set up incorrectly.
- No active private runners are available for the project.
If active, clicking the Start Web Terminal button will load the terminal view and start connecting to the runner's terminal. At any time, the Terminal tab can be closed and reopened and the state of the terminal will not be affected.
When the terminal is started and is successfully connected to the runner, then the runner's shell prompt will appear in the terminal. From here, you can enter commands that will be executed within the runner's environment. This is similar to running commands in a local terminal or through SSH.
While the terminal is running, it can be stopped by clicking Stop Terminal. This will disconnect the terminal and stop the runner's terminal job. From here, click Restart Terminal to start a new terminal session.
Interactive Web Terminals for the Web IDE
Interactive Web Terminals give the project Maintainers user access to a terminal to interact with the runner directly from GitLab, including through the Web IDE.
Runner configuration
Some things need to be configured in the runner for the interactive web terminal to work:
- The Runner needs to have [session_server] configured properly.
- If you are using a reverse proxy with your GitLab instance, web terminals need to be enabled. (ULTIMATE ONLY)
If you have the terminal open and the job has finished with its tasks, the terminal will block the job from finishing for the duration configured in [session_server].terminal_max_retention_time until you close the terminal window.
NOTE: Note: Not all executors are supported
Syntax highlighting
As expected from an IDE, syntax highlighting for many languages in the Web IDE makes your direct editing even easier.
The Web IDE currently provides:
Because the Web IDE is based on the Monaco Editor, you can find a more complete list of supported languages in the Monaco languages repository. Under the hood, Monaco uses the Monarch library for syntax highlighting.
If you are missing Syntax Highlighting support for any language, we prepared a short guide on how to add support for a missing language Syntax Highlighting.
Highlight lines
WebIDE is built with the Web Editor. This enables WebIDE to share the same core features for highlighting and linking to particular lines in the edited files described for the Web Editor.
Client Side Evaluation
You can use the Web IDE to preview JavaScript projects right in the browser. This feature uses CodeSandbox to compile and bundle the JavaScript used to preview the web application.
Additionally, for public projects an Open in CodeSandbox button is available to transfer the contents of the project into a public CodeSandbox project to quickly share your project with others.
Runner configuration
Some things need to be configured in the runner for the interactive web terminal to work:
- The runner needs to have [session_server] configured properly. This section requires at least a session_timeout value (which defaults to 1800 seconds) and a listen_address value. If advertise_address is not defined, listen_address is used.
- If you are using a reverse proxy with your GitLab instance, web terminals need to be enabled. (ULTIMATE SELF)
If you have the terminal open and the job has finished with its tasks, the terminal blocks the job from finishing for the duration configured in [session_server].session_timeout until you close the terminal window.
NOTE: Not all executors are supported. The File Sync feature is supported on Kubernetes runners only.
Syntax highlighting
As expected from an IDE, syntax highlighting for many languages within the Web IDE will make your direct editing even easier.
The Web IDE currently provides:
Because the Web IDE is based on the Monaco Editor, you can find a more complete list of supported languages in the Monaco languages repository.
NOTE: Note: Single file editing is based on the Ace Editor.
Читайте также: