Find a file
Kamil Trzciński 51830b6659 Merge branch '22849-ci-build-ref-slug' into 'master'
Introduce $CI_BUILD_REF_SLUG

## What does this MR do?

Adds `$CI_BUILD_REF_SLUG` to the variables exposed to the runner. This is based on `$CI_BUILD_REF_NAME` but lowercased, shortened to 63 bytes maximum, and with characters invalid in URLs and domain names replaced with `-`. 

## Are there points in the code the reviewer needs to double check?

Slugs don't have a uniqueness guarantee. !7983 introduces an environment name slug which *is* unique, so I'm not as exercised about this as I was.

Should the slug be published in the API? It's available through the `variables` endpoint, but perhaps it should be part of `GET /project/:id/builds` ?

I've called it `ref_slug` rather than just `slug` as there are number of possibilities for slugification in a build (unlike an environment, where only the name makes sense to slugify).

## Why was this MR needed?

`$CI_BUILD_REF_NAME` is not suited for URLs and domain names, given the list of valid characters in a git ref. 

## Screenshots (if relevant)

## Does this MR meet the acceptance criteria?

- [x] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added
- [X] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- Tests
  - [X] Added for this feature/bug
  - [x] All builds are passing
- [X] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [X] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [X] Branch has no merge conflicts with `master` (if it does - rebase it please)
- [X] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?

Closes #22849

See merge request !8072
2016-12-15 11:08:27 +00:00
.github Address feedback about wording. 2016-06-09 11:25:47 -06:00
.gitlab Encourage bug reporters to mention if they use GitLab.com [ci skip] 2016-12-06 16:08:53 +00:00
app Merge branch '22849-ci-build-ref-slug' into 'master' 2016-12-15 11:08:27 +00:00
bin Simplify branch_name in bin/changelog 2016-12-02 18:31:57 +08:00
builds Add missing builds/ folder to fix backup tests 2015-09-15 22:19:31 +02:00
changelogs Merge branch '22849-ci-build-ref-slug' into 'master' 2016-12-15 11:08:27 +00:00
config Merge branch 'dz-fix-admin-routes' into 'master' 2016-12-14 15:09:54 +00:00
db Merge branch 'master' into 'dz-remove-namespaces-path-uniq' 2016-12-14 15:18:46 +00:00
doc Merge branch '22849-ci-build-ref-slug' into 'master' 2016-12-15 11:08:27 +00:00
docker Update README.md 2016-10-13 14:43:05 +00:00
features Merge branch 'dz-fix-admin-routes' into 'master' 2016-12-14 15:09:54 +00:00
fixtures/emojis Upgrade Gemojione from 2.6.1 to 3.0.1. 2016-07-18 10:40:16 -06:00
generator_templates Support for post deployment migrations 2016-10-31 12:54:48 +01:00
lib Introduce deployment services, starting with a KubernetesService 2016-12-14 21:06:26 +00:00
log
public Fix appearance in error pages 2016-11-29 11:44:07 -07:00
rubocop Added RuboCop cops for checking DB migrations 2016-06-29 14:14:02 +02:00
scripts Use --extended-regexp in lint-doc for compatibility with Darwin grep 2016-12-06 15:46:48 +11:00
shared Add .gitkeep 2016-05-17 09:41:47 -05:00
spec Merge branch '22849-ci-build-ref-slug' into 'master' 2016-12-15 11:08:27 +00:00
tmp
vendor move timeago.js to vendor directory 2016-11-22 23:33:42 -06:00
.csscomb.json Remove SCSS rules for short hex chars. 2016-10-03 20:40:22 -04:00
.eslintignore add node_modules to our eslintignore settings 2016-12-14 10:08:12 -06:00
.eslintrc Fixed Wrong Tab Selected When Loggin Fails And Multiple Login Tabs Exists 2016-12-02 10:19:31 +01:00
.flayignore Tell Flay to ignore Gitlab::Diff::PositionTracer 2016-09-27 14:31:33 +02:00
.foreman
.gitattributes Remove gitattribute entry for CHANGELOG.md 2016-11-15 17:04:33 +02:00
.gitignore Generate ESLint HTML report (!7374) 2016-11-22 20:25:33 +01:00
.gitlab-ci.yml Run builds with runners with tags gitlab-org and 2gb 2016-12-06 15:07:02 +01:00
.haml-lint.yml Improve .haml-lint.yml, simplify the haml_lint task and remove CHANGELOG entry 2016-09-13 18:56:00 +02:00
.mailmap Add an initial .mailmap 2016-08-06 23:21:11 +02:00
.pkgr.yml Update .pkgr.yml with Ubuntu 16.04 dependencies 2016-09-20 17:35:49 +02:00
.rspec Make Fuubar the default rspec formatter 2015-06-26 01:01:13 -04:00
.rubocop.yml Change target Ruby version for Rubocop to 2.1. 2016-10-20 15:22:38 +02:00
.rubocop_todo.yml Update RuboCop to 0.43.0 and update configuration 2016-10-04 13:28:01 +02:00
.ruby-version Bump ruby version 2016-12-03 15:57:20 +01:00
.scss-lint.yml Enable ColorVariable in scss-lint 2016-12-01 20:22:51 -05:00
CHANGELOG.md Add 8.12.10, 8.12.11, and 8.12.12 CHANGELOG.md items 2016-12-09 11:58:12 +01:00
config.ru Increase Unicorn memory limits to 300-350 2016-01-20 11:52:01 +01:00
CONTRIBUTING.md Update CONTRIBUTING.md - Adding info about issues within a milestone 2016-11-16 23:26:01 +00:00
doc_styleguide.md
docker-compose.yml
Gemfile Introduce deployment services, starting with a KubernetesService 2016-12-14 21:06:26 +00:00
Gemfile.lock Introduce deployment services, starting with a KubernetesService 2016-12-14 21:06:26 +00:00
GITLAB_SHELL_VERSION Bump gitlab-shell version to 4.0.3 2016-12-06 10:31:56 -05:00
GITLAB_WORKHORSE_VERSION Use gitlab-workhose 1.1.1 2016-12-08 11:53:21 +01:00
LICENSE
MAINTENANCE.md Update MAINTENANCE.md with our latest policy 2016-07-19 09:05:56 +03:00
package.json Fixed lint warning and propose fail or warning 2016-12-10 12:04:54 +00:00
PROCESS.md Fix grammar (those issue -> those issues) 2016-08-31 15:23:31 +00:00
Procfile Remove duplication in Procfile 2016-01-14 15:08:22 +01:00
Rakefile Load knapsack in Rakefile only when is bundled 2016-06-07 20:02:03 +02:00
README.md Bump Git version requirement to 2.8.4 2016-12-01 16:18:09 +01:00
VERSION Update VERSION to 8.15.0-pre 2016-11-22 15:02:47 -03:00

GitLab

Build status CE coverage report Code Climate Core Infrastructure Initiative Best Practices

Canonical source

The canonical source of GitLab Community Edition is hosted on GitLab.com.

Open source software to collaborate on code

To see how GitLab looks please see the features page on our website.

  • Manage Git repositories with fine grained access controls that keep your code secure
  • Perform code reviews and enhance collaboration with merge requests
  • Each project can also have an issue tracker and a wiki
  • Used by more than 100,000 organizations, GitLab is the most popular solution to manage Git repositories on-premises
  • Completely free and open source (MIT Expat license)
  • Powered by Ruby on Rails

Hiring

We're hiring developers, support people, and production engineers all the time, please see our jobs page.

Editions

There are two editions of GitLab:

  • GitLab Community Edition (CE) is available freely under the MIT Expat license.
  • GitLab Enterprise Edition (EE) includes extra features that are more useful for organizations with more than 100 users. To use EE and get official support please become a subscriber.

Website

On about.gitlab.com you can find more information about:

Requirements

Please see the requirements documentation for system requirements and more information about the supported operating systems.

Installation

The recommended way to install GitLab is with the Omnibus packages on our package server. Compared to an installation from source, this is faster and less error prone. Just select your operating system, download the respective package (Debian or RPM) and install it using the system's package manager.

There are various other options to install GitLab, please refer to the installation page on the GitLab website for more information.

You can access a new installation with the login root and password 5iveL!fe, after login you are required to set a unique password.

Contributing

GitLab is an open source project and we are very happy to accept community contributions. Please refer to CONTRIBUTING.md for details.

Install a development environment

To work on GitLab itself, we recommend setting up your development environment with the GitLab Development Kit. If you do not use the GitLab Development Kit you need to install and setup all the dependencies yourself, this is a lot of work and error prone. One small thing you also have to do when installing it yourself is to copy the example development unicorn configuration file:

cp config/unicorn.rb.example.development config/unicorn.rb

Instructions on how to start GitLab and how to run the tests can be found in the development section of the GitLab Development Kit.

Software stack

GitLab is a Ruby on Rails application that runs on the following software:

  • Ubuntu/Debian/CentOS/RHEL
  • Ruby (MRI) 2.3
  • Git 2.8.4+
  • Redis 2.8+
  • MySQL or PostgreSQL

For more information please see the architecture documentation.

UX design

Please adhere to the UX Guide when creating designs and implementing code.

Third-party applications

There are a lot of third-party applications integrating with GitLab. These include GUI Git clients, mobile applications and API wrappers for various languages.

GitLab release cycle

For more information about the release process see the release documentation.

Upgrading

For upgrading information please see our update page.

Documentation

All documentation can be found on docs.gitlab.com/ce/.

Getting help

Please see Getting help for GitLab on our website for the many options to get help.

Is it any good?

Yes

Is it awesome?

Thanks for asking this question Joshua. These people seem to like it.