Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
16b4f7c9c8
commit
9bbb32b297
13 changed files with 110 additions and 22 deletions
|
@ -78,6 +78,7 @@ module Ci
|
|||
variables.append(key: "CI_JOB_MANUAL", value: 'true') if action?
|
||||
variables.append(key: "CI_NODE_INDEX", value: self.options[:instance].to_s) if self.options&.include?(:instance)
|
||||
variables.append(key: "CI_NODE_TOTAL", value: (self.options&.dig(:parallel) || 1).to_s)
|
||||
variables.append(key: "CI_DEFAULT_BRANCH", value: project.default_branch)
|
||||
variables.concat(legacy_variables)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -95,12 +95,12 @@ on the external URL of the current host. For example:
|
|||
|
||||
![Clone panel](img/single_git_clone_panel.png)
|
||||
|
||||
You can customize the SSH remote URL to use the location-aware
|
||||
`git.example.com`. To do so, change the SSH remote URL's host by setting
|
||||
`gitlab_rails['gitlab_ssh_host']` in `gitlab.rb` of web nodes.
|
||||
You can customize the:
|
||||
|
||||
You can customize the HTTP remote URL as shown in
|
||||
[Custom Git clone URL for HTTP(S)](../../../user/admin_area/settings/visibility_and_access_controls.md#custom-git-clone-url-for-https).
|
||||
- SSH remote URL to use the location-aware `git.example.com`. To do so, change the SSH remote URL's
|
||||
host by setting `gitlab_rails['gitlab_ssh_host']` in `gitlab.rb` of web nodes.
|
||||
- HTTP remote URL as shown in
|
||||
[Custom Git clone URL for HTTP(S)](../../../user/admin_area/settings/visibility_and_access_controls.md#custom-git-clone-url-for-https).
|
||||
|
||||
## Example Git request handling behavior
|
||||
|
||||
|
|
|
@ -245,7 +245,7 @@ jobs, including deploy jobs, but after the restoration of [artifacts](#artifacts
|
|||
This must be an an array.
|
||||
|
||||
`after_script` is used to define the command that will be run after all
|
||||
jobs, including failed ones. This has to be an array or a multi-line string.
|
||||
jobs, including failed ones. This must be an an array.
|
||||
|
||||
Scripts specified in `before_script` are:
|
||||
|
||||
|
|
|
@ -1051,6 +1051,38 @@ In this case:
|
|||
- Different highlighting languages are used for each config in the code block.
|
||||
- The [GitLab Restart](#gitlab-restart) section is used to explain a required restart/reconfigure of GitLab.
|
||||
|
||||
## Feature flags
|
||||
|
||||
Sometimes features are shipped with feature flags, either:
|
||||
|
||||
- On by default, but providing the option to turn the feature off.
|
||||
- Off by default, but providing the option to turn the feature on.
|
||||
|
||||
When documenting feature flags for a feature, it's important that users know:
|
||||
|
||||
- Why a feature flag is necessary. Some of the reasons are
|
||||
[outlined in the handbook](https://about.gitlab.com/handbook/product/#alpha-beta-ga).
|
||||
- That administrative access is required to make a feature flag change.
|
||||
- What to ask for when requesting a change to a feature flag's state.
|
||||
|
||||
NOTE: **Note:**
|
||||
The [Product Manager for the relevant group](https://about.gitlab.com/handbook/product/categories/#devops-stages)
|
||||
must review and approve the addition or removal of any mentions of using feature flags before the doc change is merged.
|
||||
|
||||
The following is sample text for adding feature flag documentation for a feature:
|
||||
|
||||
````md
|
||||
### Disabling the feature
|
||||
|
||||
This feature comes with the `:feature_flag` feature flag enabled by default. However, in some cases
|
||||
this feature is incompatible with old configuration. To turn off the feature while configuration is
|
||||
migrated, ask a GitLab administrator with Rails console access to run the following command:
|
||||
|
||||
```ruby
|
||||
Feature.disable(:feature_flag)
|
||||
```
|
||||
````
|
||||
|
||||
## API
|
||||
|
||||
Here is a list of must-have items. Use them in the exact order that appears
|
||||
|
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
@ -137,18 +137,21 @@ from CI/CD jobs, even if _Only SSH_ was selected.
|
|||
|
||||
## Custom Git clone URL for HTTP(S)
|
||||
|
||||
> [Introduced](https://gitlab.com/gitlab-org/gitlab/merge_requests/18422) in GitLab 12.4.
|
||||
|
||||
You can customize project Git clone URLs for HTTP(S). This will affect the clone
|
||||
panel:
|
||||
|
||||
![Clone panel](img/clone_panel.png)
|
||||
![Clone panel](img/clone_panel_v12_4.png)
|
||||
|
||||
For example, if your
|
||||
GitLab instance is at `https://example.com`, then project clone URLs look like
|
||||
`https://example.com/foo/bar.git`. If you'd to provide clone URLs that look like
|
||||
`https://git.example.com/gitlab/foo/bar.git` instead, then you can set this
|
||||
setting to `https://git.example.com/gitlab/`.
|
||||
For example, if:
|
||||
|
||||
![Custom Git clone URL for HTTP](img/custom_git_clone_url_for_https.png)
|
||||
- Your GitLab instance is at `https://example.com`, then project clone URLs are like
|
||||
`https://example.com/foo/bar.git`.
|
||||
- You want clone URLs that look like `https://git.example.com/gitlab/foo/bar.git` instead,
|
||||
you can set this setting to `https://git.example.com/gitlab/`.
|
||||
|
||||
![Custom Git clone URL for HTTP](img/custom_git_clone_url_for_https_v12_4.png)
|
||||
|
||||
To specify a custom Git clone URL for HTTP(S):
|
||||
|
||||
|
@ -156,8 +159,8 @@ To specify a custom Git clone URL for HTTP(S):
|
|||
1. Click on **Save changes**.
|
||||
|
||||
NOTE: **Note:**
|
||||
SSH clone URLs can be customized in `gitlab.rb` by setting
|
||||
`gitlab_rails["gitlab_ssh_host"]` and other related settings.
|
||||
SSH clone URLs can be customized in `gitlab.rb` by setting `gitlab_rails['gitlab_ssh_host']` and
|
||||
other related settings.
|
||||
|
||||
## RSA, DSA, ECDSA, ED25519 SSH keys
|
||||
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 144 KiB After Width: | Height: | Size: 384 KiB |
|
@ -17,7 +17,7 @@ Everything you need to build, test, deploy, and run your app at scale.
|
|||
1. On the **Environments** page, you should see the status of the environment's pods with [Deploy Boards](../deploy_boards.md).
|
||||
1. When mousing over the list of pods, a tooltip will appear with the exact pod name and status.
|
||||
![Deploy Boards pod list](img/pod_logs_deploy_board.png)
|
||||
1. Click on the desired pod to bring up the logs view, which will contain the last 500 lines for that pod. Support for pods with multiple containers is coming [in a future release](https://gitlab.com/gitlab-org/gitlab/issues/6502).
|
||||
1. Click on the desired pod to bring up the logs view, which will contain the last 500 lines for that pod. You may switch between pods and environments in this view. Support for pods with multiple containers is coming [in a future release](https://gitlab.com/gitlab-org/gitlab/issues/6502).
|
||||
![Deploy Boards pod list](img/kubernetes_pod_logs.png)
|
||||
|
||||
## Requirements
|
||||
|
|
|
@ -77,15 +77,10 @@ include:
|
|||
- template: Jobs/Test.gitlab-ci.yml # https://gitlab.com/gitlab-org/gitlab-foss/blob/master/lib/gitlab/ci/templates/Jobs/Test.gitlab-ci.yml
|
||||
- template: Jobs/Code-Quality.gitlab-ci.yml # https://gitlab.com/gitlab-org/gitlab-foss/blob/master/lib/gitlab/ci/templates/Jobs/Code-Quality.gitlab-ci.yml
|
||||
- template: Jobs/Deploy.gitlab-ci.yml # https://gitlab.com/gitlab-org/gitlab-foss/blob/master/lib/gitlab/ci/templates/Jobs/Deploy.gitlab-ci.yml
|
||||
- template: Jobs/DAST-Default-Branch-Deploy.gitlab-ci.yml # https://gitlab.com/gitlab-org/gitlab-foss/blob/master/lib/gitlab/ci/templates/Jobs/DAST-Default-Branch-Deploy.gitlab-ci.yml
|
||||
- template: Jobs/Browser-Performance-Testing.gitlab-ci.yml # https://gitlab.com/gitlab-org/gitlab-foss/blob/master/lib/gitlab/ci/templates/Jobs/Browser-Performance-Testing.gitlab-ci.yml
|
||||
- template: Security/DAST.gitlab-ci.yml # https://gitlab.com/gitlab-org/gitlab-foss/blob/master/lib/gitlab/ci/templates/Security/DAST.gitlab-ci.yml
|
||||
- template: Security/Container-Scanning.gitlab-ci.yml # https://gitlab.com/gitlab-org/gitlab-foss/blob/master/lib/gitlab/ci/templates/Security/Container-Scanning.gitlab-ci.yml
|
||||
- template: Security/Dependency-Scanning.gitlab-ci.yml # https://gitlab.com/gitlab-org/gitlab-foss/blob/master/lib/gitlab/ci/templates/Security/Dependency-Scanning.gitlab-ci.yml
|
||||
- template: Security/License-Management.gitlab-ci.yml # https://gitlab.com/gitlab-org/gitlab-foss/blob/master/lib/gitlab/ci/templates/Security/License-Management.gitlab-ci.yml
|
||||
- template: Security/SAST.gitlab-ci.yml # https://gitlab.com/gitlab-org/gitlab-foss/blob/master/lib/gitlab/ci/templates/Security/SAST.gitlab-ci.yml
|
||||
|
||||
# Override DAST job to exclude master branch
|
||||
dast:
|
||||
except:
|
||||
refs:
|
||||
- master
|
||||
|
|
|
@ -0,0 +1,55 @@
|
|||
.auto-deploy:
|
||||
image: "registry.gitlab.com/gitlab-org/cluster-integration/auto-deploy-image:v0.1.0"
|
||||
|
||||
dast_environment_deploy:
|
||||
extends: .auto-deploy
|
||||
stage: review
|
||||
script:
|
||||
- auto-deploy check_kube_domain
|
||||
- auto-deploy download_chart
|
||||
- auto-deploy ensure_namespace
|
||||
- auto-deploy initialize_tiller
|
||||
- auto-deploy create_secret
|
||||
- auto-deploy deploy
|
||||
- auto-deploy persist_environment_url
|
||||
environment:
|
||||
name: dast-default
|
||||
url: http://dast-$CI_PROJECT_ID-$CI_ENVIRONMENT_SLUG.$KUBE_INGRESS_BASE_DOMAIN
|
||||
on_stop: stop_dast_environment
|
||||
artifacts:
|
||||
paths: [environment_url.txt]
|
||||
only:
|
||||
refs:
|
||||
- branches
|
||||
variables:
|
||||
- $GITLAB_FEATURES =~ /\bdast\b/
|
||||
kubernetes: active
|
||||
except:
|
||||
variables:
|
||||
- $CI_DEFAULT_BRANCH != $CI_COMMIT_REF_NAME
|
||||
- $DAST_DISABLED || $DAST_DISABLED_FOR_DEFAULT_BRANCH
|
||||
- $DAST_WEBSITE # we don't need to create a review app if a URL is already given
|
||||
|
||||
stop_dast_environment:
|
||||
extends: .auto-deploy
|
||||
stage: cleanup
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
script:
|
||||
- auto-deploy initialize_tiller
|
||||
- auto-deploy delete
|
||||
environment:
|
||||
name: dast-default
|
||||
action: stop
|
||||
needs: ["dast"]
|
||||
only:
|
||||
refs:
|
||||
- branches
|
||||
variables:
|
||||
- $GITLAB_FEATURES =~ /\bdast\b/
|
||||
kubernetes: active
|
||||
except:
|
||||
variables:
|
||||
- $CI_DEFAULT_BRANCH != $CI_COMMIT_REF_NAME
|
||||
- $DAST_DISABLED || $DAST_DISABLED_FOR_DEFAULT_BRANCH
|
||||
- $DAST_WEBSITE
|
|
@ -46,3 +46,4 @@ dast:
|
|||
except:
|
||||
variables:
|
||||
- $DAST_DISABLED
|
||||
- $DAST_DISABLED_FOR_DEFAULT_BRANCH && $CI_DEFAULT_BRANCH == $CI_COMMIT_REF_NAME
|
||||
|
|
|
@ -2195,6 +2195,7 @@ describe Ci::Build do
|
|||
{ key: 'CI_COMMIT_REF_NAME', value: build.ref, public: true, masked: false },
|
||||
{ key: 'CI_COMMIT_REF_SLUG', value: build.ref_slug, public: true, masked: false },
|
||||
{ key: 'CI_NODE_TOTAL', value: '1', public: true, masked: false },
|
||||
{ key: 'CI_DEFAULT_BRANCH', value: project.default_branch, public: true, masked: false },
|
||||
{ key: 'CI_BUILD_REF', value: build.sha, public: true, masked: false },
|
||||
{ key: 'CI_BUILD_BEFORE_SHA', value: build.before_sha, public: true, masked: false },
|
||||
{ key: 'CI_BUILD_REF_NAME', value: build.ref, public: true, masked: false },
|
||||
|
|
Loading…
Reference in a new issue