Skip to content

Commit 6f64e5b

Browse files
release v1.29.0 (GoogleContainerTools#6333)
1 parent 9e8b5de commit 6f64e5b

File tree

71 files changed

+494
-43
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+494
-43
lines changed

CHANGELOG.md

+50
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,53 @@
1+
# v1.29.0 Release - 07/30/2021
2+
Note: This release comes with a new config version, `v2beta20`. To upgrade your skaffold.yaml, use `skaffold fix`. If you choose not to upgrade, skaffold will auto-upgrade as best as it can.
3+
4+
Highlights:
5+
* Introducing Skaffold lifecycle hooks [#6330](https://github.com/GoogleContainerTools/skaffold/pull/6330)
6+
* Rename Skaffold's `master` branch to `main` [#6263](https://github.com/GoogleContainerTools/skaffold/pull/6263)
7+
* Add state to event handler to track `logrus` output events [#6272](https://github.com/GoogleContainerTools/skaffold/pull/6272)
8+
* fix: kubeContext override via flag [#6331](https://github.com/GoogleContainerTools/skaffold/pull/6331)
9+
* Added developer journey tutorial [#6201](https://github.com/GoogleContainerTools/skaffold/pull/6201)
10+
11+
Fixes:
12+
* Fix tail false but still log issue [#6299](https://github.com/GoogleContainerTools/skaffold/pull/6299)
13+
* skip manifest validation for default `kubectl deployer` [#6294](https://github.com/GoogleContainerTools/skaffold/pull/6294)
14+
* Fix switched container/pod names in app log event [#6215](https://github.com/GoogleContainerTools/skaffold/pull/6215)
15+
* fix remote branch lookup [#6269](https://github.com/GoogleContainerTools/skaffold/pull/6269)
16+
* [cherry-pick] Fix Workdir error when --filename flag is used. [#6247](https://github.com/GoogleContainerTools/skaffold/pull/6247)
17+
* Make skaffold reproducible [#6238](https://github.com/GoogleContainerTools/skaffold/pull/6238)
18+
19+
Updates and Refactors:
20+
* Give `logrus.Hook` implementation information about task and subtask [#6313](https://github.com/GoogleContainerTools/skaffold/pull/6313)
21+
* Add `logrus.Logger` return type on `WithEventContext()` [#6309](https://github.com/GoogleContainerTools/skaffold/pull/6309)
22+
* Add `logrus` hook for sending `SkaffoldLogEvent`s [#6250](https://github.com/GoogleContainerTools/skaffold/pull/6250)
23+
24+
* Prefix port forward links with `http://` [#6295](https://github.com/GoogleContainerTools/skaffold/pull/6295)
25+
* Set output event context in cache check, tag generation, status check, port forward [#6234](https://github.com/GoogleContainerTools/skaffold/pull/6234)
26+
27+
28+
Docs, Test, and Release Updates:
29+
* Update deps and restore k3d tests [#6280](https://github.com/GoogleContainerTools/skaffold/pull/6280)
30+
* Remove log tail test for nodejs example [#6275](https://github.com/GoogleContainerTools/skaffold/pull/6275)
31+
* `git fetch` origin/main before `make checks` [#6274](https://github.com/GoogleContainerTools/skaffold/pull/6274)
32+
33+
34+
Huge thanks goes out to all of our contributors for this release:
35+
36+
- Aaron Prindle
37+
- Benjamin P. Jung
38+
- Brian de Alwis
39+
- Chris Willis
40+
- dependabot[bot]
41+
- elnoro
42+
- Gaurav
43+
- jelle van der Waa
44+
- Marlon Gamez
45+
- Nick Kubala
46+
- Tejal Desai
47+
- Yanshu
48+
- Yuwen Ma
49+
50+
151
# v1.28.0 Release - 07/14/2021
252
Note: This release comes with a new config version, `v2beta19`. To upgrade your skaffold.yaml, use `skaffold fix`. If you choose not to upgrade, skaffold will auto-upgrade as best as it can.
353

examples/bazel/skaffold.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: skaffold/v2beta19
1+
apiVersion: skaffold/v2beta20
22
kind: Config
33
build:
44
artifacts:

examples/buildpacks-java/skaffold.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: skaffold/v2beta19
1+
apiVersion: skaffold/v2beta20
22
kind: Config
33
build:
44
artifacts:

examples/buildpacks-node/skaffold.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: skaffold/v2beta19
1+
apiVersion: skaffold/v2beta20
22
kind: Config
33
build:
44
artifacts:

examples/buildpacks-python/skaffold.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: skaffold/v2beta19
1+
apiVersion: skaffold/v2beta20
22
kind: Config
33
build:
44
artifacts:

examples/buildpacks/skaffold.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: skaffold/v2beta19
1+
apiVersion: skaffold/v2beta20
22
kind: Config
33
build:
44
artifacts:

examples/custom-buildx/skaffold.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: skaffold/v2beta19
1+
apiVersion: skaffold/v2beta20
22
kind: Config
33

44
build:

examples/custom-tests/skaffold.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: skaffold/v2beta19
1+
apiVersion: skaffold/v2beta20
22
kind: Config
33
build:
44
artifacts:

examples/custom/skaffold.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: skaffold/v2beta19
1+
apiVersion: skaffold/v2beta20
22
kind: Config
33
build:
44
artifacts:

examples/dev-journey-buildpacks/skaffold.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: skaffold/v2beta19
1+
apiVersion: skaffold/v2beta20
22
kind: Config
33
build:
44
artifacts:

examples/docker-deploy/README.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
### Example: Deploying a simple go app to Docker
2+
3+
This is a simple example based on:
4+
5+
* **building** a two single Go file apps, each with a multistage `Dockerfile` using local docker to build
6+
* **tagging** using the default tagPolicy (`gitCommit`)
7+
* **deploying** to docker by simply running two individual containers
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM golang:1.15 as builder
2+
COPY main.go .
3+
# `skaffold debug` sets SKAFFOLD_GO_GCFLAGS to disable compiler optimizations
4+
ARG SKAFFOLD_GO_GCFLAGS
5+
RUN go build -gcflags="${SKAFFOLD_GO_GCFLAGS}" -o /app main.go
6+
7+
FROM alpine:3.10
8+
# Define GOTRACEBACK to mark this container as using the Go language runtime
9+
# for `skaffold debug` (https://skaffold.dev/docs/workflows/debug/).
10+
ENV GOTRACEBACK=single
11+
CMD ["./app"]
12+
COPY --from=builder /app .

examples/docker-deploy/bert/main.go

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package main
2+
3+
import (
4+
"fmt"
5+
"time"
6+
)
7+
8+
func main() {
9+
for {
10+
fmt.Println("Oh hey Ernie.")
11+
12+
time.Sleep(time.Second * 2)
13+
}
14+
}
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM golang:1.15 as builder
2+
COPY main.go .
3+
# `skaffold debug` sets SKAFFOLD_GO_GCFLAGS to disable compiler optimizations
4+
ARG SKAFFOLD_GO_GCFLAGS
5+
RUN go build -gcflags="${SKAFFOLD_GO_GCFLAGS}" -o /app main.go
6+
7+
FROM alpine:3.10
8+
# Define GOTRACEBACK to mark this container as using the Go language runtime
9+
# for `skaffold debug` (https://skaffold.dev/docs/workflows/debug/).
10+
ENV GOTRACEBACK=single
11+
CMD ["./app"]
12+
COPY --from=builder /app .

examples/docker-deploy/ernie/main.go

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package main
2+
3+
import (
4+
"fmt"
5+
"time"
6+
)
7+
8+
func main() {
9+
for {
10+
fmt.Println("Hey there Bert!")
11+
12+
time.Sleep(time.Second * 2)
13+
}
14+
}

examples/docker-deploy/skaffold.yaml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
apiVersion: skaffold/v2beta20
2+
kind: Config
3+
build:
4+
local:
5+
push: false
6+
artifacts:
7+
- image: bert
8+
context: bert
9+
- image: ernie
10+
context: ernie
11+
deploy:
12+
docker:
13+
images: [bert, ernie]

examples/gcb-kaniko/skaffold.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: skaffold/v2beta19
1+
apiVersion: skaffold/v2beta20
22
kind: Config
33
build:
44
googleCloudBuild:

examples/generate-pipeline/skaffold.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: skaffold/v2beta19
1+
apiVersion: skaffold/v2beta20
22
kind: Config
33
build:
44
artifacts:

examples/getting-started-kustomize/skaffold.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: skaffold/v2beta19
1+
apiVersion: skaffold/v2beta20
22
kind: Config
33
metadata:
44
name: getting-started-kustomize

examples/getting-started/skaffold.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: skaffold/v2beta19
1+
apiVersion: skaffold/v2beta20
22
kind: Config
33
build:
44
artifacts:

examples/google-cloud-build/skaffold.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: skaffold/v2beta19
1+
apiVersion: skaffold/v2beta20
22
kind: Config
33
build:
44
googleCloudBuild:

examples/helm-deployment-dependencies/skaffold.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: skaffold/v2beta19
1+
apiVersion: skaffold/v2beta20
22
kind: Config
33
build:
44
tagPolicy:

examples/helm-deployment/skaffold.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: skaffold/v2beta19
1+
apiVersion: skaffold/v2beta20
22
kind: Config
33
build:
44
artifacts:

examples/helm-remote-repo/skaffold.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: skaffold/v2beta19
1+
apiVersion: skaffold/v2beta20
22
kind: Config
33
deploy:
44
helm:

examples/hot-reload/skaffold.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: skaffold/v2beta19
1+
apiVersion: skaffold/v2beta20
22
kind: Config
33
build:
44
artifacts:

examples/jib-gradle/skaffold.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: skaffold/v2beta19
1+
apiVersion: skaffold/v2beta20
22
kind: Config
33
build:
44
artifacts:

examples/jib-multimodule/skaffold.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: skaffold/v2beta19
1+
apiVersion: skaffold/v2beta20
22
kind: Config
33
build:
44
artifacts:

examples/jib-sync/skaffold-gradle.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: skaffold/v2beta19
1+
apiVersion: skaffold/v2beta20
22
kind: Config
33
build:
44
artifacts:

examples/jib-sync/skaffold-maven.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: skaffold/v2beta19
1+
apiVersion: skaffold/v2beta20
22
kind: Config
33
build:
44
artifacts:

examples/jib/skaffold.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: skaffold/v2beta19
1+
apiVersion: skaffold/v2beta20
22
kind: Config
33
build:
44
artifacts:

examples/kaniko/skaffold.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: skaffold/v2beta19
1+
apiVersion: skaffold/v2beta20
22
kind: Config
33
build:
44
artifacts:

examples/kustomize/skaffold-kustomize-args.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: skaffold/v2beta19
1+
apiVersion: skaffold/v2beta20
22
kind: Config
33
deploy:
44
kustomize:

examples/kustomize/skaffold.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: skaffold/v2beta19
1+
apiVersion: skaffold/v2beta20
22
kind: Config
33
deploy:
44
kustomize: {}

examples/lifecycle-hooks/Dockerfile

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM golang:1.15 as builder
2+
COPY main.go .
3+
# `skaffold debug` sets SKAFFOLD_GO_GCFLAGS to disable compiler optimizations
4+
ARG SKAFFOLD_GO_GCFLAGS
5+
RUN go build -gcflags="${SKAFFOLD_GO_GCFLAGS}" -o /app main.go
6+
7+
FROM alpine:3
8+
# Define GOTRACEBACK to mark this container as using the Go language runtime
9+
# for `skaffold debug` (https://skaffold.dev/docs/workflows/debug/).
10+
ENV GOTRACEBACK=single
11+
CMD ["./app"]
12+
COPY hello.txt .
13+
COPY --from=builder /app .

examples/lifecycle-hooks/README.md

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
### Example: Running skaffold lifecycle hooks
2+
3+
This is a simple example to show how to inject skaffold lifecycles with user-defined hooks.
4+
5+
Run:
6+
```
7+
skaffold build --cache-artifacts=false
8+
```
9+
10+
You should see the artifact `hooks-example` being built along with the execution of a `pre-build` hook trigger and a `post-build` hook trigger.
11+
12+
Now with an active kubernetes cluster, run:
13+
```
14+
skaffold dev
15+
```
16+
17+
This will start a pod running the `hooks-example` image. The app simply reads the contents of `hello.txt` file once and stores it and repeatedly prints it out.
18+
```
19+
[hooks-example] Hello World!
20+
[hooks-example] Hello World!
21+
[hooks-example] Hello World!
22+
...
23+
```
24+
If you change the text of `hello.txt` file, say to `Hello World!!`, Skaffold will `sync` it into the running container.
25+
You should also see a `pre-sync` hook that just echoes the filename that has changed, and a `post-sync` hook that sends a `SIGHUP` signal to the app. The app responds accordingly by reloading the modified `hello.txt` file and printing it to the console.
26+
```
27+
[hooks-example] Hello World!
28+
[hooks-example] Hello World!
29+
[hooks-example] Hello World!
30+
Syncing 1 files for hooks-example:e3c03bbaf0830afb79d586c5a0d5ce7510a027585fb0cbc88db9bd14bfbad139
31+
Starting pre-sync hooks for artifact "hooks-example"...
32+
file changes detected: hello.txt
33+
Completed pre-sync hooks for artifact "hooks-example"
34+
Starting post-sync hooks for artifact "hooks-example"...
35+
Running command kill -HUP 1
36+
Completed post-sync hooks for artifact "hooks-example"
37+
Watching for changes...
38+
[hooks-example] Hello World!!
39+
[hooks-example] Hello World!!
40+
[hooks-example] Hello World!!
41+
...
42+
```

examples/lifecycle-hooks/hello.txt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Hello World!

examples/lifecycle-hooks/hook.bat

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
@echo off
2+
3+
echo Build specification:
4+
echo DefaultRepo: %SKAFFOLD_DEFAULT_REPO%
5+
echo RPCPort: %SKAFFOLD_RPC_PORT%
6+
echo HTTPPort: %SKAFFOLD_HTTP_PORT%
7+
echo WorkDir: %SKAFFOLD_WORK_DIR%
8+
echo Image: %SKAFFOLD_IMAGE%
9+
echo PushImage: %SKAFFOLD_PUSH_IMAGE%
10+
echo ImageRepo: %SKAFFOLD_IMAGE_REPO%
11+
echo ImageTag: %SKAFFOLD_IMAGE_TAG%
12+
echo BuildContext: %SKAFFOLD_BUILD_CONTEXT%

examples/lifecycle-hooks/hook.sh

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/sh
2+
3+
cat << EOF
4+
Build specification:
5+
DefaultRepo: $SKAFFOLD_DEFAULT_REPO
6+
RPCPort: $SKAFFOLD_RPC_PORT
7+
HTTPPort: $SKAFFOLD_HTTP_PORT
8+
WorkDir: $SKAFFOLD_WORK_DIR
9+
Image: $SKAFFOLD_IMAGE
10+
PushImage: $SKAFFOLD_PUSH_IMAGE
11+
ImageRepo: $SKAFFOLD_IMAGE_REPO
12+
ImageTag: $SKAFFOLD_IMAGE_TAG
13+
BuildContext: $SKAFFOLD_BUILD_CONTEXT
14+
EOF
15+

examples/lifecycle-hooks/k8s-pod.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
apiVersion: v1
2+
kind: Pod
3+
metadata:
4+
name: hooks-example-pod
5+
spec:
6+
containers:
7+
- name: hooks-example
8+
image: hooks-example

0 commit comments

Comments
 (0)