Move commander interface to helpers/process

Extract `Commander` interface and the os implementation to the
`helpers/process` package so that we can re-use it to the shell
executor.

The main goal of the MR is not to refactor anything from the Commander
interface and CreateOptions, but simply extract it from 1 package to
another.

reference #3376
reference #4438
50 jobs for !1654 with extract-comamnder-from-custom-executor in 38 minutes and 53 seconds (queued for 2 seconds)
detached
Status Job ID Name Coverage
  Prebuild
passed #417125416
clone test repo

00:01:18

passed #417125415
docker
helper images

00:07:13

passed #417125417
gitlab-org
tests definitions

00:04:13

 
  Test
passed #417125420
check feature flags docs

00:01:27

passed #417125423
check mocks

00:04:08

passed #417125421
check modules

00:01:37

passed #417125425
code_quality

00:01:46

passed #417125419
docs lint

00:01:10

passed #417125477
git 1.7.1

00:02:42

passed #417125418
license_management

00:06:01

passed #417125426
docker
unit test 1/8

00:03:39

passed #417125429
docker
unit test 2/8

00:03:47

passed #417125432
docker
unit test 3/8

00:13:19

passed #417125435
docker
unit test 4/8

00:04:27

passed #417125437
docker
unit test 5/8

00:03:26

passed #417125441
docker
unit test 6/8

00:02:32

passed #417125444
docker
unit test 7/8

00:03:15

passed #417125446
docker
unit test 8/8

00:02:47

passed #417125448
docker
unit test with race 1/8

00:04:47

failed #417125450
docker allowed to fail
unit test with race 2/8

00:04:19

passed #417125453
docker
unit test with race 3/8

00:14:02

failed #417125455
docker allowed to fail
unit test with race 4/8

00:05:26

passed #417125457
docker
unit test with race 5/8

00:03:25

passed #417125460
docker
unit test with race 6/8

00:03:47

passed #417125464
docker
unit test with race 7/8

00:04:01

passed #417125466
docker
unit test with race 8/8

00:04:03

failed #417125468
shell windows-1803 allowed to fail
windows 1803 tests 1/3

00:07:27

failed #417125470
shell windows-1803 allowed to fail
windows 1803 tests 2/3

00:19:56

failed #417125472
shell windows-1803 allowed to fail
windows 1803 tests 3/3

00:05:43

failed #417125474
shell windows-1809 allowed to fail
windows 1809 tests 1/3

00:07:55

failed #417125475
shell windows-1809 allowed to fail
windows 1809 tests 2/3

00:20:26

failed #417125476
shell windows-1809 allowed to fail
windows 1809 tests 3/3

00:06:05

 
  Coverage
passed #417125481
check windows 1803 test failures

00:01:07

passed #417125482
check windows 1809 test failures

00:01:03

passed #417125480
race conditions detector

00:01:24

passed #417125478
test coverage report

00:01:30

64.3%
passed #417125479
test junit report

00:01:26

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

00:04:07

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

00:05:50

passed #417125487
gitlab-org
binaries linux/386 linux/amd64 linux/arm linux/arm64

00:06:12

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

00:03:38

 
  Package
passed #417125491
gitlab-org
package-deb

00:02:10

passed #417125492
gitlab-org
package-rpm

00:02:07

 
  Release
passed #417125493
release
development S3

00:01:23

passed #417125494
release
development docker images

00:01:42

passed #417125495
shell windows-1803
development servercore1803 helper docker image

00:05:39

passed #417125496
shell windows-1809
development servercore1809 helper docker image

00:02:48

passed #417125497
static QA

00:00:34

 
  Docs
manual #417125499
allowed to fail manual
review-docs-cleanup
manual #417125498
allowed to fail manual
review-docs-deploy
 
Name Stage Failure
failed
windows 1809 tests 2/3 Test
GO version:   go1.13.4
Built: 2019-12-22T11:55:34+0000
OS/Arch: windows/amd64
Uploading artifacts...
Runtime platform
arch=amd64 os=windows pid=4640 revision=ac8e767a version=12.6.0
.testoutput/*: found 25 matching files

WARNING: Failed to load system CertPool: crypto/x509: system root pool is not available on Windows
Uploading artifacts to coordinator... ok
id=417125475 responseStatus=201 Created token=9Zsbftdr
ERROR: Job failed: exit status 1
failed
windows 1803 tests 2/3 Test
GO version:   go1.13.4
Built: 2019-12-22T11:55:34+0000
OS/Arch: windows/amd64
Uploading artifacts...
Runtime platform
arch=amd64 os=windows pid=53548 revision=ac8e767a version=12.6.0
.testoutput/*: found 25 matching files

WARNING: Failed to load system CertPool: crypto/x509: system root pool is not available on Windows
Uploading artifacts to coordinator... ok
id=417125470 responseStatus=201 Created token=PJoNnM41
ERROR: Job failed: exit status 1
failed
windows 1809 tests 1/3 Test
GO version:   go1.13.4
Built: 2019-12-22T11:55:34+0000
OS/Arch: windows/amd64
Uploading artifacts...
Runtime platform
arch=amd64 os=windows pid=8232 revision=ac8e767a version=12.6.0
.testoutput/*: found 25 matching files

WARNING: Failed to load system CertPool: crypto/x509: system root pool is not available on Windows
Uploading artifacts to coordinator... ok
id=417125474 responseStatus=201 Created token=mCzscsyy
ERROR: Job failed: exit status 1
failed
windows 1803 tests 1/3 Test
GO version:   go1.13.4
Built: 2019-12-22T11:55:34+0000
OS/Arch: windows/amd64
Uploading artifacts...
Runtime platform
arch=amd64 os=windows pid=51852 revision=ac8e767a version=12.6.0
.testoutput/*: found 25 matching files

WARNING: Failed to load system CertPool: crypto/x509: system root pool is not available on Windows
Uploading artifacts to coordinator... ok
id=417125468 responseStatus=201 Created token=qJhv2fHw
ERROR: Job failed: exit status 1
failed
windows 1809 tests 3/3 Test
GO version:   go1.13.4
Built: 2019-12-22T11:55:34+0000
OS/Arch: windows/amd64
Uploading artifacts...
Runtime platform
arch=amd64 os=windows pid=740 revision=ac8e767a version=12.6.0
.testoutput/*: found 25 matching files

WARNING: Failed to load system CertPool: crypto/x509: system root pool is not available on Windows
Uploading artifacts to coordinator... ok
id=417125476 responseStatus=201 Created token=MgKZu313
ERROR: Job failed: exit status 1
failed
windows 1803 tests 3/3 Test
GO version:   go1.13.4
Built: 2019-12-22T11:55:34+0000
OS/Arch: windows/amd64
Uploading artifacts...
Runtime platform
arch=amd64 os=windows pid=51884 revision=ac8e767a version=12.6.0
.testoutput/*: found 25 matching files

WARNING: Failed to load system CertPool: crypto/x509: system root pool is not available on Windows
Uploading artifacts to coordinator... ok
id=417125472 responseStatus=201 Created token=cNJi-nYz
ERROR: Job failed: exit status 1
failed
unit test with race 4/8 Test
PASS
coverage: 54.5% of statements
ok gitlab.com/gitlab-org/gitlab-runner/executors/shell 8.645s coverage: 54.5% of statements
make: *** [Makefile:115: parallel_test_execute] Error 1
Uploading artifacts...
.cover/*: found 10 matching files
.testoutput/*: found 10 matching files

Uploading artifacts to coordinator... ok
id=417125455 responseStatus=201 Created token=4NHqiw8T
ERROR: Job failed: exit code 1
failed
unit test with race 2/8 Test
coverage: 76.7% of statements
FAIL gitlab.com/gitlab-org/gitlab-runner/executors/custom/command 1.549s
FAIL
make: *** [Makefile:115: parallel_test_execute] Error 1
Uploading artifacts...
.cover/*: found 10 matching files
.testoutput/*: found 10 matching files

Uploading artifacts to coordinator... ok
id=417125450 responseStatus=201 Created token=taWf-9Sx
ERROR: Job failed: exit code 1