Skip to content

Commit c9c1e41

Browse files
authored
Merge branch 'GoogleContainerTools:main' into main
2 parents e81d57b + 285c697 commit c9c1e41

File tree

1,556 files changed

+12245
-4444
lines changed

Some content is hidden

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

1,556 files changed

+12245
-4444
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ pkg/skaffold/deploy/**kpt** @GoogleContainerTools/skaffold-team @yuwenma
66

77
# Debug owners
88
pkg/skaffold/debug/** @GoogleContainerTools/skaffold-team
9-
docs/content/en/docs/how-tos/debug/** @GoogleContainerTools/skaffold-team
9+
docs-v1/content/en/docs/how-tos/debug/** @GoogleContainerTools/skaffold-team
1010
integration/test-data/debug/** @GoogleContainerTools/skaffold-team
1111
integration/debug_test.go @GoogleContainerTools/skaffold-team

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ permissions: read-all
1212

1313
concurrency:
1414
group: build-${{ github.event.pull_request.number || github.ref }}-${{github.workflow}}
15-
cancel-in-progress: true
15+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
1616

1717
jobs:
1818
analyze:

.github/workflows/draft-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ permissions: read-all
1010

1111
concurrency:
1212
group: build-${{ github.event.pull_request.number || github.ref }}-${{github.workflow}}
13-
cancel-in-progress: true
13+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
1414

1515
jobs:
1616
check:

.github/workflows/integration-darwin.yml

Lines changed: 0 additions & 64 deletions
This file was deleted.

.github/workflows/integration-linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ permissions: read-all
77

88
concurrency:
99
group: build-${{ github.event.pull_request.number || github.ref }}-${{github.workflow}}
10-
cancel-in-progress: true
10+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
1111

1212
jobs:
1313

.github/workflows/linters-checks.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: PR linters, checks
2+
3+
# Triggers the workflow on push or pull request events
4+
on: [push, pull_request]
5+
6+
permissions: read-all
7+
8+
concurrency:
9+
group: build-${{ github.event.pull_request.number || github.ref }}-${{github.workflow}}
10+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
11+
12+
jobs:
13+
build:
14+
name: PR linters, checks
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Set up Go
18+
uses: actions/setup-go@v3
19+
with:
20+
go-version: 1.19.*
21+
id: go
22+
23+
- name: Check out code into the Go module directory
24+
uses: actions/checkout@v3
25+
with:
26+
fetch-depth: 0
27+
28+
- name: Run make linters
29+
run: |
30+
make linters
31+
32+
- name: Run make checks
33+
run: |
34+
make checks

.github/workflows/performance-comparison-label.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ permissions:
1010

1111
concurrency:
1212
group: build-${{ github.event.pull_request.number || github.ref }}-${{github.workflow}}
13-
cancel-in-progress: true
13+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
1414

1515
jobs:
1616
build:

.github/workflows/performance-comparison.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ permissions:
1010

1111
concurrency:
1212
group: build-${{ github.event.pull_request.number || github.ref }}-${{github.workflow}}
13-
cancel-in-progress: true
13+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
1414

1515
jobs:
1616
build:

.github/workflows/scorecards.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
persist-credentials: false
2828

2929
- name: "Run analysis"
30-
uses: ossf/scorecard-action@99c53751e09b9529366343771cc321ec74e9bd3d # v2.0.0
30+
uses: ossf/scorecard-action@e38b1902ae4f44df626f11ba0734b14fb91f8f86 # v2.1.2
3131
with:
3232
results_file: results.sarif
3333
results_format: sarif

.github/workflows/unit-tests-darwin.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ permissions: read-all
77

88
concurrency:
99
group: build-${{ github.event.pull_request.number || github.ref }}-${{github.workflow}}
10-
cancel-in-progress: true
10+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
1111
jobs:
1212

1313
build:
@@ -42,7 +42,7 @@ jobs:
4242
restore-keys: |
4343
${{ runner.os }}-go-
4444
45-
# Skip integration tests for `docs`-only changes (only works for PR-based dev workflows like Skaffold's).
45+
# Skip tests for `docs`-only changes (only works for PR-based dev workflows like Skaffold's).
4646
# NOTE: grep output is stored in env var with `|| true` as the run command cannot fail or action will fail
4747
- name: Check if only docs changes were made in this PR
4848
run: |
@@ -54,7 +54,7 @@ jobs:
5454
- name: Run unit tests
5555
if: ${{ env.NON_DOCS_FILES_CHANGED != 0 }}
5656
run: |
57-
make coverage
57+
make unit-tests
5858
5959
- name: Run diagnostics tests
6060
if: ${{ env.NON_DOCS_FILES_CHANGED != 0 }}

.github/workflows/linters-checks-and-unit-tests-linux.yml renamed to .github/workflows/unit-tests-linux.yml

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: PR linters, checks, and unit tests (linux)
1+
name: unit tests (linux)
22

33
# Triggers the workflow on push or pull request events
44
on: [push, pull_request]
@@ -7,12 +7,11 @@ permissions: read-all
77

88
concurrency:
99
group: build-${{ github.event.pull_request.number || github.ref }}-${{github.workflow}}
10-
cancel-in-progress: true
10+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
1111

1212
jobs:
13-
1413
build:
15-
name: PR linters, checks, and unit tests (linux)
14+
name: unit tests (linux)
1615
runs-on: ubuntu-latest
1716
steps:
1817
- name: Set up Go
@@ -26,15 +25,7 @@ jobs:
2625
with:
2726
fetch-depth: 0
2827

29-
- name: Run make linters
30-
run: |
31-
make linters
32-
33-
- name: Run make checks
34-
run: |
35-
make checks
36-
37-
# Skip integration tests for `docs`-only changes (only works for PR-based dev workflows like Skaffold's).
28+
# Skip tests for `docs`-only changes (only works for PR-based dev workflows like Skaffold's).
3829
# NOTE: grep output is stored in env var with `|| true` as the run command cannot fail or action will fail
3930
- name: Check if only docs changes were made in this PR
4031
run: |

.github/workflows/integration-windows.yml renamed to .github/workflows/unit-tests-windows.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ permissions: read-all
77

88
concurrency:
99
group: build-${{ github.event.pull_request.number || github.ref }}-${{github.workflow}}
10-
cancel-in-progress: true
10+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
1111

1212
jobs:
1313

@@ -44,7 +44,7 @@ jobs:
4444
restore-keys: |
4545
${{ runner.os }}-go-
4646
47-
# TODO(aaron-prindle) skip integration tests for doc only changes on Windows. Figure out the proper syntax, etc.
47+
# TODO(aaron-prindle) skip unit tests for doc only changes on Windows. Figure out the proper syntax, etc.
4848
- name: Run skaffold unit tests on windows
4949
run: |
50-
go test -short -timeout 60s ./pkg/skaffold/... ./cmd/... ./hack/... ./pkg/webhook/...
50+
go test -count=1 -short -timeout 90s ./pkg/skaffold/... ./cmd/... ./hack/... ./pkg/webhook/...

.github/workflows/verify-examples.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on: [pull_request]
55

66
concurrency:
77
group: build-${{ github.event.pull_request.number || github.ref }}-${{github.workflow}}
8-
cancel-in-progress: true
8+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
99

1010
permissions: read-all
1111

CHANGELOG.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,52 @@
1+
# v2.0.4 Release - 12/21/2022
2+
**Linux amd64**
3+
`curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.0.4/skaffold-linux-amd64 && chmod +x skaffold && sudo mv skaffold /usr/local/bin`
4+
5+
**Linux arm64**
6+
`curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.0.4/skaffold-linux-arm64 && chmod +x skaffold && sudo mv skaffold /usr/local/bin`
7+
8+
**macOS amd64**
9+
`curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.0.4/skaffold-darwin-amd64 && chmod +x skaffold && sudo mv skaffold /usr/local/bin`
10+
11+
**macOS arm64**
12+
`curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.0.4/skaffold-darwin-arm64 && chmod +x skaffold && sudo mv skaffold /usr/local/bin`
13+
14+
**Windows**
15+
https://storage.googleapis.com/skaffold/releases/v2.0.4/skaffold-windows-amd64.exe
16+
17+
**Docker image**
18+
`gcr.io/k8s-skaffold/skaffold:v2.0.4`
19+
20+
Fixes:
21+
* fix: resolve issue where skaffold would not add digest when using helm in v1 -> v2 migration case [#8269](https://github.com/GoogleContainerTools/skaffold/pull/8269)
22+
* fix: remove kubecontext check warning from kubectl deploy [#8256](https://github.com/GoogleContainerTools/skaffold/pull/8256)
23+
* fix: expand namespace with env variables [#8222](https://github.com/GoogleContainerTools/skaffold/pull/8222)
24+
* fix: properly wire deploy.kubectl.defaultNamespace field to be set in SKAFFOLD_NAMESPACES [#8129](https://github.com/GoogleContainerTools/skaffold/pull/8129)
25+
* fix: new condition to create hydrate-dir only if a kpt renderer or deployer [#8117](https://github.com/GoogleContainerTools/skaffold/pull/8117)
26+
* fix: correct issue where skaffold setTemplateValues env vars were in some cases empty [#8261](https://github.com/GoogleContainerTools/skaffold/pull/8261)
27+
28+
# v2.0.3 Release - 12/01/2022
29+
**Linux amd64**
30+
`curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.0.3/skaffold-linux-amd64 && chmod +x skaffold && sudo mv skaffold /usr/local/bin`
31+
32+
**Linux arm64**
33+
`curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.0.3/skaffold-linux-arm64 && chmod +x skaffold && sudo mv skaffold /usr/local/bin`
34+
35+
**macOS amd64**
36+
`curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.0.3/skaffold-darwin-amd64 && chmod +x skaffold && sudo mv skaffold /usr/local/bin`
37+
38+
**macOS arm64**
39+
`curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.0.3/skaffold-darwin-arm64 && chmod +x skaffold && sudo mv skaffold /usr/local/bin`
40+
41+
**Windows**
42+
https://storage.googleapis.com/skaffold/releases/v2.0.3/skaffold-windows-amd64.exe
43+
44+
**Docker image**
45+
`gcr.io/k8s-skaffold/skaffold:v2.0.3`
46+
47+
Fixes:
48+
* fix: support alternative env var naming using support env variable + artifact-name (vs env variable + index) [#8175](https://github.com/GoogleContainerTools/skaffold/pull/8175)
49+
150
# v2.0.2 Release - 11/15/2022
251
**Linux amd64**
352
`curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.0.2/skaffold-linux-amd64 && chmod +x skaffold && sudo mv skaffold /usr/local/bin`

DEVELOPMENT.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ e.g In this example [PR](https://github.com/GoogleContainerTools/skaffold/pull/5
127127
2. Run `hack/generate-proto.sh`. These will generate go code and structs for the newly added proto fields.
128128
```shell script
129129
git status
130-
modified: docs/content/en/api/skaffold.swagger.json
131-
modified: docs/content/en/docs/references/api/grpc.md
130+
modified: docs-v1/content/en/api/skaffold.swagger.json
131+
modified: docs-v1/content/en/docs/references/api/grpc.md
132132
modified: proto/enums/enums.pb.go
133133
modified: proto/enums/enums.proto
134134
```

Makefile

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ GKE_CLUSTER_NAME ?= integration-tests
3535
GKE_ZONE ?= us-central1-a
3636

3737
SUPPORTED_PLATFORMS = linux-amd64 darwin-amd64 windows-amd64.exe linux-arm64 darwin-arm64
38-
BUILD_PACKAGE = $(REPOPATH)/cmd/skaffold
38+
BUILD_PACKAGE = $(REPOPATH)/v2/cmd/skaffold
3939

4040
SKAFFOLD_TEST_PACKAGES = ./pkg/skaffold/... ./cmd/... ./hack/... ./pkg/webhook/...
4141
GO_FILES = $(shell find . -type f -name '*.go' -not -path "./pkg/diag/*")
@@ -113,6 +113,10 @@ test: $(BUILD_DIR)
113113
@ ./hack/checks.sh
114114
@ ./hack/linters.sh
115115

116+
.PHONY: unit-tests
117+
unit-tests: $(BUILD_DIR)
118+
@ ./hack/gotest.sh -count=1 -race -short -timeout=90s $(SKAFFOLD_TEST_PACKAGES)
119+
116120
.PHONY: coverage
117121
coverage: $(BUILD_DIR)
118122
@ ./hack/gotest.sh -count=1 -race -cover -short -timeout=90s -coverprofile=out/coverage.txt -coverpkg="./pkg/...,./cmd/..." $(SKAFFOLD_TEST_PACKAGES)
@@ -137,8 +141,9 @@ ifeq ($(GCP_ONLY),true)
137141
$(GKE_CLUSTER_NAME) \
138142
--zone $(GKE_ZONE) \
139143
--project $(GCP_PROJECT)
144+
gcloud auth configure-docker us-central1-docker.pkg.dev
140145
endif
141-
@ GCP_ONLY=$(GCP_ONLY) GKE_CLUSTER_NAME=$(GKE_CLUSTER_NAME) ./hack/gotest.sh -v $(REPOPATH)/integration -timeout 50m $(INTEGRATION_TEST_ARGS)
146+
@ GCP_ONLY=$(GCP_ONLY) GKE_CLUSTER_NAME=$(GKE_CLUSTER_NAME) ./hack/gotest.sh -v $(REPOPATH)/v2/integration -timeout 50m $(INTEGRATION_TEST_ARGS)
142147

143148
.PHONY: integration
144149
integration: install integration-tests
@@ -298,11 +303,11 @@ submit-release-trigger:
298303

299304
.PHONY: preview-docs
300305
preview-docs:
301-
./deploy/docs/local-preview.sh hugo serve -D --bind=0.0.0.0 --ignoreCache
306+
./deploy/docs-v1/local-preview.sh hugo serve -D --bind=0.0.0.0 --ignoreCache
302307

303308
.PHONY: build-docs-preview
304309
build-docs-preview:
305-
./deploy/docs/local-preview.sh hugo --baseURL=https://skaffold.dev
310+
./deploy/docs-v1/local-preview.sh hugo --baseURL=https://skaffold.dev
306311

307312
.PHONY: preview-docs-v2
308313
preview-docs-v2:
@@ -325,7 +330,7 @@ generate-schemas-v2:
325330
# telemetry generation
326331
.PHONY: generate-schemas
327332
generate-telemetry-json:
328-
go run hack/struct-json/main.go -- pkg/skaffold/instrumentation/types.go docs/content/en/docs/resources/telemetry/metrics.json
333+
go run hack/struct-json/main.go -- pkg/skaffold/instrumentation/types.go docs-v1/content/en/docs/resources/telemetry/metrics.json
329334

330335
# telemetry generation
331336
.PHONY: generate-schemas-v2
@@ -339,7 +344,7 @@ flags-dashboard:
339344

340345
# static files
341346

342-
$(EMBEDDED_FILES_CHECK): go.mod docs/content/en/schemas/* docs-v2/content/en/schemas/*
347+
$(EMBEDDED_FILES_CHECK): go.mod docs-v1/content/en/schemas/* docs-v2/content/en/schemas/*
343348
hack/generate-embedded-files.sh
344349

345350
# run comparisonstats - ex: make COMPARISONSTATS_ARGS='usr/local/bin/skaffold /usr/local/bin/skaffold helm-deployment main.go "//per-dev-iteration-comment"' comparisonstats

cmd/skaffold/app/cmd/apply.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ import (
2525

2626
"github.com/spf13/cobra"
2727

28-
"github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes"
29-
"github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner"
30-
"github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/util"
28+
"github.com/GoogleContainerTools/skaffold/v2/pkg/skaffold/kubernetes"
29+
"github.com/GoogleContainerTools/skaffold/v2/pkg/skaffold/runner"
30+
"github.com/GoogleContainerTools/skaffold/v2/pkg/skaffold/schema/util"
3131
)
3232

3333
// NewCmdApply describes the CLI command to apply manifests to a cluster.

0 commit comments

Comments
 (0)