# Testing a Phoenix application with GitLab CI/CD
> 原文:[https://docs.gitlab.com/ee/ci/examples/test_phoenix_app_with_gitlab_ci_cd/](https://docs.gitlab.com/ee/ci/examples/test_phoenix_app_with_gitlab_ci_cd/)
* [Introduction](#introduction)
* [What is Phoenix?](#what-is-phoenix)
* [What is Elixir?](#what-is-elixir)
* [Requirements](#requirements)
* [Create a new Phoenix project](#create-a-new-phoenix-project)
* [Initialize the PostgreSQL database](#initialize-the-postgresql-database)
* [Start Phoenix server](#start-phoenix-server)
* [Introducing GitLab CI/CD](#introducing-gitlab-cicd)
* [Adjusting Phoenix configuration](#adjusting-phoenix-configuration)
* [Testing](#testing)
* [Configuring CI/CD Pipeline](#configuring-cicd-pipeline)
* [Watching the build](#watching-the-build)
* [Conclusion](#conclusion)
* [References](#references)
# Testing a Phoenix application with GitLab CI/CD[](#testing-a-phoenix-application-with-gitlab-cicd "Permalink")
[Phoenix](https://www.phoenixframework.org/)是用[Elixir](https://s0elixir-lang0org.icopy.site)編寫的 Web 開發框架, [Elixir](https://s0elixir-lang0org.icopy.site)是在[Erlang VM](https://www.erlang.org)上運行的旨在提高生產力和可維護性的功能性語言. Erlang VM 確實非常快,并且可以處理大量同時用戶.
這就是為什么我們今天聽到太多有關 Phoenix 的原因.
在本教程中,我們將教您如何設置[GitLab CI / CD](../../README.html)來構建和測試 Phoenix 應用程序.
本教程假定您知道如何創建 Phoenix 應用程序,在本地運行測試以及如何使用 Git 和 GitLab UI.
## Introduction[](#introduction "Permalink")
### What is Phoenix?[](#what-is-phoenix "Permalink")
[Phoenix](https://www.phoenixframework.org/) is a web development framework written in [Elixir](https://s0elixir-lang0org.icopy.site). It’s useful for building fast, reliable, and high-performance applications, as it uses [Erlang VM](https://www.erlang.org).
許多組件和概念類似于 Ruby on Rails 或 Python 的 Django. 高開發人員生產率和高應用程序性能只是學習如何使用它的幾個優點. 使用 MVC 模式,它被設計為模塊化和靈活的. 易于維護不斷增長的應用程序是一個加號.
Phoenix 可以在任何支持 Erlang 的操作系統上運行:
* Ubuntu
* CentOS
* Mac OS X
* Debian
* Windows
* Fedora
* Raspberry Pi 操作系統
查看[Phoenix 學習指南](https://s0hexdocs0pm.icopy.site/phoenix/overview.html)以獲取更多信息.
### What is Elixir?[](#what-is-elixir "Permalink")
[Elixir](https://s0elixir-lang0org.icopy.site)是一種動態的,功能性的語言,旨在輕松地使用當今所有成熟的 Erlang(已有 30 年的歷史!). 它與 Ruby 有相似之處,特別是在語法上,因此 Ruby 開發人員對 Elixir 的快速增長感到非常興奮. 一個全棧的 Ruby 開發人員可以在短短幾周內學會如何使用 Elixir 和 Phoenix.
在藥劑我們有一個叫做命令`mix` ,這是一個幫助創建項目,測試,運行遷移和[更多](https://s0elixir-lang0org.icopy.site/getting-started/mix-otp/introduction-to-mix) . 我們將在本教程的后面部分中使用它.
查看[Elixir 文檔](https://s0elixir-lang0org.icopy.site/getting-started/introduction)以獲取更多信息.
## Requirements[](#requirements "Permalink")
要遵循本教程,您需要先安裝:
* Elixir [installation instructions](https://s0elixir-lang0org.icopy.site/install)
* Phoenix Framework [安裝說明](https://s0hexdocs0pm.icopy.site/phoenix/installation.html)
* PostgreSQL(如果需要使用 MySQL 服務器,請查看[Phoenix 說明](https://s0hexdocs0pm.icopy.site/phoenix/ecto.html) )
### Create a new Phoenix project[](#create-a-new-phoenix-project "Permalink")
打開終端,然后轉到要創建項目的目錄. 您無需為項目的文件創建一個空目錄,因為`mix`命令將為我們完成此操作.
當我們調用`mix`命令時,我們將傳遞兩個參數:
* 我們希望它運行的任務: `phoenix.new`
* 參數`phoenix.new`需要,這是新項目的名稱. 在這種情況下,我們稱其為`hello_gitlab_ci` ,但您可以自由設置自己的名稱:
```
mix phoenix.new hello_gitlab_ci
```
當詢問時,請回答`Y`以獲取并安裝依賴項.
如果一切順利,您將獲得如下輸出:
[](img/mix-phoenix-new.png)
現在,我們的項目位于目錄中,該目錄與傳遞給`mix`命令的名稱相同,例如`~/GitLab/hello_gitlab_ci` . 如果查看目錄,我們將看到 Phoenix 文件和運行所需的依賴項.
### Initialize the PostgreSQL database[](#initialize-the-postgresql-database "Permalink")
By default, Phoenix requires a PostgreSQL database to store whatever we need to store in our app. In this case, we’ll only create an empty database.
首先,我們需要導航到我們最近創建的項目的目錄,然后再次執行`mix` . 這次, `mix`將收到參數`ecto.create` ,這是創建新數據庫的任務. [Ecto](https://s0hexdocs0pm.icopy.site/ecto/Ecto.html)是 Elixir 的數據庫包裝器.
創建項目后第一次運行`mix`時,它將把我們的文件編譯為字節碼,然后由 Erlang VM 解釋. 在接下來的時間里,它只會編譯我們的更改.
運行以下命令以創建我們的空數據庫:
```
cd hello_gitlab_ci
mix ecto.create
```
我們希望在命令末尾看到以下輸出:
```
Generated hello_gitlab_ci app
The database for HelloGitlabCi.Repo has been created
```
> **注意:** Phoenix 假設我們的 PostgreSQL 數據庫將具有一個具有正確權限的`postgres`用戶帳戶和一個`postgres`密碼. 如果不是您的情況,請查看[Ecto 的說明](https://s0hexdocs0pm.icopy.site/ecto/Ecto.html) .
### Start Phoenix server[](#start-phoenix-server "Permalink")
現在,該看看我們到目前為止所做的一切是否進展順利. 我們將再次使用`phoenix.server`參數調用`mix` ,它將啟動 Phoenix 的 HTTP Server.
```
mix phoenix.server
```
這將是此命令的輸出:
```
[info] Running HelloGitlabCi.Endpoint with Cowboy using http://localhost:4000
23 May 11:44:35 - info: compiling
23 May 11:44:37 - info: compiled 6 files into 2 files, copied 3 in 9.8 sec
```
現在,我們的應用程序在本地運行. 我們可以直接在瀏覽器中預覽它. 讓我們打開[`localhost:4000`](http://localhost:4000)來查看我們的 Phoenix Framework 歡迎頁面. 如果鏈接不起作用,請改為打開[`127.0.0.1:4000`](http://127.0.0.1:4000) ,然后[`127.0.0.1:4000`](http://127.0.0.1:4000)操作系統配置為將`localhost`指向`127.0.0.1` .
[](img/mix-phoenix-server.png)
太好了,現在我們有一個本地 Phoenix Server 運行我們的應用程序.
在本地,我們的應用程序在[`iex`](https://s0elixir-lang0org.icopy.site/getting-started/introduction.html)會話中運行,該會話代表 Interactive Elixir. 在這種交互模式下,我們可以鍵入任何 Elixir 表達式并獲取其結果. 要退出`iex` ,我們需要按兩次`Ctrl+C` 因此,當我們需要停止 Phoenix 服務器時,我們必須`Ctrl+C`兩次`Ctrl+C`
## Introducing GitLab CI/CD[](#introducing-gitlab-cicd "Permalink")
借助 GitLab,我們可以在一個平臺上管理開發工作流程,提高生產力,跟蹤問題,執行代碼審查等. 使用 GitLab CI / CD,我們可以提高工作效率,因為每次我們或我們的同事發布任何代碼時,GitLab CI / CD 都會構建并測試更改,并實時告訴我們是否有任何問題.
當然,當我們的應用程序開始增長時,我們將需要更多的開發人員在同一個項目上工作,并且這種構建和測試過程很容易在沒有適當管理的情況下變得一團糟. 這也是為什么 GitLab CI / CD 對我們的應用如此重要的原因. 每當有人將其代碼推送到 GitLab 時,我們都會很快知道他們的更改是否破壞了某些內容. 我們不需要停止所做的一切工作,就可以手動進行測試,而無需在團隊中進行任何更改.
讓我們在實踐中看一下.
## Adjusting Phoenix configuration[](#adjusting-phoenix-configuration "Permalink")
現在,我們需要在配置 GitLab CI / CD 之前調整 Phoenix 配置. Phoenix 項目中有一個目錄( `config` ),其中包含可以運行的每個環境的配置文件. 由于我們將在單個環境中工作,因此我們將僅編輯測試配置文件( `test.exs` ).
但是,為什么我們需要調整配置? 好吧,GitLab CI / CD 使用 Docker 技術在一個稱為[Runner 的](../../runners/README.html)隔離虛擬機中構建和測試我們的代碼. 在此 Runner 中,GitLab CI / CD 可以訪問 Phoenix 應用程序需要運行的所有內容,就像在`localhost` ,但是我們必須告訴 GitLab CI / CD 使用系統變量在哪里創建和找到該數據庫. 這樣,GitLab CI / CD 將在 Runner 內部創建測試數據庫,就像在`localhost`運行 Phoenix 時一樣.
* 在您喜歡的代碼編輯器上打開`hello_gitlab_ci/config/test.exs`
* 轉到" **配置數據庫**會話"并編輯該塊以包含`System.get_env` :
```
# Configure your database
config :hello_gitlab_ci, HelloGitlabCi.Repo,
adapter: Ecto.Adapters.Postgres,
username: System.get_env("POSTGRES_USER") || "postgres",
password: System.get_env("POSTGRES_PASSWORD") || "postgres",
database: System.get_env("POSTGRES_DB") || "hello_gitlab_ci_test",
hostname: System.get_env("POSTGRES_HOST") || "localhost",
pool: Ecto.Adapters.SQL.Sandbox
```
稍后我們將需要這些系統變量.
* 在`hello_gitlab_ci/priv/repo/migrations`創建一個名為`.gitkeep`的空文件
由于我們的項目仍然很新鮮,因此我們的數據庫上沒有任何數據,因此`migrations`目錄將為空. 如果沒有`.gitkeep` ,Git 將不會上傳該空目錄,并且在 GitLab 上運行測試時會出現錯誤.
> **注意:**如果我們通過 GitLab UI 添加文件夾,則 GitLab 本身會將`.gitkeep`添加到該新目錄中.
現在,讓我們運行一個本地測試,看看我們所做的一切是否都沒有破壞任何東西.
## Testing[](#testing "Permalink")
之前,當我們創建項目時,我們運行了`mix phoenix.new` . 該任務創建了 Phoenix 應用程序所需的所有內容,包括一些進入`hello_gitlab_ci/test`目錄的單元測試.
讓我們運行帶有`mix`的新任務來為我們運行這些測試. 這次,預期的參數是`test` . 我們可以添加`--trace`參數以進行調試.
在您的終端中,導航到目錄`hello_gitlab_ci`并運行:
```
mix test
```
我們的預期結果是:
```
....
Finished in 0.7 seconds
4 tests, 0 failures
Randomized with seed 610000
```
我們的測試成功了. 是時候將我們的文件推送到 GitLab 了.
## Configuring CI/CD Pipeline[](#configuring-cicd-pipeline "Permalink")
第一步是在我們項目的`hello_gitlab_ci`目錄中創建一個名為`.gitlab-ci.yml`的新文件.
* 最簡單的方法是單擊項目主頁上的" **設置 CI / CD** ":
[](img/set_up_ci_v12_6.png)
* 在下一個屏幕上,我們可以使用已包含 Elixir 測試的模板. 單擊" **應用模板",**然后選擇**Elixir** :
[](img/select_template_v12_6.png)
該模板文件告訴 GitLab CI / CD 每次新的提交時我們希望做什么. 但是,我們必須對其稍作調整才能運行 Phoenix 應用程序.
* The first line tells GitLab what Docker image will be used.
還記得我們了解 Runners 時,GitLab CI / CD 在其中構建和測試我們的應用程序的隔離虛擬機嗎? 該虛擬機必須具有所有依賴關系才能運行我們的應用程序. 這是需要 Docker 映像的地方. 正確的圖像將為我們提供整個系統.
當我們專注于測試(而不是部署)時,可以使用[elixir:latest](https://hub.docker.com/_/elixir) Docker 映像,該映像已經具有用于運行 Phoenix 測試的依賴項,例如 Elixir 和 Erlang:
```
image: elixir:latest
```
* 我們將僅使用`postgres` ,因此我們可以從`services`部分刪除`mysql`和`redis`行:
```
services:
- postgres:latest
```
* 現在,我們將在`before_script`部分之前創建一個名為`variables`的新部分:
```
variables:
POSTGRES_DB: hello_gitlab_ci_test
POSTGRES_HOST: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: "postgres"
MIX_ENV: "test"
```
上面,我們設置了 GitLab CI / CD 的值以驗證到 PostgreSQL,就像我們之前在`config/test.exs`那樣. `postgres`服務使用`POSTGRES_USER`和`POSTGRES_PASSWORD`值來創建具有這些憑據的用戶.
* 在`before_script`部分中,我們將添加一些命令來為測試做準備:
```
before_script:
- mix local.rebar --force
- mix local.hex --force
- mix deps.get --only test
- mix ecto.create
- mix ecto.migrate
```
這樣可以確保在嘗試獲取運行測試所需的依賴項之前,都同時安裝了[rebar3](https://www.rebar3.org)和[hex](https://s0hex0pm.icopy.site) . 接下來,使用`ecto`創建并遷移`postgres` db,以確保它是最新的.
* 最后,我們將`mix`部分保持不變.
讓我們看一下更改后的更新文件:
```
image: elixir:latest
services:
- postgres:latest
variables:
POSTGRES_DB: hello_gitlab_ci_test
POSTGRES_HOST: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: "postgres"
MIX_ENV: "test"
before_script:
- mix local.rebar --force
- mix local.hex --force
- mix deps.get --only test
- mix ecto.create
- mix ecto.migrate
mix:
script:
- mix test
```
為了安全起見,在將此文件提交到 GitLab 之前,我們可以檢查是否有語法錯誤. 復制`.gitlab-ci.yml`的內容并將其粘貼到[GitLab CI / CD Lint 工具上](https://gitlab.com/ci/lint) . 請注意,此鏈接僅對登錄用戶有效.
## Watching the build[](#watching-the-build "Permalink")
我不了解您,但是我喜歡看黑屏上充滿了編譯輸出. 這樣,我可以感覺到我所做的正確工作帶來的快樂. 在`localhost` ,很容易觀看我們的構建,但是在 GitLab 上,這可能嗎? 是!
讓我們去**管道** ,看看 GitLab 做這項工作. 只需單擊**管道**以查找實際正在運行的構建作業.
[](img/pipelines.png)
單擊內部版本的 ID 觀看整個過程. 如果一切都按預期進行,我們可以等待**構建成功**完成! :)
```
$ mix test
....
Finished in 0.3 seconds
4 tests, 0 failures
Randomized with seed 206909
Build succeeded
```
如果我們在 GitLab UI 上查看項目的主頁,我們可以看到 GitLab CI / CD 進行的最后構建的狀態.
是時候向世界展示我們的綠色建筑徽章! 導航到項目的**"設置">" CI / CD",**然后展開" **常規管道設置"** . 向下滾動到**管道狀態,**并復制您的徽章的降價代碼. 將其粘貼到`README.md`文件的頂部,以使項目外的人員可以看到我們的最新代碼是否正在正確運行.
完成此版本后,GitLab 將啟動另一個構建并顯示一個**運行**徽標. 可以預期的是,畢竟我們只是配置了 GitLab CI / CD 來完成每次推送! 但是您可能會想"為什么要針對諸如 README.md 之類的簡單操作運行構建和測試?" 這是一個很好的問題. 對于不影響您的應用程序的更改,您可以添加關鍵字[`[ci skip]`](../../yaml/README.html#skip-pipeline)來提交消息,并且與該提交相關的內部版本將被跳過.
最后,我們終于獲得了綠色環保的成功徽章! 通過將結果輸出到 README 文件中,它可以向登錄項目頁面的任何人顯示您的代碼是最新的并且可以正常工作.
## Conclusion[](#conclusion "Permalink")
當我們的應用程序不斷增長且有許多開發人員在處理該應用程序時,或者當社區正在監視和貢獻一個開源項目時,使我們的代碼永久運行非常重要. GitLab CI / CD 是節省時間的強大工具,可幫助我們維護代碼的組織和工作.
正如我們在這篇文章中所看到的,GitLab CI / CD 確實很容易配置和使用. 我們還有[許多其他理由](https://about.gitlab.com/blog/2015/02/03/7-reasons-why-you-should-be-using-ci/)繼續使用 GitLab CI / CD. 給我們團隊帶來的好處是巨大的!
## References[](#references "Permalink")
* [GitLab CI/CD introductory guide](https://about.gitlab.com/blog/2015/12/14/getting-started-with-gitlab-and-gitlab-ci/)
* [GitLab CI/CD full Documentation](../../README.html)
* [GitLab Runners documentation](../../runners/README.html)
* [Using Docker images documentation](../../docker/using_docker_images.html)
- GitLab Docs
- Installation
- Requirements
- GitLab cloud native Helm Chart
- Install GitLab with Docker
- Installation from source
- Install GitLab on Microsoft Azure
- Installing GitLab on Google Cloud Platform
- Installing GitLab on Amazon Web Services (AWS)
- Analytics
- Code Review Analytics
- Productivity Analytics
- Value Stream Analytics
- Kubernetes clusters
- Adding and removing Kubernetes clusters
- Adding EKS clusters
- Adding GKE clusters
- Group-level Kubernetes clusters
- Instance-level Kubernetes clusters
- Canary Deployments
- Cluster Environments
- Deploy Boards
- GitLab Managed Apps
- Crossplane configuration
- Cluster management project (alpha)
- Kubernetes Logs
- Runbooks
- Serverless
- Deploying AWS Lambda function using GitLab CI/CD
- Securing your deployed applications
- Groups
- Contribution Analytics
- Custom group-level project templates
- Epics
- Manage epics
- Group Import/Export
- Insights
- Issues Analytics
- Iterations
- Public access
- SAML SSO for GitLab.com groups
- SCIM provisioning using SAML SSO for GitLab.com groups
- Subgroups
- Roadmap
- Projects
- GitLab Secure
- Security Configuration
- Container Scanning
- Dependency Scanning
- Dependency List
- Static Application Security Testing (SAST)
- Secret Detection
- Dynamic Application Security Testing (DAST)
- GitLab Security Dashboard
- Offline environments
- Standalone Vulnerability pages
- Security scanner integration
- Badges
- Bulk editing issues and merge requests at the project level
- Code Owners
- Compliance
- License Compliance
- Compliance Dashboard
- Create a project
- Description templates
- Deploy Keys
- Deploy Tokens
- File finder
- Project integrations
- Integrations
- Atlassian Bamboo CI Service
- Bugzilla Service
- Custom Issue Tracker service
- Discord Notifications service
- Enabling emails on push
- GitHub project integration
- Hangouts Chat service
- Atlassian HipChat
- Irker IRC Gateway
- GitLab Jira integration
- Mattermost Notifications Service
- Mattermost slash commands
- Microsoft Teams service
- Mock CI Service
- Prometheus integration
- Redmine Service
- Slack Notifications Service
- Slack slash commands
- GitLab Slack application
- Webhooks
- YouTrack Service
- Insights
- Issues
- Crosslinking Issues
- Design Management
- Confidential issues
- Due dates
- Issue Boards
- Issue Data and Actions
- Labels
- Managing issues
- Milestones
- Multiple Assignees for Issues
- Related issues
- Service Desk
- Sorting and ordering issue lists
- Issue weight
- Associate a Zoom meeting with an issue
- Merge requests
- Allow collaboration on merge requests across forks
- Merge Request Approvals
- Browser Performance Testing
- How to create a merge request
- Cherry-pick changes
- Code Quality
- Load Performance Testing
- Merge Request dependencies
- Fast-forward merge requests
- Merge when pipeline succeeds
- Merge request conflict resolution
- Reverting changes
- Reviewing and managing merge requests
- Squash and merge
- Merge requests versions
- Draft merge requests
- Members of a project
- Migrating projects to a GitLab instance
- Import your project from Bitbucket Cloud to GitLab
- Import your project from Bitbucket Server to GitLab
- Migrating from ClearCase
- Migrating from CVS
- Import your project from FogBugz to GitLab
- Gemnasium
- Import your project from GitHub to GitLab
- Project importing from GitLab.com to your private GitLab instance
- Import your project from Gitea to GitLab
- Import your Jira project issues to GitLab
- Migrating from Perforce Helix
- Import Phabricator tasks into a GitLab project
- Import multiple repositories by uploading a manifest file
- Import project from repo by URL
- Migrating from SVN to GitLab
- Migrating from TFVC to Git
- Push Options
- Releases
- Repository
- Branches
- Git Attributes
- File Locking
- Git file blame
- Git file history
- Repository mirroring
- Protected branches
- Protected tags
- Push Rules
- Reduce repository size
- Signing commits with GPG
- Syntax Highlighting
- GitLab Web Editor
- Web IDE
- Requirements Management
- Project settings
- Project import/export
- Project access tokens (Alpha)
- Share Projects with other Groups
- Snippets
- Static Site Editor
- Wiki
- Project operations
- Monitor metrics for your CI/CD environment
- Set up alerts for Prometheus metrics
- Embedding metric charts within GitLab-flavored Markdown
- Embedding Grafana charts
- Using the Metrics Dashboard
- Dashboard YAML properties
- Metrics dashboard settings
- Panel types for dashboards
- Using Variables
- Templating variables for metrics dashboards
- Prometheus Metrics library
- Monitoring AWS Resources
- Monitoring HAProxy
- Monitoring Kubernetes
- Monitoring NGINX
- Monitoring NGINX Ingress Controller
- Monitoring NGINX Ingress Controller with VTS metrics
- Alert Management
- Error Tracking
- Tracing
- Incident Management
- GitLab Status Page
- Feature Flags
- GitLab CI/CD
- GitLab CI/CD pipeline configuration reference
- GitLab CI/CD include examples
- Introduction to CI/CD with GitLab
- Getting started with GitLab CI/CD
- How to enable or disable GitLab CI/CD
- Using SSH keys with GitLab CI/CD
- Migrating from CircleCI
- Migrating from Jenkins
- Auto DevOps
- Getting started with Auto DevOps
- Requirements for Auto DevOps
- Customizing Auto DevOps
- Stages of Auto DevOps
- Upgrading PostgreSQL for Auto DevOps
- Cache dependencies in GitLab CI/CD
- GitLab ChatOps
- Cloud deployment
- Docker integration
- Building Docker images with GitLab CI/CD
- Using Docker images
- Building images with kaniko and GitLab CI/CD
- GitLab CI/CD environment variables
- Predefined environment variables reference
- Where variables can be used
- Deprecated GitLab CI/CD variables
- Environments and deployments
- Protected Environments
- GitLab CI/CD Examples
- Test a Clojure application with GitLab CI/CD
- Using Dpl as deployment tool
- Testing a Phoenix application with GitLab CI/CD
- End-to-end testing with GitLab CI/CD and WebdriverIO
- DevOps and Game Dev with GitLab CI/CD
- Deploy a Spring Boot application to Cloud Foundry with GitLab CI/CD
- How to deploy Maven projects to Artifactory with GitLab CI/CD
- Testing PHP projects
- Running Composer and NPM scripts with deployment via SCP in GitLab CI/CD
- Test and deploy Laravel applications with GitLab CI/CD and Envoy
- Test and deploy a Python application with GitLab CI/CD
- Test and deploy a Ruby application with GitLab CI/CD
- Test and deploy a Scala application to Heroku
- GitLab CI/CD for external repositories
- Using GitLab CI/CD with a Bitbucket Cloud repository
- Using GitLab CI/CD with a GitHub repository
- GitLab Pages
- GitLab Pages
- GitLab Pages domain names, URLs, and baseurls
- Create a GitLab Pages website from scratch
- Custom domains and SSL/TLS Certificates
- GitLab Pages integration with Let's Encrypt
- GitLab Pages Access Control
- Exploring GitLab Pages
- Incremental Rollouts with GitLab CI/CD
- Interactive Web Terminals
- Optimizing GitLab for large repositories
- Metrics Reports
- CI/CD pipelines
- Pipeline Architecture
- Directed Acyclic Graph
- Multi-project pipelines
- Parent-child pipelines
- Pipelines for Merge Requests
- Pipelines for Merged Results
- Merge Trains
- Job artifacts
- Pipeline schedules
- Pipeline settings
- Triggering pipelines through the API
- Review Apps
- Configuring GitLab Runners
- GitLab CI services examples
- Using MySQL
- Using PostgreSQL
- Using Redis
- Troubleshooting CI/CD
- GitLab Package Registry
- GitLab Container Registry
- Dependency Proxy
- GitLab Composer Repository
- GitLab Conan Repository
- GitLab Maven Repository
- GitLab NPM Registry
- GitLab NuGet Repository
- GitLab PyPi Repository
- API Docs
- API resources
- .gitignore API
- GitLab CI YMLs API
- Group and project access requests API
- Appearance API
- Applications API
- Audit Events API
- Avatar API
- Award Emoji API
- Project badges API
- Group badges API
- Branches API
- Broadcast Messages API
- Project clusters API
- Group clusters API
- Instance clusters API
- Commits API
- Container Registry API
- Custom Attributes API
- Dashboard annotations API
- Dependencies API
- Deploy Keys API
- Deployments API
- Discussions API
- Dockerfiles API
- Environments API
- Epics API
- Events
- Feature Flags API
- Feature flag user lists API
- Freeze Periods API
- Geo Nodes API
- Group Activity Analytics API
- Groups API
- Import API
- Issue Boards API
- Group Issue Boards API
- Issues API
- Epic Issues API
- Issues Statistics API
- Jobs API
- Keys API
- Labels API
- Group Labels API
- License
- Licenses API
- Issue links API
- Epic Links API
- Managed Licenses API
- Markdown API
- Group and project members API
- Merge request approvals API
- Merge requests API
- Project milestones API
- Group milestones API
- Namespaces API
- Notes API
- Notification settings API
- Packages API
- Pages domains API
- Pipeline schedules API
- Pipeline triggers API
- Pipelines API
- Project Aliases API
- Project import/export API
- Project repository storage moves API
- Project statistics API
- Project templates API
- Projects API
- Protected branches API
- Protected tags API
- Releases API
- Release links API
- Repositories API
- Repository files API
- Repository submodules API
- Resource label events API
- Resource milestone events API
- Resource weight events API
- Runners API
- SCIM API
- Search API
- Services API
- Application settings API
- Sidekiq Metrics API
- Snippets API
- Project snippets
- Application statistics API
- Suggest Changes API
- System hooks API
- Tags API
- Todos API
- Users API
- Project-level Variables API
- Group-level Variables API
- Version API
- Vulnerabilities API
- Vulnerability Findings API
- Wikis API
- GraphQL API
- Getting started with GitLab GraphQL API
- GraphQL API Resources
- API V3 to API V4
- Validate the .gitlab-ci.yml (API)
- User Docs
- Abuse reports
- User account
- Active sessions
- Deleting a User account
- Permissions
- Personal access tokens
- Profile preferences
- Threads
- GitLab and SSH keys
- GitLab integrations
- Git
- GitLab.com settings
- Infrastructure as code with Terraform and GitLab
- GitLab keyboard shortcuts
- GitLab Markdown
- AsciiDoc
- GitLab Notification Emails
- GitLab Quick Actions
- Autocomplete characters
- Reserved project and group names
- Search through GitLab
- Advanced Global Search
- Advanced Syntax Search
- Time Tracking
- GitLab To-Do List
- Administrator Docs
- Reference architectures
- Reference architecture: up to 1,000 users
- Reference architecture: up to 2,000 users
- Reference architecture: up to 3,000 users
- Reference architecture: up to 5,000 users
- Reference architecture: up to 10,000 users
- Reference architecture: up to 25,000 users
- Reference architecture: up to 50,000 users
- Troubleshooting a reference architecture set up
- Working with the bundled Consul service
- Configuring PostgreSQL for scaling
- Configuring GitLab application (Rails)
- Load Balancer for multi-node GitLab
- Configuring a Monitoring node for Scaling and High Availability
- NFS
- Working with the bundled PgBouncer service
- Configuring Redis for scaling
- Configuring Sidekiq
- Admin Area settings
- Continuous Integration and Deployment Admin settings
- Custom instance-level project templates
- Diff limits administration
- Enable and disable GitLab features deployed behind feature flags
- Geo nodes Admin Area
- GitLab Pages administration
- Health Check
- Job logs
- Labels administration
- Log system
- PlantUML & GitLab
- Repository checks
- Repository storage paths
- Repository storage types
- Account and limit settings
- Service templates
- System hooks
- Changing your time zone
- Uploads administration
- Abuse reports
- Activating and deactivating users
- Audit Events
- Blocking and unblocking users
- Broadcast Messages
- Elasticsearch integration
- Gitaly
- Gitaly Cluster
- Gitaly reference
- Monitoring GitLab
- Monitoring GitLab with Prometheus
- Performance Bar
- Usage statistics
- Object Storage
- Performing Operations in GitLab
- Cleaning up stale Redis sessions
- Fast lookup of authorized SSH keys in the database
- Filesystem Performance Benchmarking
- Moving repositories managed by GitLab
- Run multiple Sidekiq processes
- Sidekiq MemoryKiller
- Switching to Puma
- Understanding Unicorn and unicorn-worker-killer
- User lookup via OpenSSH's AuthorizedPrincipalsCommand
- GitLab Package Registry administration
- GitLab Container Registry administration
- Replication (Geo)
- Geo database replication
- Geo with external PostgreSQL instances
- Geo configuration
- Using a Geo Server
- Updating the Geo nodes
- Geo with Object storage
- Docker Registry for a secondary node
- Geo for multiple nodes
- Geo security review (Q&A)
- Location-aware Git remote URL with AWS Route53
- Tuning Geo
- Removing secondary Geo nodes
- Geo data types support
- Geo Frequently Asked Questions
- Geo Troubleshooting
- Geo validation tests
- Disaster Recovery (Geo)
- Disaster recovery for planned failover
- Bring a demoted primary node back online
- Automatic background verification
- Rake tasks
- Back up and restore GitLab
- Clean up
- Namespaces
- Maintenance Rake tasks
- Geo Rake Tasks
- GitHub import
- Import bare repositories
- Integrity check Rake task
- LDAP Rake tasks
- Listing repository directories
- Praefect Rake tasks
- Project import/export administration
- Repository storage Rake tasks
- Generate sample Prometheus data
- Uploads migrate Rake tasks
- Uploads sanitize Rake tasks
- User management
- Webhooks administration
- X.509 signatures
- Server hooks
- Static objects external storage
- Updating GitLab
- GitLab release and maintenance policy
- Security
- Password Storage
- Custom password length limits
- Restrict allowed SSH key technologies and minimum length
- Rate limits
- Webhooks and insecure internal web services
- Information exclusivity
- How to reset your root password
- How to unlock a locked user from the command line
- User File Uploads
- How we manage the TLS protocol CRIME vulnerability
- User email confirmation at sign-up
- Security of running jobs
- Proxying assets
- CI/CD Environment Variables
- Contributor and Development Docs
- Contribute to GitLab
- Community members & roles
- Implement design & UI elements
- Issues workflow
- Merge requests workflow
- Code Review Guidelines
- Style guides
- GitLab Architecture Overview
- CI/CD development documentation
- Database guides
- Database Review Guidelines
- Database Review Guidelines
- Migration Style Guide
- What requires downtime?
- Understanding EXPLAIN plans
- Rake tasks for developers
- Mass inserting Rails models
- GitLab Documentation guidelines
- Documentation Style Guide
- Documentation structure and template
- Documentation process
- Documentation site architecture
- Global navigation
- GitLab Docs monthly release process
- Telemetry Guide
- Usage Ping Guide
- Snowplow Guide
- Experiment Guide
- Feature flags in development of GitLab
- Feature flags process
- Developing with feature flags
- Feature flag controls
- Document features deployed behind feature flags
- Frontend Development Guidelines
- Accessibility & Readability
- Ajax
- Architecture
- Axios
- Design Patterns
- Frontend Development Process
- DropLab
- Emojis
- Filter
- Frontend FAQ
- GraphQL
- Icons and SVG Illustrations
- InputSetter
- Performance
- Principles
- Security
- Tooling
- Vuex
- Vue
- Geo (development)
- Geo self-service framework (alpha)
- Gitaly developers guide
- GitLab development style guides
- API style guide
- Go standards and style guidelines
- GraphQL API style guide
- Guidelines for shell commands in the GitLab codebase
- HTML style guide
- JavaScript style guide
- Migration Style Guide
- Newlines style guide
- Python Development Guidelines
- SCSS style guide
- Shell scripting standards and style guidelines
- Sidekiq debugging
- Sidekiq Style Guide
- SQL Query Guidelines
- Vue.js style guide
- Instrumenting Ruby code
- Testing standards and style guidelines
- Flaky tests
- Frontend testing standards and style guidelines
- GitLab tests in the Continuous Integration (CI) context
- Review Apps
- Smoke Tests
- Testing best practices
- Testing levels
- Testing Rails migrations at GitLab
- Testing Rake tasks
- End-to-end Testing
- Beginner's guide to writing end-to-end tests
- End-to-end testing Best Practices
- Dynamic Element Validation
- Flows in GitLab QA
- Page objects in GitLab QA
- Resource class in GitLab QA
- Style guide for writing end-to-end tests
- Testing with feature flags
- Translate GitLab to your language
- Internationalization for GitLab
- Translating GitLab
- Proofread Translations
- Merging translations from CrowdIn
- Value Stream Analytics development guide
- GitLab subscription
- Activate GitLab EE with a license