Skip to content

Commit 2900b13

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 5079ef7 + a65a16e commit 2900b13

File tree

164 files changed

+7147
-328
lines changed

Some content is hidden

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

164 files changed

+7147
-328
lines changed

.github/workflows/assets.yaml

Lines changed: 24 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
name: Publish binaries, Brew formula, and Docker image
1+
name: Publish binaries and Docker image
22

33
on:
44
release:
55
types: [published]
66

77
jobs:
88
assets:
9-
name: Publish binaries and Brew formula
9+
name: Publish binaries
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Install Go
13-
uses: actions/setup-go@v3
13+
uses: actions/setup-go@v4
1414
with:
1515
go-version: 1.19
1616
- uses: actions/checkout@v3
@@ -27,8 +27,7 @@ jobs:
2727
tag: ${{ github.ref }}
2828
overwrite: true
2929
file_glob: true
30-
- name: create-checksum
31-
id: create-checksum
30+
- name: Create checksum
3231
run: |
3332
VERSION=${GITHUB_REF#refs/*/}
3433
echo "VERSION=$VERSION" >> $GITHUB_ENV
@@ -51,18 +50,11 @@ jobs:
5150
file: checksum.txt
5251
tag: ${{ github.ref }}
5352
overwrite: true
54-
- name: Update Homebrew formula
55-
uses: peter-evans/repository-dispatch@v1
56-
with:
57-
token: ${{ secrets.PERSONAL_TOKEN }}
58-
repository: iter8-tools/homebrew-iter8
59-
event-type: release
60-
client-payload: '{"ref": "${{ env.VERSION }}", "sha": "${{ github.sha }}", "shaformac": "${{ env.SHAFORMAC }}"}'
6153

62-
# Push Iter8 image to dockerhub
6354
build-and-push:
64-
runs-on: ubuntu-latest
55+
name: Push Iter8 image to Docker Hub
6556
needs: assets
57+
runs-on: ubuntu-latest
6658
steps:
6759
- uses: actions/checkout@v3
6860
with:
@@ -86,7 +78,7 @@ jobs:
8678
with:
8779
username: ${{ secrets.DOCKERHUB_USERNAME }}
8880
password: ${{ secrets.DOCKERHUB_SECRET }}
89-
- uses: docker/build-push-action@v3
81+
- uses: docker/build-push-action@v4
9082
with:
9183
platforms: linux/amd64,linux/arm64
9284
tags: ${{ env.OWNER }}/iter8:${{ env.VERSION }},${{ env.OWNER }}/iter8:${{ env.MAJOR_MINOR_VERSION }},${{ env.OWNER }}/iter8:latest
@@ -95,18 +87,17 @@ jobs:
9587
TAG=v${{ env.VERSION }}
9688
9789
kubernetes-http-experiment:
98-
name: Kubernetes http load test
90+
name: Kubernetes HTTP load test
91+
needs: build-and-push
9992
runs-on: ubuntu-latest
100-
needs:
101-
- build-and-push
102-
- assets
10393
steps:
104-
- uses: iter8-tools/iter8@v0.13
94+
- name: Install Iter8
95+
run: GOBIN=/usr/local/bin go install github.com/iter8-tools/iter8@v0.14
10596
- name: Start kind cluster
10697
uses: helm/kind-action@v1.5.0
10798
with:
10899
wait: 300s
109-
- name: create app
100+
- name: Create app
110101
run: |
111102
kubectl create deployment httpbin --image=kennethreitz/httpbin
112103
kubectl expose deployment httpbin --type=ClusterIP --port=80
@@ -126,17 +117,16 @@ jobs:
126117
127118
kubernetes-grpc-experiment:
128119
name: Kubernetes gRPC load test
120+
needs: build-and-push
129121
runs-on: ubuntu-latest
130-
needs:
131-
- build-and-push
132-
- assets
133122
steps:
134-
- uses: iter8-tools/iter8@v0.13
123+
- name: Install Iter8
124+
run: GOBIN=/usr/local/bin go install github.com/iter8-tools/iter8@v0.14
135125
- name: Start kind cluster
136126
uses: helm/kind-action@v1.5.0
137127
with:
138128
wait: 300s
139-
- name: create app
129+
- name: Create app
140130
run: |
141131
kubectl create deploy hello --image=docker.io/grpc/java-example-hostname:latest --port=50051
142132
kubectl expose deploy hello --port=50051
@@ -158,17 +148,16 @@ jobs:
158148
159149
readiness:
160150
name: Kubernetes readiness test
151+
needs: build-and-push
161152
runs-on: ubuntu-latest
162-
needs:
163-
- build-and-push
164-
- assets
165153
steps:
166-
- uses: iter8-tools/iter8@v0.13
154+
- name: Install Iter8
155+
run: GOBIN=/usr/local/bin go install github.com/iter8-tools/iter8@v0.14
167156
- name: Start kind cluster
168157
uses: helm/kind-action@v1.5.0
169158
with:
170159
wait: 300s
171-
- name: deploy resources to cluster
160+
- name: Deploy resources to cluster
172161
run: |
173162
kubectl create deploy httpbin --image=kennethreitz/httpbin --port=80
174163
kubectl expose deploy httpbin --port=80
@@ -188,17 +177,16 @@ jobs:
188177
189178
readiness-with-namespace:
190179
name: Kubernetes readiness test with namespace
180+
needs: build-and-push
191181
runs-on: ubuntu-latest
192-
needs:
193-
- build-and-push
194-
- assets
195182
steps:
196-
- uses: iter8-tools/iter8@v0.13
183+
- name: Install Iter8
184+
run: GOBIN=/usr/local/bin go install github.com/iter8-tools/iter8@v0.14
197185
- name: Start kind cluster
198186
uses: helm/kind-action@v1.5.0
199187
with:
200188
wait: 300s
201-
- name: deploy resources to cluster
189+
- name: Deploy resources to cluster
202190
run: |
203191
kubectl create deploy httpbin --image=kennethreitz/httpbin --port=80
204192
kubectl expose deploy httpbin --port=80
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Release drafter
2+
3+
on:
4+
push:
5+
# branches to consider in the event; optional, defaults to all
6+
branches:
7+
- master
8+
9+
jobs:
10+
update_release_draft:
11+
runs-on: ubuntu-latest
12+
steps:
13+
# Drafts your next Release notes as Pull Requests are merged into any tracked branch
14+
- uses: release-drafter/release-drafter@v5
15+
with:
16+
config-name: release-config.yaml
17+
env:
18+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 31 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,43 @@
11
name: golangci-lint
2+
23
on:
34
pull_request:
5+
46
permissions:
57
contents: read
68
# Optional: allow read access to pull request. Use with `only-new-issues` option.
79
# pull-requests: read
10+
811
jobs:
912
golangci:
1013
name: lint
1114
runs-on: ubuntu-latest
1215
steps:
13-
- uses: actions/setup-go@v3
14-
with:
15-
go-version: 1.19
16-
- uses: actions/checkout@v3
17-
- name: golangci-lint
18-
uses: golangci/golangci-lint-action@v3
19-
with:
20-
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
21-
version: v1.50.1
22-
23-
# Optional: working directory, useful for monorepos
24-
# working-directory: somedir
25-
26-
# Optional: golangci-lint command line arguments.
27-
# args: --issues-exit-code=0
28-
29-
# Optional: show only new issues if it's a pull request. The default value is `false`.
30-
# only-new-issues: true
31-
32-
# Optional: if set to true then the all caching functionality will be complete disabled,
33-
# takes precedence over all other caching options.
34-
# skip-cache: true
35-
36-
# Optional: if set to true then the action don't cache or restore ~/go/pkg.
37-
# skip-pkg-cache: true
38-
39-
# Optional: if set to true then the action don't cache or restore ~/.cache/go-build.
40-
# skip-build-cache: true
16+
- uses: actions/setup-go@v4
17+
with:
18+
go-version: 1.19
19+
- uses: actions/checkout@v3
20+
- name: golangci-lint
21+
uses: golangci/golangci-lint-action@v3
22+
with:
23+
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
24+
version: v1.50.1
25+
26+
# Optional: working directory, useful for monorepos
27+
# working-directory: somedir
28+
29+
# Optional: golangci-lint command line arguments.
30+
# args: --issues-exit-code=0
31+
32+
# Optional: show only new issues if it's a pull request. The default value is `false`.
33+
# only-new-issues: true
34+
35+
# Optional: if set to true then the all caching functionality will be complete disabled,
36+
# takes precedence over all other caching options.
37+
# skip-cache: true
38+
39+
# Optional: if set to true then the action don't cache or restore ~/go/pkg.
40+
# skip-pkg-cache: true
41+
42+
# Optional: if set to true then the action don't cache or restore ~/.cache/go-build.
43+
# skip-build-cache: true

.github/workflows/lintcharts.yaml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Lint Helm charts
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
8+
jobs:
9+
# Get the paths for the Helm charts to lint
10+
get_paths:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v3
15+
with:
16+
fetch-depth: 0
17+
18+
- name: Get the paths for Helm charts to lint
19+
id: set-matrix
20+
run: |
21+
# Get paths (in string form)
22+
stringPaths=$(find -maxdepth 2 -path './charts/*')
23+
24+
# Check paths (length greater than 0)
25+
stringPathsLength=$(echo ${#stringPaths})
26+
if (( stringPathsLength == 0 ));
27+
then
28+
echo "No paths to check"
29+
exit 1
30+
fi
31+
32+
# Serialize paths into JSON array
33+
paths=$(jq -ncR '[inputs]' <<< "$stringPaths")
34+
35+
# Output serialized paths
36+
echo "matrix=$paths" >> $GITHUB_OUTPUT
37+
echo $paths
38+
39+
outputs:
40+
matrix: ${{ steps.set-matrix.outputs.matrix }}
41+
42+
# Lint Helm charts based on paths provided by previous job
43+
lint:
44+
name: Test changed-files
45+
needs: get_paths
46+
runs-on: ubuntu-latest
47+
strategy:
48+
matrix:
49+
version: ${{ fromJson(needs.get_paths.outputs.matrix) }}
50+
steps:
51+
- uses: actions/checkout@v3
52+
with:
53+
fetch-depth: 0
54+
55+
- name: Get modified files in the ${{ matrix.version }} folder
56+
id: modified-files
57+
uses: tj-actions/changed-files@v35
58+
with:
59+
files: ${{ matrix.version }}
60+
61+
- name: Lint Helm charts in the ${{ matrix.version }} folder
62+
uses: stackrox/kube-linter-action@v1
63+
if: steps.modified-files.outputs.any_modified == 'true'
64+
with:
65+
directory: ${{ matrix.version }}

0 commit comments

Comments
 (0)