-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(k8s): regression in globs in k8s manifest files (#4903)
* fix(k8s): throw on missing k8s manifests files The regression was introduced in #4516. Initial implementation of glob patterns in files paths could result into empty list of files. This fixes the behaviour by fail-fast existence checks for manifest files. * test: add missing tests for `readManifest` Test coverage for `spec.files` of `Deploy` action of `kubernetes` type. * Add own Deployment manifest file, because builds are not executed in the test. * Add unit tests to document and cover the expected behaviour. Initial changes from c9efb47 did not have effect. The Deploy action `with-build-action` has never been called with `readManifests`.
- Loading branch information
1 parent
65d3907
commit 1b511dc
Showing
4 changed files
with
178 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
core/test/data/test-projects/kubernetes-type/with-build-action/deployment-action.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: busybox-deployment | ||
labels: | ||
app: busybox | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: busybox | ||
template: | ||
metadata: | ||
labels: | ||
app: busybox | ||
spec: | ||
containers: | ||
- name: busybox | ||
image: busybox:1.31.1 | ||
args: [sh, -c, "while :; do sleep 2073600; done"] | ||
env: | ||
- name: FOO | ||
value: banana | ||
- name: BAR | ||
value: "" | ||
- name: BAZ | ||
value: null | ||
ports: | ||
- containerPort: 80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters