diff --git a/app/assets/javascripts/environments/components/confirm_rollback_modal.vue b/app/assets/javascripts/environments/components/confirm_rollback_modal.vue index 0e556f093e2..ce919f73858 100644 --- a/app/assets/javascripts/environments/components/confirm_rollback_modal.vue +++ b/app/assets/javascripts/environments/components/confirm_rollback_modal.vue @@ -99,8 +99,7 @@ export default { }; }, isLastDeployment() { - // eslint-disable-next-line @gitlab/require-i18n-strings - return this.environment?.isLastDeployment || this.environment?.lastDeployment?.['last?']; + return this.environment?.isLastDeployment || this.environment?.lastDeployment?.isLast; }, }, methods: { diff --git a/app/assets/javascripts/environments/components/environment_actions.vue b/app/assets/javascripts/environments/components/environment_actions.vue index 2d98f00433a..98c95507168 100644 --- a/app/assets/javascripts/environments/components/environment_actions.vue +++ b/app/assets/javascripts/environments/components/environment_actions.vue @@ -1,8 +1,9 @@ diff --git a/app/assets/javascripts/environments/components/new_environment_item.vue b/app/assets/javascripts/environments/components/new_environment_item.vue new file mode 100644 index 00000000000..883e887c1ae --- /dev/null +++ b/app/assets/javascripts/environments/components/new_environment_item.vue @@ -0,0 +1,239 @@ + + diff --git a/app/assets/javascripts/environments/components/new_environments_app.vue b/app/assets/javascripts/environments/components/new_environments_app.vue index 02ccdb53456..c93caa4b4ab 100644 --- a/app/assets/javascripts/environments/components/new_environments_app.vue +++ b/app/assets/javascripts/environments/components/new_environments_app.vue @@ -5,20 +5,28 @@ import { updateHistory, setUrlParams, queryToObject } from '~/lib/utils/url_util import environmentAppQuery from '../graphql/queries/environment_app.query.graphql'; import pollIntervalQuery from '../graphql/queries/poll_interval.query.graphql'; import pageInfoQuery from '../graphql/queries/page_info.query.graphql'; +import environmentToDeleteQuery from '../graphql/queries/environment_to_delete.query.graphql'; +import environmentToRollbackQuery from '../graphql/queries/environment_to_rollback.query.graphql'; import environmentToStopQuery from '../graphql/queries/environment_to_stop.query.graphql'; import EnvironmentFolder from './new_environment_folder.vue'; import EnableReviewAppModal from './enable_review_app_modal.vue'; import StopEnvironmentModal from './stop_environment_modal.vue'; +import EnvironmentItem from './new_environment_item.vue'; +import ConfirmRollbackModal from './confirm_rollback_modal.vue'; +import DeleteEnvironmentModal from './delete_environment_modal.vue'; export default { components: { + DeleteEnvironmentModal, + ConfirmRollbackModal, EnvironmentFolder, EnableReviewAppModal, + EnvironmentItem, + StopEnvironmentModal, GlBadge, GlPagination, GlTab, GlTabs, - StopEnvironmentModal, }, apollo: { environmentApp: { @@ -39,6 +47,12 @@ export default { pageInfo: { query: pageInfoQuery, }, + environmentToDelete: { + query: environmentToDeleteQuery, + }, + environmentToRollback: { + query: environmentToRollbackQuery, + }, environmentToStop: { query: environmentToStopQuery, }, @@ -63,6 +77,8 @@ export default { isReviewAppModalVisible: false, page: parseInt(page, 10), scope, + environmentToDelete: {}, + environmentToRollback: {}, environmentToStop: {}, }; }, @@ -71,7 +87,10 @@ export default { return this.environmentApp?.reviewApp?.canSetupReviewApp; }, folders() { - return this.environmentApp?.environments.filter((e) => e.size > 1) ?? []; + return this.environmentApp?.environments?.filter((e) => e.size > 1) ?? []; + }, + environments() { + return this.environmentApp?.environments?.filter((e) => e.size === 1) ?? []; }, availableCount() { return this.environmentApp?.availableCount; @@ -164,7 +183,9 @@ export default { :modal-id="$options.modalId" data-testid="enable-review-app-modal" /> + + + ({ })); }, isLastDeployment(_, { environment }) { - // eslint-disable-next-line @gitlab/require-i18n-strings - return environment?.lastDeployment?.['last?']; + return environment?.lastDeployment?.isLast; }, }, Mutation: { @@ -115,6 +114,14 @@ export const resolvers = (endpoint) => ({ data: { environmentToStop: environment }, }); }, + action(_, { action: { playPath } }) { + return axios + .post(playPath) + .then(() => buildErrors()) + .catch(() => + buildErrors([s__('Environments|An error occurred while making the request.')]), + ); + }, setEnvironmentToDelete(_, { environment }, { client }) { client.writeQuery({ query: environmentToDeleteQuery, diff --git a/app/assets/javascripts/environments/graphql/typedefs.graphql b/app/assets/javascripts/environments/graphql/typedefs.graphql index 64cab480c98..c02f6b2838a 100644 --- a/app/assets/javascripts/environments/graphql/typedefs.graphql +++ b/app/assets/javascripts/environments/graphql/typedefs.graphql @@ -70,7 +70,7 @@ extend type Query { environmentToRollback: LocalEnvironment environmentToStop: LocalEnvironment isEnvironmentStopping(environment: LocalEnvironmentInput): Boolean - isLastDeployment: Boolean + isLastDeployment(environment: LocalEnvironmentInput): Boolean } extend type Mutation { @@ -81,4 +81,5 @@ extend type Mutation { setEnvironmentToDelete(environment: LocalEnvironmentInput): LocalErrors setEnvironmentToRollback(environment: LocalEnvironmentInput): LocalErrors setEnvironmentToStop(environment: LocalEnvironmentInput): LocalErrors + action(environment: LocalEnvironmentInput): LocalErrors } diff --git a/app/helpers/hooks_helper.rb b/app/helpers/hooks_helper.rb index c1dfd2b2cda..1e50033e0e0 100644 --- a/app/helpers/hooks_helper.rb +++ b/app/helpers/hooks_helper.rb @@ -39,7 +39,7 @@ module HooksHelper def hook_log_path(hook, hook_log) case hook - when ProjectHook + when ProjectHook, ServiceHook hook_log.present.details_path when SystemHook admin_hook_hook_log_path(hook, hook_log) diff --git a/doc/administration/packages/dependency_proxy.md b/doc/administration/packages/dependency_proxy.md index a394a32fc18..b3dc6ffc2b2 100644 --- a/doc/administration/packages/dependency_proxy.md +++ b/doc/administration/packages/dependency_proxy.md @@ -14,68 +14,84 @@ GitLab can be used as a dependency proxy for a variety of common package manager This is the administration documentation. If you want to learn how to use the dependency proxies, see the [user guide](../../user/packages/dependency_proxy/index.md). -## Enabling the Dependency Proxy feature +The GitLab Dependency Proxy: -NOTE: -Dependency proxy requires the Puma web server to be enabled. +- Is turned on by default. +- Can be turned off by an administrator. +- Requires the [Puma web server](../operations/puma.md) + to be enabled. Puma is enabled by default in GitLab 13.0 and later. -To enable the dependency proxy feature: +## Turn off the Dependency Proxy -**Omnibus GitLab installations** +The Dependency Proxy is enabled by default. If you are an administrator, you +can turn off the Dependency Proxy. To turn off the Dependency Proxy, follow the instructions that +correspond to your GitLab installation: + +- [Omnibus GitLab installations](#omnibus-gitlab-installations) +- [Helm chart installations](#helm-chart-installations) +- [Installations from source](#installations-from-source) + +### Omnibus GitLab installations 1. Edit `/etc/gitlab/gitlab.rb` and add the following line: ```ruby - gitlab_rails['dependency_proxy_enabled'] = true + gitlab_rails['dependency_proxy_enabled'] = false ``` -1. Save the file and [reconfigure GitLab](../restart_gitlab.md#omnibus-gitlab-reconfigure) for the changes to take effect. -1. Enable the [Puma web server](../operations/puma.md). +1. Save the file and [reconfigure GitLab](../restart_gitlab.md#omnibus-gitlab-reconfigure) + for the changes to take effect. -**Helm chart installations** +### Helm chart installations -1. After the installation is complete, update the global `appConfig` to enable the feature: +After the installation is complete, update the global `appConfig` to turn off the Dependency Proxy: - ```yaml - global: - appConfig: - dependencyProxy: - enabled: true - bucket: gitlab-dependency-proxy - connection: {} - secret: - key: - ``` +```yaml +global: + appConfig: + dependencyProxy: + enabled: false + bucket: gitlab-dependency-proxy + connection: {} + secret: + key: +``` For more information, see [Configure Charts using Globals](https://docs.gitlab.com/charts/charts/globals.html#configure-appconfig-settings). -**Installations from source** +### Installations from source -1. After the installation is complete, configure the `dependency_proxy` - section in `config/gitlab.yml`. Set to `true` to enable it: +1. After the installation is complete, configure the `dependency_proxy` section in + `config/gitlab.yml`. Set `enabled` to `false` to turn off the Dependency Proxy: ```yaml dependency_proxy: - enabled: true + enabled: false ``` -1. [Restart GitLab](../restart_gitlab.md#installations-from-source "How to restart GitLab") for the changes to take effect. +1. [Restart GitLab](../restart_gitlab.md#installations-from-source "How to restart GitLab") + for the changes to take effect. -Since Puma is already the default web server for installations from source as of GitLab 12.9, -no further changes are needed. +### Multi-node GitLab installations -**Multi-node GitLab installations** +Follow the steps for [Omnibus GitLab installations](#omnibus-gitlab-installations) +for each Web and Sidekiq node. -Follow the steps for **Omnibus GitLab installation** for each Web and Sidekiq nodes. +## Turn on the Dependency Proxy + +The Dependency Proxy is turned on by default, but can be turned off by an +administrator. To turn on the Dependency Proxy, follow the instructions in +[Turn off the Dependency Proxy](#turn-off-the-dependency-proxy), +but set the `enabled` fields to `true`. ## Changing the storage path -By default, the dependency proxy files are stored locally, but you can change the default +By default, the Dependency Proxy files are stored locally, but you can change the default local location or even use object storage. ### Changing the local storage path -The dependency proxy files for Omnibus GitLab installations are stored under +The Dependency Proxy files for Omnibus GitLab installations are stored under `/var/opt/gitlab/gitlab-rails/shared/dependency_proxy/` and for source installations under `shared/dependency_proxy/` (relative to the Git home directory). To change the local storage path: @@ -105,7 +121,7 @@ To change the local storage path: ### Using object storage Instead of relying on the local storage, you can use an object storage to -store the blobs of the dependency proxy. +store the blobs of the Dependency Proxy. [Read more about using object storage with GitLab](../object_storage.md). @@ -199,5 +215,3 @@ Feature.disable(:dependency_proxy_for_private_groups) # Re-enable the authentication Feature.enable(:dependency_proxy_for_private_groups) ``` - -The ability to disable this feature will be [removed in 13.9](https://gitlab.com/gitlab-org/gitlab/-/issues/276777). diff --git a/doc/operations/tracing.md b/doc/operations/tracing.md index 1aa6484157c..09a31c12bf4 100644 --- a/doc/operations/tracing.md +++ b/doc/operations/tracing.md @@ -4,9 +4,14 @@ group: Monitor info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments --- -# Tracing **(FREE)** +# Tracing (DEPRECATED) **(FREE)** -> [Moved](https://gitlab.com/gitlab-org/gitlab/-/issues/42645) from GitLab Ultimate to GitLab Free in 13.5. +> - [Moved](https://gitlab.com/gitlab-org/gitlab/-/issues/42645) from GitLab Ultimate to GitLab Free in 13.5. +> - [Deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/346540) in GitLab 14.7. + +WARNING: +This feature is in its end-of-life process. It is [deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/346540) +for use in GitLab 14.7, and is planned for removal in GitLab 15.0. Tracing provides insight into the performance and health of a deployed application, tracking each function or microservice that handles a given request. Tracing makes it easy to understand the diff --git a/doc/ssh/index.md b/doc/ssh/index.md index fe3b2cacbff..6196ee5465b 100644 --- a/doc/ssh/index.md +++ b/doc/ssh/index.md @@ -5,10 +5,10 @@ info: "To determine the technical writer assigned to the Stage/Group associated type: howto, reference --- -# GitLab and SSH keys **(FREE)** +# Use SSH keys to communicate with GitLab **(FREE)** Git is a distributed version control system, which means you can work locally, -then share or "push" your changes to a server. In this case, the server is GitLab. +then share or *push* your changes to a server. In this case, the server you push to is GitLab. GitLab uses the SSH protocol to securely communicate with Git. When you use SSH keys to authenticate to the GitLab remote server, diff --git a/doc/topics/git/how_to_install_git/index.md b/doc/topics/git/how_to_install_git/index.md index fc9c0e0ec63..422919ea46c 100644 --- a/doc/topics/git/how_to_install_git/index.md +++ b/doc/topics/git/how_to_install_git/index.md @@ -3,96 +3,83 @@ stage: Create group: Source Code info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments description: 'This article describes how to install Git on macOS, Ubuntu Linux and Windows.' -type: howto --- # Installing Git **(FREE)** -To begin contributing to GitLab projects, -you must install the Git client on your computer. - -This article shows you how to install Git on macOS, Ubuntu Linux and Windows. - -Information on [installing Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) +To begin contributing to GitLab projects, you must install the appropriate Git client +on your computer. Information about [installing Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) is also available at the official Git website. -## Install Git on macOS using the Homebrew package manager +## Supported operating systems -Although you can use the version of Git shipped with macOS or install the latest -version of Git on macOS by downloading it from the project website, we recommend -installing Git with Homebrew to get access to an extensive selection of -dependency-managed libraries and applications. +Git is available for the following operating systems: -If you don't need access to any additional development libraries or don't have -approximately 15 GB of available disk space for Xcode and Homebrew, use one of -the previously mentioned methods. +- [macOS](#macos) +- [Ubuntu Linux](#ubuntu-linux) +- [Microsoft Windows](#windows) -### Installing Xcode +### macOS -To build dependencies, Homebrew needs the XCode Command Line Tools. Install -it by running in your terminal: +A version of Git is supplied by macOS. You can use this version, or install the latest +version of Git on macOS by downloading it from the project website. We recommend +installing Git with [Homebrew](https://brew.sh/index.html). With Homebrew, you can +access an extensive selection of libraries and applications, with their dependencies +managed for you. -```shell -xcode-select --install -``` +Prerequisites: -Click **Install** to download and install it. Alternatively, you can install -the entire [XCode](https://developer.apple.com/xcode/) package through the -macOS App Store. +- 15 GB of available disk space for Homebrew and Xcode. +- Extra disk space for any additional development libraries. -### Installing Homebrew +To install Git on macOS: -With Xcode installed, browse to the [Homebrew website](https://brew.sh/index.html) -for the official Homebrew installation instructions. +1. Open a terminal and install the XCode Command Line Tools: -### Installing Git via Homebrew + ```shell + xcode-select --install + ``` -With Homebrew installed, you are now ready to install Git. -Open a terminal and enter the following command: + Alternatively, you can install the entire [XCode](https://developer.apple.com/xcode/) + package through the macOS App Store. -```shell -brew install git -``` +1. Select **Install** to download and install XCode Command Line Tools. +1. Install Homebrew according to the [official Homebrew installation instructions](https://brew.sh/index.html). +1. Install Git by running `brew install git` from your terminal. +1. In a terminal, verify that Git works on your computer: -Congratulations! You should now have Git installed via Homebrew. + ```shell + git --version + ``` -To verify that Git works on your system, run: +### Ubuntu Linux -```shell -git --version -``` +On Ubuntu and other Linux operating systems, use the built-in package manager +to install Git: -Next, read our article on [adding an SSH key to GitLab](../../../ssh/index.md). +1. Open a terminal and run these commands to install the latest Git +from the officially + maintained package archives: -## Install Git on Ubuntu Linux + ```shell + sudo apt-add-repository ppa:git-core/ppa + sudo apt-get update + sudo apt-get install git + ``` -On Ubuntu and other Linux operating systems -it is recommended to use the built-in package manager to install Git. +1. To verify that Git works on your computer, run: -Open a terminal and enter the following commands -to install the latest Git from the official Git maintained package archives: + ```shell + git --version + ``` -```shell -sudo apt-add-repository ppa:git-core/ppa -sudo apt-get update -sudo apt-get install git -``` +### Windows -Congratulations! You should now have Git installed via the Ubuntu package manager. +Go to the [Git website](https://git-scm.com/), and then download and install Git for Windows. -To verify that Git works on your system, run: +## After you install Git -```shell -git --version -``` - -Next, read our article on [adding an SSH key to GitLab](../../../ssh/index.md). - -## Installing Git on Windows from the Git website - -Open the [Git website](https://git-scm.com/) and download and install Git for Windows. - -Next, read our article on [adding an SSH key to GitLab](../../../ssh/index.md). +After you successfully install Git on your computer, read about [adding an SSH key to GitLab](../../../ssh/index.md).