Skip to content

Commit f56dce1

Browse files
authored
Merge branch 'knative:main' into PodSecurityContext
2 parents 2091749 + e013e6e commit f56dce1

File tree

387 files changed

+40284
-37503
lines changed

Some content is hidden

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

387 files changed

+40284
-37503
lines changed

.chglog/CHANGELOG.tpl.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,4 @@
5555
[{{ .Tag.Name }}]: {{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}
5656
{{ end -}}
5757
{{ end -}}
58-
{{ end -}}
58+
{{ end -}}

.chglog/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ options:
3737
- Header
3838
notes:
3939
keywords:
40-
- BREAKING CHANGE
40+
- BREAKING CHANGE

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ templates/typescript/*/package-lock.json ignore-lint=true
55
version.txt linguist-generated=true
66
zz_filesystem_generated.go linguist-generated=true
77
docker/zz_close_guarding_client_generated.go linguist-generated=true
8+
pkg/oci/testdata/test-links/* ignore-lint=true
89

.github/composite/go-setup/action.yaml

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

.github/workflows/build.yaml

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

.github/workflows/check.yaml

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

.github/workflows/ci.yaml

Lines changed: 143 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ jobs:
88
check:
99
runs-on: "ubuntu-latest"
1010
steps:
11-
- uses: actions/checkout@v3
12-
- uses: ./.github/composite/go-setup
11+
- uses: actions/checkout@v4
12+
- uses: knative/actions/setup-go@main
1313
- name: Lint
1414
run: make check && make check-templates
1515
- name: Check that 'func.yaml schema' is up-to-date
@@ -25,131 +25,240 @@ jobs:
2525
runs-on: ${{ matrix.os }}
2626
steps:
2727
- run: git config --global core.autocrlf false
28-
- uses: actions/checkout@v3
29-
- uses: ./.github/composite/go-setup
30-
- uses: actions/setup-java@v1
28+
- uses: actions/checkout@v4
29+
- uses: knative/actions/setup-go@main
30+
- uses: actions/setup-java@v4
3131
with:
3232
java-version: ${{ matrix.java }}
33+
distribution: 'temurin'
34+
- uses: actions/setup-python@v5
35+
with:
36+
python-version: '3.10'
3337
- name: Unit Test
3438
run: make test
3539
- name: Template Unit Tests
3640
run: make test-templates
37-
- uses: codecov/codecov-action@v3
41+
- uses: codecov/codecov-action@v5
3842
with:
3943
files: ./coverage.txt
4044
flags: unit-tests-${{ matrix.os }}
45+
fail_ci_if_error: true
46+
verbose: true
47+
token: ${{ secrets.CODECOV_TOKEN }}
4148

4249
test-integration:
4350
runs-on: "ubuntu-latest"
4451
steps:
45-
- uses: actions/checkout@v3
46-
- uses: ./.github/composite/go-setup
52+
- name: Set Environment Variables
53+
run: |
54+
echo "KUBECONFIG=${{ github.workspace }}/hack/bin/kubeconfig.yaml" >> "$GITHUB_ENV"
55+
echo "PATH=${{ github.workspace }}/hack/bin:$PATH" >> "$GITHUB_ENV"
56+
- uses: actions/checkout@v4
57+
- uses: knative/actions/setup-go@main
4758
- name: Install Binaries
48-
run: ./hack/binaries.sh
59+
run: ./hack/install-binaries.sh
4960
- name: Allocate Cluster
50-
run: ./hack/allocate.sh
61+
run: |
62+
attempt=0
63+
max_attempts=5
64+
until [ $attempt -ge $max_attempts ]
65+
do
66+
attempt=$((attempt+1))
67+
echo "------------------ Attempt $attempt ------------------"
68+
./hack/allocate.sh && break
69+
echo "------------------ failed, retrying... ------------------"
70+
if [ $attempt -ge $max_attempts ]; then
71+
echo "------------------ max # of retries reached, exiting ------------------"
72+
exit 1
73+
fi
74+
./hack/delete.sh
75+
echo "------------------ sleep for 5 minutes ------------------"
76+
sleep 300
77+
done
78+
echo "------------------ finished! attempt $attempt ------------------"
5179
- name: Local Registry
5280
run: ./hack/registry.sh
81+
- name: Setup testing images
82+
run: ./hack/setup-testing-images.sh
5383
- name: Integration Tests
5484
run: make test-integration
55-
- uses: codecov/codecov-action@v3
85+
- uses: codecov/codecov-action@v5
5686
with:
5787
files: ./coverage.txt
5888
flags: integration-tests
89+
fail_ci_if_error: true
90+
verbose: true
91+
token: ${{ secrets.CODECOV_TOKEN }}
5992

6093
e2e-test:
6194
strategy:
6295
matrix:
6396
os: ["ubuntu-latest"]
6497
runs-on: ${{ matrix.os }}
6598
steps:
66-
- uses: actions/checkout@v3
67-
- uses: ./.github/composite/go-setup
99+
- name: Set Environment Variables
100+
run: |
101+
echo "KUBECONFIG=${{ github.workspace }}/hack/bin/kubeconfig.yaml" >> "$GITHUB_ENV"
102+
echo "PATH=${{ github.workspace }}/hack/bin:$PATH" >> "$GITHUB_ENV"
103+
- uses: actions/checkout@v4
104+
- uses: knative/actions/setup-go@main
68105
- name: Install Binaries
69-
run: ./hack/binaries.sh
106+
run: ./hack/install-binaries.sh
70107
- name: Allocate Cluster
71-
run: ./hack/allocate.sh
108+
run: |
109+
attempt=0
110+
max_attempts=5
111+
until [ $attempt -ge $max_attempts ]
112+
do
113+
attempt=$((attempt+1))
114+
echo "------------------ Attempt $attempt ------------------"
115+
./hack/allocate.sh && break
116+
echo "------------------ failed, retrying... ------------------"
117+
if [ $attempt -ge $max_attempts ]; then
118+
echo "------------------ max # of retries reached, exiting ------------------"
119+
exit 1
120+
fi
121+
./hack/delete.sh
122+
echo "------------------ sleep for 5 minutes ------------------"
123+
sleep 300
124+
done
125+
echo "------------------ finished! attempt $attempt ------------------"
72126
- name: Local Registry
73127
run: ./hack/registry.sh
74128
- name: E2E Test
75129
run: make test-e2e
76-
- uses: codecov/codecov-action@v3
130+
- uses: codecov/codecov-action@v5
77131
with:
78132
files: ./coverage.txt
79133
flags: e2e-test
134+
fail_ci_if_error: true
135+
verbose: true
136+
token: ${{ secrets.CODECOV_TOKEN }}
80137

81138
e2e-on-cluster-test:
82139
strategy:
83140
matrix:
84141
os: ["ubuntu-latest"]
85142
runs-on: ${{ matrix.os }}
86143
steps:
87-
- uses: actions/checkout@v3
88-
- uses: ./.github/composite/go-setup
144+
- name: Set Environment Variables
145+
run: |
146+
echo "KUBECONFIG=${{ github.workspace }}/hack/bin/kubeconfig.yaml" >> "$GITHUB_ENV"
147+
echo "PATH=${{ github.workspace }}/hack/bin:$PATH" >> "$GITHUB_ENV"
148+
- uses: actions/checkout@v4
149+
- uses: knative/actions/setup-go@main
89150
- uses: imjasonh/[email protected]
90151
- name: Install Binaries
91-
run: ./hack/binaries.sh
152+
run: ./hack/install-binaries.sh
92153
- name: Allocate Cluster
93-
run: ./hack/allocate.sh
154+
run: |
155+
attempt=0
156+
max_attempts=5
157+
until [ $attempt -ge $max_attempts ]
158+
do
159+
attempt=$((attempt+1))
160+
echo "------------------ Attempt $attempt ------------------"
161+
./hack/allocate.sh && break
162+
echo "------------------ failed, retrying... ------------------"
163+
if [ $attempt -ge $max_attempts ]; then
164+
echo "------------------ max # of retries reached, exiting ------------------"
165+
exit 1
166+
fi
167+
./hack/delete.sh
168+
echo "------------------ sleep for 5 minutes ------------------"
169+
sleep 300
170+
done
171+
echo "------------------ finished! attempt $attempt ------------------"
94172
- name: Setup testing images
95173
run: ./hack/setup-testing-images.sh
96174
- name: Deploy Tekton
97-
run: ./hack/tekton.sh
175+
run: ./hack/install-tekton.sh
98176
- name: Deploy Test Git Server
99-
run: ./test/gitserver.sh
177+
run: ./hack/install-git-server.sh
100178
- name: E2E On Cluster Test
101179
env:
102180
E2E_RUNTIMES: ""
103181
run: make test-e2e-on-cluster
104-
- uses: codecov/codecov-action@v3
182+
- uses: codecov/codecov-action@v5
105183
with:
106184
files: ./coverage.txt
107185
flags: e2e-test-oncluster
186+
fail_ci_if_error: true
187+
verbose: true
188+
token: ${{ secrets.CODECOV_TOKEN }}
108189

109190
build:
110191
needs: [check, test-unit, test-integration, e2e-test, e2e-on-cluster-test]
111192
runs-on: ubuntu-latest
112193
steps:
113-
- uses: actions/checkout@v3
114-
- uses: ./.github/composite/go-setup
194+
- uses: actions/checkout@v4
195+
- uses: knative/actions/setup-go@main
115196
# Standard build tasks
116197
- name: Build
117198
run: make cross-platform
118199
# Upload all build artifacts
119-
- uses: actions/upload-artifact@v2
200+
- uses: actions/upload-artifact@v4
120201
with:
121202
name: OSX Binary (AMD)
122203
path: func_darwin_amd64
123-
- uses: actions/upload-artifact@v2
204+
- uses: actions/upload-artifact@v4
124205
with:
125206
name: OSX Binary (ARM)
126207
path: func_darwin_arm64
127-
- uses: actions/upload-artifact@v2
208+
- uses: actions/upload-artifact@v4
128209
with:
129210
name: Linux Binary (AMD)
130211
path: func_linux_amd64
131-
- uses: actions/upload-artifact@v2
212+
- uses: actions/upload-artifact@v4
132213
with:
133214
name: Linux Binary (ARM)
134215
path: func_linux_arm64
135-
- uses: actions/upload-artifact@v2
216+
- uses: actions/upload-artifact@v4
136217
with:
137218
name: Linux Binary (PPC64LE)
138219
path: func_linux_ppc64le
139-
- uses: actions/upload-artifact@v2
220+
- uses: actions/upload-artifact@v4
140221
with:
141222
name: Linux Binary (S390X)
142223
path: func_linux_s390x
143-
- uses: actions/upload-artifact@v2
224+
- uses: actions/upload-artifact@v4
144225
with:
145226
name: Windows Binary
146227
path: func_windows_amd64.exe
147228

229+
publish-utils-image:
230+
needs: build
231+
runs-on: ubuntu-latest
232+
steps:
233+
- uses: actions/checkout@v4
234+
- uses: knative/actions/setup-go@main
235+
- uses: docker/setup-qemu-action@v3
236+
- name: Login to GitHub Container Registry
237+
uses: docker/login-action@v3
238+
with:
239+
registry: ghcr.io
240+
username: ${{ github.actor }}
241+
password: ${{ secrets.GITHUB_TOKEN }}
242+
- name: Build and push
243+
run: |
244+
for a in amd64 arm64 ppc64le s390x; do
245+
CGO_ENABLED=0 go build -o "func-util-$a" -trimpath -ldflags '-w -s' ./cmd/func-util
246+
done
247+
docker buildx create --name multiarch --driver docker-container --use
248+
docker buildx build . -f Dockerfile.utils \
249+
--platform=linux/ppc64le,linux/s390x,linux/amd64,linux/arm64 \
250+
--push \
251+
-t "ghcr.io/knative/func-utils:v2" \
252+
--annotation index:org.opencontainers.image.description="Knative Func Utils Image" \
253+
--annotation index:org.opencontainers.image.source="https://github.com/knative/func" \
254+
--annotation index:org.opencontainers.image.vendor="https://github.com/knative/func" \
255+
--annotation index:org.opencontainers.image.url="https://github.com/knative/func/pkgs/container/func-utils"
256+
148257
publish-image:
149258
needs: build
150259
runs-on: ubuntu-latest
151260
steps:
152-
- uses: actions/checkout@v3
153-
- uses: ./.github/composite/go-setup
261+
- uses: actions/checkout@v4
262+
- uses: knative/actions/setup-go@main
154263
- uses: imjasonh/[email protected]
155264
- run: ko build --platform=linux/ppc64le,linux/s390x,linux/amd64,linux/arm64 -B ./cmd/func

.github/workflows/knative-go-test.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,5 @@ on:
1515
jobs:
1616
test:
1717
uses: knative/actions/.github/workflows/reusable-go-test.yaml@main
18+
secrets:
19+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/schema.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
os: ["ubuntu-latest"]
1111
runs-on: ${{ matrix.os }}
1212
steps:
13-
- uses: actions/checkout@v3
14-
- uses: ./.github/composite/go-setup
13+
- uses: actions/checkout@v4
14+
- uses: knative/actions/setup-go@main
1515
- name: Check that 'func.yaml schema' is up-to-date
1616
run: make schema-check

0 commit comments

Comments
 (0)