Skip to content

Commit 639a34f

Browse files
author
GitLab Bot
committed
Add latest changes from gitlab-org/gitlab@master
1 parent feebcf1 commit 639a34f

File tree

9 files changed

+51
-171
lines changed

9 files changed

+51
-171
lines changed

app/controllers/jwt_controller.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ def log_authentication_failed(login, result)
6565

6666
def render_access_denied
6767
help_page = help_page_url(
68-
'user/profile/account/two_factor_authentication.md',
69-
anchor: 'troubleshooting'
68+
'user/profile/account/two_factor_authentication_troubleshooting.md',
69+
anchor: 'error-http-basic-access-denied-if-a-password-was-provided-for-git-authentication-'
7070
)
7171

7272
render(

doc/development/integrations/secure.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -99,16 +99,16 @@ it's declared under the `reports:sast` key in the job definition, not because of
9999

100100
### Policies
101101

102-
Certain GitLab workflows, such as [AutoDevOps](../../topics/autodevops/cicd_variables.md#job-disabling-variables),
103-
define CI/CD variables to indicate that given scans should be disabled. You can check for this by looking
102+
Certain GitLab workflows, such as [AutoDevOps](../../topics/autodevops/cicd_variables.md#job-skipping-variables),
103+
define CI/CD variables to indicate that given scans should be skipped. You can check for this by looking
104104
for variables such as:
105105

106106
- `DEPENDENCY_SCANNING_DISABLED`
107107
- `CONTAINER_SCANNING_DISABLED`
108108
- `SAST_DISABLED`
109109
- `DAST_DISABLED`
110110

111-
If appropriate based on the scanner type, you should then disable running the custom scanner.
111+
If appropriate based on the scanner type, you should then skip running the custom scanner.
112112

113113
GitLab also defines a `CI_PROJECT_REPOSITORY_LANGUAGES` variable, which provides the list of
114114
languages in the repository. Depending on this value, your scanner may or may not do something different.

doc/development/windows.md

+8-135
Original file line numberDiff line numberDiff line change
@@ -1,140 +1,13 @@
11
---
2-
stage: none
3-
group: unassigned
4-
info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review.
2+
redirect_to: 'index.md'
3+
remove_date: '2025-01-31'
54
---
65

7-
# Windows Development
6+
<!-- markdownlint-disable -->
87

9-
There are times in development where a Windows development machine is needed.
10-
This is a guide for how to get a Windows development virtual machine on Google Cloud Platform
11-
(GCP) with the same preinstalled tools as the GitLab shared Windows runners.
8+
This document was moved to [another location](index.md).
129

13-
## Why Windows in Google Cloud?
14-
15-
Use of Microsoft Windows operating systems on company laptops is banned under the GitLab [Approved Operating Systems policy](https://internal.gitlab.com/handbook/it/it-self-service/operating-systems/).
16-
17-
This can make it difficult to develop features for the Windows platforms. Using GCP allows us to have a temporary Windows machine that can be removed once we're done with it.
18-
19-
## Shared Windows runners
20-
21-
You can use the shared Windows runners in the case that you don't need a full Windows development machine.
22-
The [GitLab 12.7 Release Post](https://about.gitlab.com/releases/2020/01/22/gitlab-12-7-released/#windows-shared-runners-on-gitlabcom-beta)
23-
and [Windows shared runner beta blog post](https://about.gitlab.com/blog/2020/01/21/windows-shared-runner-beta/#getting-started) both
24-
outline quite a bit of useful information.
25-
26-
To use the shared Windows runners add the following `tags` to relevant jobs in your `.gitlab-ci.yml` file:
27-
28-
```yaml
29-
tags:
30-
- shared-windows
31-
- windows
32-
- windows-1809
33-
```
34-
35-
A list of software preinstalled on the Windows images is available at: [Preinstalled software](https://gitlab.com/gitlab-org/ci-cd/shared-runners/images/gcp/windows-containers/blob/main/cookbooks/preinstalled-software/README.md).
36-
37-
## GCP Windows image for development
38-
39-
The [shared Windows GitLab runners](https://about.gitlab.com/releases/2020/01/22/gitlab-12-7-released/#windows-shared-runners-on-gitlabcom-beta)
40-
are built with [Packer](https://www.packer.io/).
41-
42-
The Infrastructure as Code repository for building the Google Cloud images is available at:
43-
[GitLab Google Cloud Platform Shared Runner Images](https://gitlab.com/gitlab-org/ci-cd/shared-runners/images/gcp/windows-containers).
44-
45-
### Build image
46-
47-
There is a chance that your Google Cloud group may already have an image
48-
built. Search the available images before you do the work to build your
49-
own.
50-
51-
Build a Google Cloud image with the above shared runners repository by doing the following:
52-
53-
1. Install [Packer](https://www.packer.io/) (tested to work with version 1.5.1).
54-
1. Install Packer Windows Update Provisioner.
55-
1. Clone the repository <https://github.com/rgl/packer-provisioner-windows-update> and `cd` into the cloned directory.
56-
1. Run the command `go build -o packer-provisioner-windows-update` (requires `go` to be installed).
57-
1. Verify `packer-provisioner-windows-update` is in the `PATH` environment variable.
58-
1. Add all [required environment variables](https://gitlab.com/gitlab-org/ci-cd/shared-runners/images/gcp/windows-containers/-/blob/main/packer.json#L2-10)
59-
in the `packer.json` file to your environment (perhaps use [`direnv`](https://direnv.net/)).
60-
1. Build the image by running the command: `packer build packer.json`.
61-
62-
## How to use a Windows image in GCP
63-
64-
1. In a web browser, go to the [Google Cloud Platform console](https://console.cloud.google.com/compute/images).
65-
1. Filter images by the name you used when creating image, `windows` is likely all you need to filter by.
66-
1. Select the image's name.
67-
1. Select **CREATE INSTANCE**.
68-
1. Important: Change name to what you'd like as you can't change it later.
69-
1. Optional: Change Region to be closest to you as well as any other option you'd like.
70-
1. Select **Create** at the bottom of the page.
71-
1. Select the name of your newly created VM Instance (optionally you can filter to find it).
72-
1. Select **Set Windows password**.
73-
1. Optional: Set a username or use default.
74-
1. Select **Next**.
75-
1. Copy and save the password as it is not shown again.
76-
1. Select **RDP** down arrow.
77-
1. Select **Download the RDP file**.
78-
1. Open the downloaded RDP file with the Windows remote desktop app (<https://learn.microsoft.com/en-us/windows-server/remote/remote-desktop-services/clients/remote-desktop-clients>).
79-
1. Select **Continue** to accept the certificate.
80-
1. Enter the password and select **Next**.
81-
82-
You should now be connected into a Windows machine with a command prompt.
83-
84-
### Optional: Use GCP VM Instance as a runner
85-
86-
- Register the runner with a project: `gitlab-runner.exe register`.
87-
- Install the runner:`gitlab-runner.exe install`.
88-
- Start the runner: `gitlab-runner.exe start`.
89-
90-
For more information, see [Install GitLab Runner on Windows](https://docs.gitlab.com/runner/install/windows.html)
91-
and [Registering runners](https://docs.gitlab.com/runner/register/index.html).
92-
93-
## Developer tips
94-
95-
Here are a few tips on GCP and Windows.
96-
97-
### GCP cost savings
98-
99-
To minimize the cost of your GCP VM instance, stop it when you're not using it.
100-
If you do, you must download the RDP file again from the console as the IP
101-
address changes every time you stop and start it.
102-
103-
### chocolatey
104-
105-
Chocolatey is a package manager for Windows. You can search for packages on <https://chocolatey.org/>.
106-
107-
- `choco install vim`
108-
109-
### Visual Studio (install / usage for full GUI)
110-
111-
You can install Visual Studio and run it within the Windows Remote Desktop app.
112-
113-
Install it by running: `choco install visualstudio2019community`
114-
115-
Start it by running: `"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\devenv.exe" .`
116-
117-
### .NET 3 support
118-
119-
You can install .NET version 3 support with the following `DISM` command:
120-
121-
`DISM /Online /Enable-Feature /FeatureName:NetFx3 /All`
122-
123-
### nix -> Windows `cmd` tips
124-
125-
The first tip for using the Windows command shell is to open PowerShell and use that instead.
126-
127-
Start PowerShell: `start powershell`.
128-
129-
PowerShell has aliases for all of the following commands so you don't have to learn the native commands:
130-
131-
- `ls` ---> `dir`
132-
- `rm` ---> `del`
133-
- `rm -rf nonemptydir` ---> `rmdir /S nonemptydir`
134-
- `/` ---> <code>&#92;</code> (path separator)
135-
- `cat` ---> `type`
136-
- `mv` ---> `move`
137-
- Redirection works the same (for example, `>` and `2>&1`)
138-
- `.\some.exe` to call a local executable
139-
- curl is available
140-
- `..` and `.` are available
10+
<!-- This redirect file can be deleted after <2025-01-31>. -->
11+
<!-- Redirects that point to other docs in the same project expire in three months. -->
12+
<!-- Redirects that point to docs in a different project or site (for example, link is not relative and starts with `https:`) expire in one year. -->
13+
<!-- Before deletion, see: https://docs.gitlab.com/ee/development/documentation/redirects.html -->

doc/topics/autodevops/cicd_variables.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ Use these variables to integrate CI/CD with PostgreSQL databases.
8787
| `POSTGRES_CHART_REPOSITORY` | Helm Chart repository used to search for PostgreSQL chart. Defaults to `https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami`. |
8888
| `POSTGRES_CHART_VERSION` | Helm Chart version used for PostgreSQL chart. Defaults to `8.2.1`. |
8989

90-
## Job-disabling variables
90+
## Job-skipping variables
9191

92-
Use these variables to disable CI/CD jobs.
92+
Use these variables to skip specific types of CI/CD jobs. When skipped, the CI/CD jobs don't get created or run.
9393

9494
| **Job name** | **CI/CD variable** | **GitLab version** | **Description** |
9595
|----------------------------------------|---------------------------------|-----------------------|-----------------|

doc/topics/autodevops/customize.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ You can override this behavior by defining specific variables:
113113
114114
These variables also affect Auto Build and Auto Container Scanning. If you don't want to build and push an image to
115115
`$CI_APPLICATION_REPOSITORY:$CI_APPLICATION_TAG`, include only `Jobs/Deploy.gitlab-ci.yml`, or
116-
[disable the `build` jobs](cicd_variables.md#job-disabling-variables).
116+
[skip the `build` jobs](cicd_variables.md#job-skipping-variables).
117117

118118
If you use Auto Container Scanning and set a value for `$CI_APPLICATION_REPOSITORY`, then you should
119119
also update `$CS_DEFAULT_BRANCH_IMAGE`. For more information, see

doc/topics/autodevops/stages.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -291,15 +291,15 @@ to set `DAST_WEBSITE` to any staging or production environment. DAST Full Scan
291291
actively attacks the target, which can take down your application and lead to
292292
data loss or corruption.
293293

294-
### Disabling Auto DAST
294+
### Skipping Auto DAST
295295

296-
You can disable DAST:
296+
You can skip DAST jobs:
297297

298298
- On all branches by setting the `DAST_DISABLED` CI/CD variable to `"true"`.
299299
- Only on the default branch by setting the `DAST_DISABLED_FOR_DEFAULT_BRANCH`
300300
variable to `"true"`.
301301
- Only on feature branches by setting `REVIEW_DISABLED` variable to
302-
`"true"`. This also disables the Review App.
302+
`"true"`. This also skips the Review App.
303303

304304
## Auto Browser Performance Testing
305305

@@ -525,4 +525,4 @@ for updates.
525525

526526
This stage is enabled by default. You can disable it by adding the
527527
`CODE_INTELLIGENCE_DISABLED` CI/CD variable. Read more about
528-
[disabling Auto DevOps jobs](../../topics/autodevops/cicd_variables.md#job-disabling-variables).
528+
[disabling Auto DevOps jobs](../../topics/autodevops/cicd_variables.md#job-skipping-variables).

doc/user/application_security/policies/scan_execution_policies.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Scan execution policies are enforced across all projects that are linked to the
2626
static analysis, or other scanners that do not require a build in the project, are still able to
2727
run and be enforced.
2828

29-
Scan execution policies, compared to pipeline execution policies, provide a faster path to configure GitLab security scans across multiple projects to manage security and compliance.
29+
Scan execution policies, compared to pipeline execution policies, provide a faster path to configure GitLab security scans across multiple projects to manage security and compliance.
3030

3131
If any of the following cases are true, use [pipeline execution policies](pipeline_execution_policies.md) instead:
3232

@@ -430,4 +430,4 @@ To skip scan jobs with variables, you can use:
430430
- `SECRET_DETECTION_DISABLED: "true"` to skip secret detection jobs.
431431
- `DEPENDENCY_SCANNING_DISABLED: "true"` to skip dependency scanning jobs.
432432
433-
For an overview of all variables that can skip jobs, see [CI/CD variables documentation](../../../topics/autodevops/cicd_variables.md#job-disabling-variables)
433+
For an overview of all variables that can skip jobs, see [CI/CD variables documentation](../../../topics/autodevops/cicd_variables.md#job-skipping-variables)

doc/user/duo_workflow/index.md

+28-21
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,16 @@ Before you can use GitLab Duo Workflow:
5454

5555
### Install Docker and set the socket file path
5656

57-
GitLab Duo Workflow needs an execution platform where it can execute arbitrary code,
57+
GitLab Duo Workflow needs an execution platform like Docker where it can execute arbitrary code,
5858
read and write files, and make API calls to GitLab.
5959

6060
#### Automated setup
6161

62-
Installs Docker, Colima, and sets Docker socket path in VS Code settings.
62+
The setup script installs Docker and Colima, pulls the Docker base image, and sets Docker socket path in VS Code settings.
6363
You can run the script with the `--dry-run` flag to check the dependencies
6464
that get installed with the script.
6565

66-
1. Download the [script](https://gitlab.com/-/snippets/3745948).
66+
1. Download the [setup script](https://gitlab.com/-/snippets/3745948).
6767
1. Run the script.
6868

6969
```shell
@@ -73,27 +73,34 @@ that get installed with the script.
7373

7474
#### Manual setup
7575

76-
Sets socket path if you have
77-
[Docker or Docker alternatives](https://handbook.gitlab.com/handbook/tools-and-tips/mac/#docker-desktop)
78-
installed already.
76+
If you have [Docker Desktop](https://handbook.gitlab.com/handbook/tools-and-tips/mac/#docker-desktop)
77+
or a container manager other than Colima installed already:
7978

80-
1. Open VS Code, then open its settings:
81-
- On Mac: <kbd>Cmd</kbd> + <kbd>,</kbd>
82-
- On Windows and Linux: <kbd>Ctrl</kbd> + <kbd>,</kbd>
83-
1. In the upper-right corner, select the **Open Settings (JSON)** icon.
84-
1. Ensure the Docker socket settings are configured. If not, add this line to your settings file and save it:
79+
1. Pull the base Docker image:
80+
81+
```shell
82+
docker pull registry.gitlab.com/gitlab-org/duo-workflow/default-docker-image/workflow-generic-image:v0.0.4
83+
```
84+
85+
1. Set the Docker socket path in VS Code:
86+
1. Open VS Code, then open its settings:
87+
- On Mac: <kbd>Cmd</kbd> + <kbd>,</kbd>
88+
- On Windows and Linux: <kbd>Ctrl</kbd> + <kbd>,</kbd>
89+
1. In the upper-right corner, select the **Open Settings (JSON)** icon.
90+
1. Add the Docker socket path setting `gitlab.duoWorkflow.dockerSocket`, according to your container manager, and save your settings file.
91+
Some examples for common container managers on macOS, where you would replace `<your_user>` with your user's home folder:
8592

86-
- For Rancher Desktop
93+
- Rancher Desktop:
8794

88-
```json
89-
"gitlab.duoWorkflow.dockerSocket": "${userHome}/.rd/docker.sock",
90-
```
95+
```json
96+
"gitlab.duoWorkflow.dockerSocket": "/Users/<your_user>/.rd/docker.sock",
97+
```
9198

92-
- For Colima
99+
- Colima:
93100

94-
```json
95-
"gitlab.duoWorkflow.dockerSocket": "${userHome}/.colima/default/docker.sock",
96-
```
101+
```json
102+
"gitlab.duoWorkflow.dockerSocket": "/Users/<your_user>/.colima/default/docker.sock",
103+
```
97104

98105
## Use GitLab Duo Workflow in VS Code
99106

@@ -135,8 +142,8 @@ If you encounter issues:
135142
1. Check that your open folder in VS Code corresponds to the GitLab project you want to interact with.
136143
1. Ensure that you've checked out the branch as well.
137144
1. Check your Docker and Docker socket configuration:
138-
1. Try [manual](#manual-setup) Docker socket configuration.
139-
1. If using Colima and encountering issues, try restarting it:
145+
1. [Install Docker and set the socket file path](#install-docker-and-set-the-socket-file-path).
146+
1. Restart your container manager. For example, if using Colima:
140147

141148
```shell
142149
colima stop

spec/requests/jwt_controller_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
{
4747
"errors" => [{
4848
"code" => "UNAUTHORIZED",
49-
"message" => "HTTP Basic: Access denied. If a password was provided for Git authentication, the password was incorrect or you're required to use a token instead of a password. If a token was provided, it was either incorrect, expired, or improperly scoped. See http://www.example.com/help/user/profile/account/two_factor_authentication.md#troubleshooting"
49+
"message" => "HTTP Basic: Access denied. If a password was provided for Git authentication, the password was incorrect or you're required to use a token instead of a password. If a token was provided, it was either incorrect, expired, or improperly scoped. See http://www.example.com/help/user/profile/account/two_factor_authentication_troubleshooting.md#error-http-basic-access-denied-if-a-password-was-provided-for-git-authentication-"
5050
}]
5151
}
5252
)

0 commit comments

Comments
 (0)