You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need either `/bin/bash -c` or `/bin/sh -ic` to make our supported
images to work properly. That's due to a hack to auto-enable SCLs.
https://github.com/openshift/sti-base/blob/8d95148/Dockerfile#L23-L29
When `/bin/sh` is a symlink to `/bin/bash`, the ENV environment variable
is only evaluated when the shell is started in interactive mode.
Making the shell interactive with `-i` seems to make less sense than
requiring Bash. For images that do not include Bash, the full
Command+Args syntax is the way to go.
Copy file name to clipboardexpand all lines: pkg/build/api/v1/types.go
+8-8
Original file line number
Diff line number
Diff line change
@@ -415,7 +415,7 @@ type SourceBuildStrategy struct {
415
415
// There are five different ways to configure the hook. As an example, all forms
416
416
// below are equivalent and will execute `rake test --verbose`.
417
417
//
418
-
// 1. Shell script:
418
+
// 1. Bash script:
419
419
//
420
420
// BuildPostCommitSpec{
421
421
// Script: "rake test --verbose",
@@ -424,7 +424,7 @@ type SourceBuildStrategy struct {
424
424
// The above is a convenient form which is equivalent to:
425
425
//
426
426
// BuildPostCommitSpec{
427
-
// Command: []string{"/bin/sh", "-c"},
427
+
// Command: []string{"/bin/bash", "-c"},
428
428
// Args: []string{"rake test --verbose"},
429
429
// }
430
430
//
@@ -453,8 +453,8 @@ type SourceBuildStrategy struct {
453
453
// }
454
454
//
455
455
// This form is useful if you need to pass arguments that would otherwise be
456
-
// hard to quote properly in the shell script. In the script, $0 will be
457
-
// "/bin/sh" and $1, $2, etc, are the positional arguments from Args.
456
+
// hard to quote properly in the Bash script. In the script, $0 will be
457
+
// "/bin/bash" and $1, $2, etc, are the positional arguments from Args.
458
458
//
459
459
// 5. Command with arguments:
460
460
//
@@ -469,19 +469,19 @@ type SourceBuildStrategy struct {
469
469
// the fields are specified, the hook is not executed.
470
470
typeBuildPostCommitSpecstruct {
471
471
// Command is the command to run. It may not be specified with Script.
472
-
// This might be needed if the image doesn't have "/bin/sh", or if you
472
+
// This might be needed if the image doesn't have `/bin/bash`, or if you
473
473
// do not want to use a shell. In all other cases, using Script might be
474
474
// more convenient.
475
475
Command []string`json:"command,omitempty" description:"command to be executed in a container running the build output image replacing the image's entrypoint"`
476
476
// Args is a list of arguments that are provided to either Command,
477
477
// Script or the Docker image's default entrypoint. The arguments are
478
478
// placed immediately after the command to be run.
479
479
Args []string`json:"args,omitempty" description:"arguments to command, script or the default image entrypoint"`
480
-
// Script is a shell script to be run with `/bin/sh -c`. It may not be
480
+
// Script is a Bash script to be run with `/bin/bash -c`. It may not be
481
481
// specified with Command. Use Script when a shell script is appropriate
482
482
// to execute the post build hook, for example for running unit tests
483
-
// with "rake test". If you need control over the image entrypoint, or
484
-
// if the image does not have "/bin/sh", use Command and/or Args.
483
+
// with `rake test`. If you need control over the image entrypoint, or
484
+
// if the image does not have `/bin/bash`, use Command and/or Args.
485
485
Scriptstring`json:"script,omitempty" description:"shell script to be executed in a container running the build output image"`
Copy file name to clipboardexpand all lines: pkg/build/api/v1beta3/types.go
+8-8
Original file line number
Diff line number
Diff line change
@@ -402,7 +402,7 @@ type SourceBuildStrategy struct {
402
402
// There are five different ways to configure the hook. As an example, all forms
403
403
// below are equivalent and will execute `rake test --verbose`.
404
404
//
405
-
// 1. Shell script:
405
+
// 1. Bash script:
406
406
//
407
407
// BuildPostCommitSpec{
408
408
// Script: "rake test --verbose",
@@ -411,7 +411,7 @@ type SourceBuildStrategy struct {
411
411
// The above is a convenient form which is equivalent to:
412
412
//
413
413
// BuildPostCommitSpec{
414
-
// Command: []string{"/bin/sh", "-c"},
414
+
// Command: []string{"/bin/bash", "-c"},
415
415
// Args: []string{"rake test --verbose"},
416
416
// }
417
417
//
@@ -440,8 +440,8 @@ type SourceBuildStrategy struct {
440
440
// }
441
441
//
442
442
// This form is useful if you need to pass arguments that would otherwise be
443
-
// hard to quote properly in the shell script. In the script, $0 will be
444
-
// "/bin/sh" and $1, $2, etc, are the positional arguments from Args.
443
+
// hard to quote properly in the Bash script. In the script, $0 will be
444
+
// "/bin/bash" and $1, $2, etc, are the positional arguments from Args.
445
445
//
446
446
// 5. Command with arguments:
447
447
//
@@ -456,19 +456,19 @@ type SourceBuildStrategy struct {
456
456
// the fields are specified, the hook is not executed.
457
457
typeBuildPostCommitSpecstruct {
458
458
// Command is the command to run. It may not be specified with Script.
459
-
// This might be needed if the image doesn't have "/bin/sh", or if you
459
+
// This might be needed if the image doesn't have `/bin/bash`, or if you
460
460
// do not want to use a shell. In all other cases, using Script might be
461
461
// more convenient.
462
462
Command []string`json:"command,omitempty" description:"command to be executed in a container running the build output image replacing the image's entrypoint"`
463
463
// Args is a list of arguments that are provided to either Command,
464
464
// Script or the Docker image's default entrypoint. The arguments are
465
465
// placed immediately after the command to be run.
466
466
Args []string`json:"args,omitempty" description:"arguments to command, script or the default image entrypoint"`
467
-
// Script is a shell script to be run with `/bin/sh -c`. It may not be
467
+
// Script is a Bash script to be run with `/bin/bash -c`. It may not be
468
468
// specified with Command. Use Script when a shell script is appropriate
469
469
// to execute the post build hook, for example for running unit tests
470
-
// with "rake test". If you need control over the image entrypoint, or
471
-
// if the image does not have "/bin/sh", use Command and/or Args.
470
+
// with `rake test`. If you need control over the image entrypoint, or
471
+
// if the image does not have `/bin/bash`, use Command and/or Args.
472
472
Scriptstring`json:"script,omitempty" description:"shell script to be executed in a container running the build output image"`
0 commit comments