diff --git a/.vscode/tasks.yaml b/.vscode/tasks.yaml new file mode 100644 index 0000000..22264ca --- /dev/null +++ b/.vscode/tasks.yaml @@ -0,0 +1,26 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "Bash - Selected file", + "type": "shell", + "command": "bash", + "args": [ + "${file}" + ], + { + "label": "Kustomize - Build - Selected File", + "type": "shell", + "command": "bash -c '[[ \"$(basename ${file})\" == \"kustomization.yaml\" ]] && kubectl kustomize ${fileDirname} || echo \"❌ invalid kustomization.yaml\"'", + "problemMatcher": [], + "group": "build" + }, + { + "label": "Kustomize - Build & Deply - Selected File", + "type": "shell", + "command": "bash -c '[[ \"$(basename ${file})\" == \"kustomization.yaml\" ]] && kubectl kustomize ${fileDirname} | kubectl apply -f - || echo \"❌ invalid kustomization.yaml\"'", + "problemMatcher": [], + "group": "build" + } + ] +} \ No newline at end of file