Skip to content

Commit

Permalink
don't run GCB example on structure tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nkubala committed Apr 18, 2019
1 parent 6bd7080 commit f3d7618
Show file tree
Hide file tree
Showing 10 changed files with 119 additions and 6 deletions.
7 changes: 7 additions & 0 deletions examples/google-cloud-build/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM golang:1.10.1-alpine3.7 as builder
COPY main.go .
RUN go build -o /app main.go

FROM alpine:3.7
CMD ["./app"]
COPY --from=builder /app .
33 changes: 33 additions & 0 deletions examples/google-cloud-build/README.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
=== Example: Getting started with a simple go app
:icons: font

This is a simple example based on

* *building* a single go file app and with a multistage `Dockerfile` using local docker to build
* *tagging* using the default tagPolicy (`gitCommit`)
* *deploying* a single container pod using `kubectl`
ifndef::env-github[]
==== link:{github-repo-tree}/examples/getting-started[Example files icon:github[]]

[source,yaml, indent=3, title=skaffold.yaml]
----
include::skaffold.yaml[]
----

[source,go, indent=3, title=main.go, syntax=go]
----
include::main.go[]
----

[source,docker, indent=3, title=Dockerfile]
----
include::Dockerfile[]
----

[source,yaml, indent=3, title=k8s-pod.yaml]
----
include::k8s-pod.yaml[]
----

endif::[]
8 changes: 8 additions & 0 deletions examples/google-cloud-build/k8s-pod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: v1
kind: Pod
metadata:
name: getting-started
spec:
containers:
- name: getting-started
image: gcr.io/k8s-skaffold/skaffold-example
11 changes: 11 additions & 0 deletions examples/google-cloud-build/skaffold.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: skaffold/v1beta8
kind: Config
build:
artifacts:
- image: gcr.io/k8s-skaffold/skaffold-example
googleCloudBuild:
projectId: k8s-skaffold
deploy:
kubectl:
manifests:
- k8s-*
7 changes: 7 additions & 0 deletions integration/examples/google-cloud-build/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM golang:1.10.1-alpine3.7 as builder
COPY main.go .
RUN go build -o /app main.go

FROM alpine:3.7
CMD ["./app"]
COPY --from=builder /app .
33 changes: 33 additions & 0 deletions integration/examples/google-cloud-build/README.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
=== Example: Getting started with a simple go app
:icons: font

This is a simple example based on

* *building* a single go file app and with a multistage `Dockerfile` using local docker to build
* *tagging* using the default tagPolicy (`gitCommit`)
* *deploying* a single container pod using `kubectl`
ifndef::env-github[]
==== link:{github-repo-tree}/examples/getting-started[Example files icon:github[]]

[source,yaml, indent=3, title=skaffold.yaml]
----
include::skaffold.yaml[]
----

[source,go, indent=3, title=main.go, syntax=go]
----
include::main.go[]
----

[source,docker, indent=3, title=Dockerfile]
----
include::Dockerfile[]
----

[source,yaml, indent=3, title=k8s-pod.yaml]
----
include::k8s-pod.yaml[]
----

endif::[]
8 changes: 8 additions & 0 deletions integration/examples/google-cloud-build/k8s-pod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: v1
kind: Pod
metadata:
name: getting-started
spec:
containers:
- name: getting-started
image: gcr.io/k8s-skaffold/skaffold-example
11 changes: 11 additions & 0 deletions integration/examples/google-cloud-build/skaffold.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: skaffold/v1beta8
kind: Config
build:
artifacts:
- image: gcr.io/k8s-skaffold/skaffold-example
googleCloudBuild:
projectId: k8s-skaffold
deploy:
kubectl:
manifests:
- k8s-*
4 changes: 0 additions & 4 deletions integration/examples/structure-tests/skaffold.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ deploy:
manifests:
- k8s-*
profiles:
- name: gcb
build:
googleCloudBuild:
projectId: k8s-skaffold
- name: test
test:
- image: gcr.io/k8s-skaffold/skaffold-example
Expand Down
3 changes: 1 addition & 2 deletions integration/run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ func TestRun(t *testing.T) {
pods: []string{"bazel"},
}, {
description: "Google Cloud Build",
dir: "examples/structure-tests",
args: []string{"-p", "gcb"},
dir: "examples/google-cloud-build",
pods: []string{"getting-started"},
remoteOnly: true,
}, {
Expand Down

0 comments on commit f3d7618

Please sign in to comment.