Expected Behavior
I found in the knative docs the following build example:
apiVersion: build.knative.dev/v1alpha1
kind: Build
metadata:
name: example-build
spec:
steps:
- name: ubuntu-second
image: ubuntu
args: ['echo', 'hello-example', 'second']
steps:
- image: ubuntu
args: ['echo', 'hello-example', 'one']
The example defines the steps multiple times (actually only two times :D), the expected behavior would be that the build is rejected because the Spec is invalid.
Actual Behavior
Only one of the two steps will be executed (the step which is defined below, at least in my 3 test runs) and the other one will be ignored. The spec actually seems to be correct: https://github.com/knative/build/blob/v0.5.0/pkg/apis/build/v1alpha1/build_types.go#L69
Steps to Reproduce the Problem
- Use the manifest from above
- Run
kubectl apply -f ..
- Inspect the resulting build pod
Additional Info
kubectl versio
Client Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.1", GitCommit:"b7394102d6ef778017f2ca4046abbaa23b88c290", GitTreeState:"clean", BuildDate:"2019-04-19T22:12:47Z", GoVersion:"go1.12.4", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"12+", GitVersion:"v1.12.7-gke.10", GitCommit:"8d9b8641e72cf7c96efa61421e87f96387242ba1", GitTreeState:"clean", BuildDate:"2019-04-12T22:59:24Z", GoVersion:"go1.10.8b4", Compiler:"gc", Platform:"linux/amd64"}
I will try to dig into the issue and hopefully I will be able to fix this (mentoring or some hints are welcome :) )
Expected Behavior
I found in the knative docs the following build example:
apiVersion: build.knative.dev/v1alpha1 kind: Build metadata: name: example-build spec: steps: - name: ubuntu-second image: ubuntu args: ['echo', 'hello-example', 'second'] steps: - image: ubuntu args: ['echo', 'hello-example', 'one']The example defines the
stepsmultiple times (actually only two times :D), the expected behavior would be that the build is rejected because the Spec is invalid.Actual Behavior
Only one of the two steps will be executed (the step which is defined below, at least in my 3 test runs) and the other one will be ignored. The spec actually seems to be correct: https://github.com/knative/build/blob/v0.5.0/pkg/apis/build/v1alpha1/build_types.go#L69
Steps to Reproduce the Problem
kubectl apply -f ..Additional Info
kubectl versio Client Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.1", GitCommit:"b7394102d6ef778017f2ca4046abbaa23b88c290", GitTreeState:"clean", BuildDate:"2019-04-19T22:12:47Z", GoVersion:"go1.12.4", Compiler:"gc", Platform:"darwin/amd64"} Server Version: version.Info{Major:"1", Minor:"12+", GitVersion:"v1.12.7-gke.10", GitCommit:"8d9b8641e72cf7c96efa61421e87f96387242ba1", GitTreeState:"clean", BuildDate:"2019-04-12T22:59:24Z", GoVersion:"go1.10.8b4", Compiler:"gc", Platform:"linux/amd64"}I will try to dig into the issue and hopefully I will be able to fix this (mentoring or some hints are welcome :) )