Fix the repository cloning error on Windows with `cmd` shell executor

There can be
```
  error setting certificate verify locations:
  CAfile: <PROJECT_PATH>.tmp\CI_SERVER_TLS_CA_FILE
    CApath: none
    The system cannot find the path specified.
```
error during repository cloning on Windows with `cmd` shell executor.

The reason is that command line arguments length limit on Windows
[is 8191 bytes](https://support.microsoft.com/en-us/help/830473/command-prompt-cmd-exe-command-line-string-limitation).

To avoid the issue let's split the certificate chain into several
commands to write to a file.

This fixes #3422, #3769, #4411.

Signed-off-by: Alexey Shumkin <[email protected]>
Status Job ID Name Coverage
  Prebuild
passed #260144262
check feature flags docs

00:01:52

passed #260144248
clone test repo

00:01:43

passed #260144259
dep check

00:01:46

passed #260144246
docker
helper images

00:07:46

manual #260144249
allowed to fail manual
review-docs-deploy
passed #260144251
gitlab-org
tests definitions

00:02:53

 
  Test
passed #260144271
code_quality

00:02:15

passed #260144282
docs lint

00:01:08

passed #260144283
git 1.7.1

00:02:10

passed #260144266
license_management

00:04:53

passed #260144272
docker
unit test 1/5

00:12:23

passed #260144273
docker
unit test 2/5

00:20:31

passed #260144274
docker
unit test 3/5

00:11:52

passed #260144275
docker
unit test 4/5

00:05:15

passed #260144276
docker
unit test 5/5

00:07:00

passed #260144277
docker
unit test with race 1/5

00:11:49

failed #260144278
docker allowed to fail
unit test with race 2/5

00:22:06

failed #260144279
docker allowed to fail
unit test with race 3/5

00:14:27

passed #260144280
docker
unit test with race 4/5

00:05:47

passed #260144281
docker
unit test with race 5/5

00:08:04

 
  Coverage
passed #260144285
race conditions detector

00:01:49

passed #260144284
test coverage report

00:01:44

62.7%
passed #260144286
test junit report

00:01:21

 
  Build
passed #260144287
gitlab-org
binaries darwin/386 darwin/amd64

00:03:59

passed #260144288
gitlab-org
binaries freebsd/386 freebsd/amd64 freebsd/arm

00:05:00

passed #260144289
gitlab-org
binaries linux/386 linux/amd64 linux/arm

00:04:51

passed #260144290
gitlab-org
binaries windows/386 windows/amd64

00:03:56

 
  Package
passed #260144291
gitlab-org
package-deb

00:02:18

passed #260144292
gitlab-org
package-rpm

00:02:14

 
  Release
passed #260144293
docker
development docker images

00:03:50

passed #260144294
static QA

00:00:38

 
  Cleanup
manual #260144295
allowed to fail manual
review-docs-cleanup
 
Name Stage Failure
failed
unit test with race 3/5 Test
coverage: 62.4% of statements
ok gitlab.com/gitlab-org/gitlab-runner/helpers/archives 1.036s
Makefile:134: recipe for target 'parallel_test_execute' failed
make: *** [parallel_test_execute] Error 1
Uploading artifacts...
.cover/*: found 13 matching files
.testoutput/*: found 14 matching files

Uploading artifacts to coordinator... ok
id=260144279 responseStatus=201 Created token=HDSia4f1
ERROR: Job failed: exit code 1
failed
unit test with race 2/5 Test
exit status 1
FAIL gitlab.com/gitlab-org/gitlab-runner/executors/docker/machine 0.127s
Makefile:134: recipe for target 'parallel_test_execute' failed
make: *** [parallel_test_execute] Error 1
Uploading artifacts...
.cover/*: found 14 matching files
.testoutput/*: found 14 matching files

Uploading artifacts to coordinator... ok
id=260144278 responseStatus=201 Created token=ikzXfYmE
ERROR: Job failed: exit code 1