@@ -26,10 +26,10 @@ import (
26
26
"time"
27
27
"unicode"
28
28
29
- pb "google.golang.org/genproto/googleapis/devtools/cloudbuild/v1"
30
- "github.com/golang/protobuf/ptypes"
31
29
"github.com/GoogleCloudPlatform/cloud-build-local/subst"
32
30
"github.com/docker/distribution/reference"
31
+ "github.com/golang/protobuf/ptypes"
32
+ pb "google.golang.org/genproto/googleapis/devtools/cloudbuild/v1"
33
33
)
34
34
35
35
const (
@@ -38,12 +38,12 @@ const (
38
38
// MaxTimeout is the maximum allowable timeout for a build or build step.
39
39
MaxTimeout = 24 * time .Hour
40
40
41
- maxNumSteps = 100 // max number of steps.
42
- maxStepNameLength = 1000 // max length of step name.
43
- maxNumEnvs = 100 // max number of envs per step.
44
- maxEnvLength = 1000 // max length of env value.
45
- maxNumArgs = 100 // max number of args per step.
46
-
41
+ maxNumSteps = 100 // max number of steps.
42
+ maxStepNameLength = 1000 // max length of step name.
43
+ maxNumEnvs = 100 // max number of envs per step.
44
+ maxEnvLength = 65536 // max length of env value.
45
+ maxNumArgs = 100 // max number of args per step.
46
+
47
47
maxArgLength = 4000 // max length of arg value.
48
48
maxDirLength = 1000 // max length of dir value.
49
49
maxNumImages = 100 // max number of images.
@@ -357,7 +357,6 @@ func CheckArtifacts(b *pb.Build) error {
357
357
}
358
358
}
359
359
360
-
361
360
if len (b .GetArtifacts ().GetImages ()) > 0 {
362
361
b .Images = b .GetArtifacts ().GetImages ()
363
362
}
@@ -619,7 +618,7 @@ func checkEnvVars(b *pb.Build) error {
619
618
// build step local env vars
620
619
for i , s := range b .GetSteps () {
621
620
if err := runCommonEnvChecks (s .GetEnv ()); err != nil {
622
- return fmt .Errorf ("invalid .steps.env field: build step %d %v" , i , maxNumEnvs )
621
+ return fmt .Errorf ("invalid .steps.env field: build step %d %v" , i , err )
623
622
624
623
}
625
624
}
0 commit comments