Skip to content
Snippets Groups Projects
Commit 9b167b30 authored by Phillip Wells's avatar Phillip Wells
Browse files

Merge branch 'stylefix-build-package' into 'master'

parents e57a3df2 1c7ddf26
No related branches found
No related tags found
1 merge request!85Merged upstream 15.5.0+rc42.ce.0
......@@ -4,5 +4,5 @@
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments
---
# Building an `omnibus-gitlab` package locally
# Build an `omnibus-gitlab` package locally
......@@ -8,3 +8,3 @@
## Preparing a build environment
## Prepare a build environment
......@@ -10,6 +10,6 @@
Docker images with necessary build tools for building `omnibus-gitlab` packages
can be found at the [`GitLab Omnibus Builder`](https://gitlab.com/gitlab-org/gitlab-omnibus-builder)
Docker images with the necessary build tools for building `omnibus-gitlab` packages
are in the [`GitLab Omnibus Builder`](https://gitlab.com/gitlab-org/gitlab-omnibus-builder)
project's [Container Registry](https://gitlab.com/gitlab-org/gitlab-omnibus-builder/container_registry).
1. [Install Docker](https://docs.Docker.com/engine/installation/).
......@@ -18,7 +18,6 @@
> for your container runtime. Docker for Mac and Docker for Windows are known to set
> this value to 2GB for default installations.
1. Pull the Docker image for the OS you need to build a package for. The current
version of the image used officially by `omnibus-gitlab` is referred to the
`BUILDER_IMAGE_REVISION` environment variable in the
1. Pull the Docker image for the OS you want to build a package for. The current
version of the image used officially by `omnibus-gitlab` is referred to in the
[CI configuration](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/.gitlab-ci.yml)
......@@ -24,4 +23,5 @@
[CI configuration](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/.gitlab-ci.yml)
`BUILDER_IMAGE_REVISION` environment variable.
```shell
docker pull registry.gitlab.com/gitlab-org/gitlab-omnibus-builder/debian_10:${BUILDER_IMAGE_REVISION}
......@@ -35,9 +35,9 @@
```
1. Start the container and enter its shell, while mounting the `omnibus-gitlab`
directory in it:
directory in the container:
```shell
docker run -v ~/omnibus-gitlab:/omnibus-gitlab -it registry.gitlab.com/gitlab-org/gitlab-omnibus-builder/debian_10:${BUILDER_IMAGE_REVISION} bash
```
......@@ -39,9 +39,9 @@
```shell
docker run -v ~/omnibus-gitlab:/omnibus-gitlab -it registry.gitlab.com/gitlab-org/gitlab-omnibus-builder/debian_10:${BUILDER_IMAGE_REVISION} bash
```
1. By default, `omnibus-gitlab` will choose public GitLab repositories to
1. By default, `omnibus-gitlab` chooses public GitLab repositories to
fetch sources of various GitLab components. Set the environment variable
`ALTERNATIVE_SOURCES` to `false` to build from `dev.gitlab.org`.
......@@ -49,7 +49,7 @@
export ALTERNATIVE_SOURCES=false
```
Details of sources of various components is available in the
Component source information is in the
[`.custom_sources.yml`](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/.custom_sources.yml)
file.
......@@ -74,8 +74,8 @@
### Fetch upstream assets
Pipelines on GitLab and GitLab-FOSS projects will create a Docker image with
pre-compiled assets and publish it to the container registry. While building
packages, it's possible to reuse these images instead of compiling the assets
again, and thus save time:
Pipelines on GitLab and GitLab-FOSS projects create a Docker image with
pre-compiled assets and publish the image to the container registry. While building
packages, to save time you can reuse these images instead of compiling the assets
again:
......@@ -81,5 +81,5 @@
1. Fetch the assets Docker image corresponding to the ref of GitLab or
1. Fetch the assets Docker image that corresponds to the ref of GitLab or
GitLab-FOSS you are building. For example, to pull the asset image
corresponding to latest master ref, run the following:
......@@ -87,9 +87,9 @@
docker pull registry.gitlab.com/gitlab-org/gitlab/gitlab-assets-ee:master
```
1. Create a container using that image
1. Create a container using that image:
```shell
docker create --name gitlab_asset_cache registry.gitlab.com/gitlab-org/gitlab/gitlab-assets-ee:master
```
......@@ -91,9 +91,9 @@
```shell
docker create --name gitlab_asset_cache registry.gitlab.com/gitlab-org/gitlab/gitlab-assets-ee:master
```
1. Copy the asset directory from the container to the host
1. Copy the asset directory from the container to the host:
```shell
docker cp gitlab_asset_cache:/assets ~/gitlab-assets
......@@ -113,5 +113,5 @@
export ASSET_PATH=/gitlab-assets
```
## Building the package
## Build the package
......@@ -117,6 +117,6 @@
Once you have prepared the build environment and have made necessary changes, if
any, you can build packages using the provided Rake tasks:
After you have prepared the build environment and have made necessary changes,
you can build packages using the provided Rake tasks:
1. For builds to work, Git working directory should be clean. So, commit your
changes to a new branch.
......@@ -127,6 +127,6 @@
bundle exec rake build:project
```
The packages will be built and available in the `~/omnibus-gitlab/pkg`
The packages are built and made available in the `~/omnibus-gitlab/pkg`
directory.
......@@ -131,4 +131,4 @@
directory.
### Building an EE package
### Build an EE package
......@@ -134,8 +134,8 @@
By default, `omnibus-gitlab` will build a CE package. If you want to build an EE
By default, `omnibus-gitlab` builds a CE package. If you want to build an EE
package, set the `ee` environment variable before running the Rake task:
```shell
export ee=true
```
......@@ -136,8 +136,8 @@
package, set the `ee` environment variable before running the Rake task:
```shell
export ee=true
```
## Miscellaneous
### Clean files created during build
......@@ -143,10 +143,8 @@
### Cleaning files created during build
You can clean up all temporary files generated during the build process with
You can clean up all temporary files generated during the build process using
`omnibus`'s `clean` command:
```shell
bin/omnibus clean gitlab
```
......@@ -147,10 +145,10 @@
`omnibus`'s `clean` command:
```shell
bin/omnibus clean gitlab
```
Adding the `--purge` purge option removes __ALL__ files generated during the
Adding the `--purge` purge option removes **all** files generated during the
build including the project install directory (`/opt/gitlab`) and
the package cache directory (`/var/cache/omnibus/pkg`):
......@@ -158,5 +156,5 @@
bin/omnibus clean --purge gitlab
```
### Getting further help on Omnibus
## Get help on Omnibus
......@@ -162,5 +160,5 @@
Full help for the Omnibus command line interface can be accessed with the
For help with the Omnibus command-line interface, run the
`help` command:
```shell
......
......@@ -9,7 +9,7 @@
Development of Omnibus GitLab can be done using an existing package available
from the [Downloads page](https://about.gitlab.com/install/). To know how to setup
a build environment to build these packages and use them, please read
[Setting up a Build Environment](../build/build_package.md#preparing-a-build-environment)
[Setting up a Build Environment](../build/build_package.md#prepare-a-build-environment)
Choose one of the GitLab installation methods below. To provide isolation and
to prevent rebuilding of the package for each and every change, it is preferred
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment