-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add integration test for skaffold dev
I added an integration test to make sure a Job is deleted and redeployed upon changes when running via skaffold dev. The test sets up by creating a file foo. It runs skaffold dev and make sure the Job is created. It then changes foo so that skaffold redeploys, and makes sure the UID of the new Job is different from the UID of the old job.
- Loading branch information
Priya Wadhwa
committed
Aug 30, 2018
1 parent
8747bf9
commit 9744858
Showing
7 changed files
with
168 additions
and
9 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
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,8 @@ | ||
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 . | ||
COPY foo /foo |
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,11 @@ | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: test-dev-job | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: test-dev-job | ||
image: gcr.io/k8s-skaffold/test-dev-job | ||
restartPolicy: OnFailure |
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,13 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
"time" | ||
) | ||
|
||
func main() { | ||
for { | ||
fmt.Println("Hello world!!") | ||
time.Sleep(time.Second * 1) | ||
} | ||
} |
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,14 @@ | ||
apiVersion: skaffold/v1alpha2 | ||
kind: Config | ||
build: | ||
artifacts: | ||
- imageName: gcr.io/k8s-skaffold/test-dev-job | ||
deploy: | ||
kubectl: | ||
manifests: | ||
- k8s-* | ||
profiles: | ||
- name: gcb | ||
build: | ||
googleCloudBuild: | ||
projectId: k8s-skaffold |
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