-
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.
Ensure init generates /-delimted paths (#5177)
* Ensure init generates /-delimted paths * Change InitBuilder.ArtifactType() to take the workspace for relative paths * make tests pass * minor tweaks
- Loading branch information
1 parent
98faaaa
commit 36c95e4
Showing
16 changed files
with
142 additions
and
18 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
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
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
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
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
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
7 changes: 7 additions & 0 deletions
7
pkg/skaffold/initializer/testdata/init/windows/apps/web/build/Dockerfile
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,7 @@ | ||
FROM golang:1.12.9-alpine3.10 as builder | ||
COPY web.go . | ||
RUN go build -o /web . | ||
|
||
FROM alpine:3.10 | ||
CMD ["./web"] | ||
COPY --from=builder /web . |
37 changes: 37 additions & 0 deletions
37
pkg/skaffold/initializer/testdata/init/windows/apps/web/deployment.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,37 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: leeroy-web | ||
labels: | ||
app: leeroy-web | ||
spec: | ||
type: NodePort | ||
ports: | ||
- port: 8080 | ||
targetPort: 8080 | ||
protocol: TCP | ||
name: leeroy-web | ||
selector: | ||
app: leeroy-web | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: leeroy-web | ||
labels: | ||
app: leeroy-web | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: leeroy-web | ||
template: | ||
metadata: | ||
labels: | ||
app: leeroy-web | ||
spec: | ||
containers: | ||
- name: leeroy-web | ||
image: gcr.io/k8s-skaffold/leeroy-web | ||
ports: | ||
- containerPort: 8080 |
25 changes: 25 additions & 0 deletions
25
pkg/skaffold/initializer/testdata/init/windows/apps/web/web.go
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,25 @@ | ||
package main | ||
|
||
import ( | ||
"io" | ||
"net/http" | ||
|
||
"log" | ||
) | ||
|
||
func handler(w http.ResponseWriter, r *http.Request) { | ||
resp, err := http.Get("http://leeroy-app:50051") | ||
if err != nil { | ||
panic(err) | ||
} | ||
defer resp.Body.Close() | ||
if _, err := io.Copy(w, resp.Body); err != nil { | ||
panic(err) | ||
} | ||
} | ||
|
||
func main() { | ||
log.Print("leeroy web server ready") | ||
http.HandleFunc("/", handler) | ||
http.ListenAndServe(":8080", nil) | ||
} |
14 changes: 14 additions & 0 deletions
14
pkg/skaffold/initializer/testdata/init/windows/skaffold.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,14 @@ | ||
apiVersion: skaffold/v2beta11 | ||
kind: Config | ||
metadata: | ||
name: windows | ||
build: | ||
artifacts: | ||
- image: gcr.io/k8s-skaffold/leeroy-web | ||
context: apps/web | ||
docker: | ||
dockerfile: build/Dockerfile | ||
deploy: | ||
kubectl: | ||
manifests: | ||
- apps/web/deployment.yaml |