From a6864b372afe8abbceacc6a920267718563f818d Mon Sep 17 00:00:00 2001 From: Brian de Alwis Date: Fri, 19 Jun 2020 09:55:36 -0400 Subject: [PATCH] review nits --- integration/debug_test.go | 8 ++--- integration/testdata/debug/skaffold-bp.yaml | 40 --------------------- integration/testdata/debug/skaffold.yaml | 31 ++++++++++++++-- 3 files changed, 32 insertions(+), 47 deletions(-) delete mode 100644 integration/testdata/debug/skaffold-bp.yaml diff --git a/integration/debug_test.go b/integration/debug_test.go index 557e6287342..59ce8dd661d 100644 --- a/integration/debug_test.go +++ b/integration/debug_test.go @@ -38,20 +38,18 @@ func TestDebug(t *testing.T) { }{ { description: "kubectl", - config: "skaffold.yaml", deployments: []string{"java"}, pods: []string{"nodejs", "npm", "python3", "go"}, }, { description: "kustomize", - config: "skaffold.yaml", args: []string{"--profile", "kustomize"}, deployments: []string{"java"}, pods: []string{"nodejs", "npm", "python3", "go"}, }, { description: "buildpacks", - config: "skaffold-bp.yaml", + args: []string{"--profile", "buildpacks"}, deployments: []string{"java"}, pods: []string{"nodejs", "npm", "python3", "go"}, }, @@ -59,11 +57,11 @@ func TestDebug(t *testing.T) { for _, test := range tests { t.Run(test.description, func(t *testing.T) { // Run skaffold build first to fail quickly on a build failure - skaffold.Build(test.args...).InDir("testdata/debug").WithConfig(test.config).RunOrFail(t) + skaffold.Build(test.args...).InDir("testdata/debug").RunOrFail(t) ns, client := SetupNamespace(t) - skaffold.Debug(test.args...).InDir("testdata/debug").WithConfig(test.config).InNs(ns.Name).RunBackground(t) + skaffold.Debug(test.args...).InDir("testdata/debug").InNs(ns.Name).RunBackground(t) verifyDebugAnnotations := func(annotations map[string]string) { var configs map[string]debug.ContainerDebugConfiguration diff --git a/integration/testdata/debug/skaffold-bp.yaml b/integration/testdata/debug/skaffold-bp.yaml deleted file mode 100644 index 84fa1860a2a..00000000000 --- a/integration/testdata/debug/skaffold-bp.yaml +++ /dev/null @@ -1,40 +0,0 @@ -apiVersion: skaffold/v2beta5 -kind: Config -build: - artifacts: - - image: skaffold-debug-java - context: java - buildpacks: - builder: "gcr.io/buildpacks/builder:v1" - - image: skaffold-debug-npm - context: npm - buildpacks: - builder: "gcr.io/buildpacks/builder:v1" - - image: skaffold-debug-nodejs - context: nodejs - buildpacks: - builder: "gcr.io/buildpacks/builder:v1" - - image: skaffold-debug-python3 - context: python3 - buildpacks: - builder: "gcr.io/buildpacks/builder:v1" - - image: skaffold-debug-go - context: go - buildpacks: - builder: "gcr.io/buildpacks/builder:v1" - env: - - GOOGLE_GCFLAGS="-gcflags='all=-N -l'" - -deploy: - kubectl: - manifests: - - java/k8s/web.yaml - - nodejs/k8s/pod.yaml - - npm/k8s/pod.yaml - - python3/k8s/pod.yaml - - go/k8s/pod.yaml -profiles: - - name: kustomize - deploy: - kustomize: {} - kubectl: {} diff --git a/integration/testdata/debug/skaffold.yaml b/integration/testdata/debug/skaffold.yaml index a11e1a7cd68..90e1c7a64bd 100644 --- a/integration/testdata/debug/skaffold.yaml +++ b/integration/testdata/debug/skaffold.yaml @@ -27,8 +27,35 @@ deploy: - npm/k8s/pod.yaml - python3/k8s/pod.yaml - go/k8s/pod.yaml + profiles: - - name: kustomize - deploy: +- name: kustomize + deploy: kustomize: {} kubectl: {} +# use GCP Buildpacks to build the individual projects +- name: buildpacks + build: + artifacts: + - image: skaffold-debug-java + context: java + buildpacks: + builder: "gcr.io/buildpacks/builder:v1" + - image: skaffold-debug-npm + context: npm + buildpacks: + builder: "gcr.io/buildpacks/builder:v1" + - image: skaffold-debug-nodejs + context: nodejs + buildpacks: + builder: "gcr.io/buildpacks/builder:v1" + - image: skaffold-debug-python3 + context: python3 + buildpacks: + builder: "gcr.io/buildpacks/builder:v1" + - image: skaffold-debug-go + context: go + buildpacks: + builder: "gcr.io/buildpacks/builder:v1" + env: + - GOOGLE_GCFLAGS="-gcflags='all=-N -l'"