Skip to content

Commit 1aa55e1

Browse files
authored
Bump dependencies for plugins to core v1.5.7 (#132)
* Bump dependencies for plugins * Update github workflows
1 parent e0a4486 commit 1aa55e1

14 files changed

Lines changed: 118 additions & 46 deletions

File tree

.github/workflows/non-regression.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,18 @@ jobs:
3939
name: Validate that the container build for prod
4040
runs-on: ubuntu-latest
4141
steps:
42-
- uses: actions/checkout@v2
43-
- name: Build the stack
42+
-
43+
name: Checkout code
44+
uses: actions/checkout@v2
45+
-
46+
name: Build the stack
4447
run: docker network create your_network || true
45-
- name: Prepare the stack
48+
-
49+
name: Prepare the stack
4650
run: cp Dockerfile-prod Dockerfile && cp docker-compose.yml.prod docker-compose.yml
47-
- name: Build the stack
51+
-
52+
name: Build the stack
4853
run: docker-compose up -d --build --force-recreate --remove-orphans
49-
- name: Souin container healthceck
54+
-
55+
name: Souin container healthceck
5056
run: docker-compose exec -T souin ls
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Build and validate Souin as plugins
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
build-caddy-validator:
10+
name: Check that Souin build as caddy module and can be tagged on master
11+
runs-on: ubuntu-latest
12+
steps:
13+
-
14+
name: Add domain.com host to /etc/hosts
15+
run: |
16+
sudo echo "127.0.0.1 domain.com" | sudo tee -a /etc/hosts
17+
-
18+
name: Install Go
19+
uses: actions/setup-go@v2
20+
with:
21+
go-version: 1.16
22+
-
23+
name: Checkout code
24+
uses: actions/checkout@v2
25+
-
26+
name: Install xcaddy
27+
run: |
28+
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https
29+
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/xcaddy/gpg.key' | sudo apt-key add -
30+
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/xcaddy/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-xcaddy.list
31+
sudo apt update
32+
sudo apt install xcaddy
33+
-
34+
name: Build current Souin as caddy module with referenced Souin core version when merge on master
35+
run: cd plugins/caddy && xcaddy build --with github.com/darkweak/souin/plugins/caddy@$(git rev-parse --short "$GITHUB_SHA")

.github/workflows/plugins.yml

Lines changed: 48 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,34 @@ jobs:
77
name: Check that Souin build as caddy module
88
runs-on: ubuntu-latest
99
steps:
10-
- name: Add domain.com host to /etc/hosts
10+
-
11+
name: Add domain.com host to /etc/hosts
1112
run: |
1213
sudo echo "127.0.0.1 domain.com" | sudo tee -a /etc/hosts
13-
- name: Install Go
14+
-
15+
name: Install Go
1416
uses: actions/setup-go@v2
1517
with:
1618
go-version: 1.16
17-
- name: Checkout code
19+
-
20+
name: Checkout code
1821
uses: actions/checkout@v2
19-
- name: Install xcaddy
22+
-
23+
name: Install xcaddy
2024
run: |
2125
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https
2226
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/xcaddy/gpg.key' | sudo apt-key add -
2327
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/xcaddy/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-xcaddy.list
2428
sudo apt update
2529
sudo apt install xcaddy
26-
- name: Build Souin as caddy module
30+
-
31+
name: Build Souin as caddy module
2732
run: cd plugins/caddy && xcaddy build --with github.com/darkweak/souin/plugins/caddy=./ --with github.com/darkweak/souin@latest=../..
28-
- name: Run detached caddy
33+
-
34+
name: Run detached caddy
2935
run: cd plugins/caddy && ./caddy run &
30-
- name: Run Caddy E2E tests
36+
-
37+
name: Run Caddy E2E tests
3138
uses: anthonyvscode/newman-action@v1
3239
with:
3340
collection: "docs/e2e/Souin E2E.postman_collection.json"
@@ -38,27 +45,34 @@ jobs:
3845
name: Check that Souin build as Tyk middleware
3946
runs-on: ubuntu-latest
4047
steps:
41-
- name: Install Go
48+
-
49+
name: Install Go
4250
uses: actions/setup-go@v2
4351
with:
4452
go-version: 1.16
45-
- name: Checkout code
53+
-
54+
name: Checkout code
4655
uses: actions/checkout@v2
47-
- name: Build Souin as Tyk plugin
56+
-
57+
name: Build Souin as Tyk plugin
4858
run: make build-and-run-tyk
49-
- name: Wait for Souin is really loaded inside Tyk as middleware
59+
-
60+
name: Wait for Souin is really loaded inside Tyk as middleware
5061
uses: jakejarvis/wait-action@master
5162
with:
5263
time: 30s
53-
- name: Set logs result as environment variable
64+
-
65+
name: Set logs result as environment variable
5466
run: cd plugins/tyk && echo "TYK_DC_RESULT=$(docker-compose logs tyk-gateway | grep -i '\[INFO\] Olric bindAddr')" >> $GITHUB_ENV
55-
- name: Check Olric is loaded to define if Souin is loaded too
67+
-
68+
name: Check Olric is loaded to define if Souin is loaded too
5669
uses: nick-invision/assert-action@v1
5770
with:
5871
expected: '[INFO] Olric bindAddr'
5972
actual: ${{ env.TYK_DC_RESULT }}
6073
comparison: contains
61-
- name: Run Tyk E2E tests
74+
-
75+
name: Run Tyk E2E tests
6276
uses: anthonyvscode/newman-action@v1
6377
with:
6478
collection: "docs/e2e/Souin E2E.postman_collection.json"
@@ -69,38 +83,48 @@ jobs:
6983
name: Check that Souin build as Træfik plugin
7084
runs-on: ubuntu-latest
7185
steps:
72-
- name: Add domain.com host to /etc/hosts
86+
-
87+
name: Add domain.com host to /etc/hosts
7388
run: |
7489
sudo echo "127.0.0.1 domain.com" | sudo tee -a /etc/hosts
75-
- name: Install Go
90+
-
91+
name: Install Go
7692
uses: actions/setup-go@v2
7793
with:
7894
go-version: 1.16
79-
- name: Checkout code
95+
-
96+
name: Checkout code
8097
uses: actions/checkout@v2
81-
- name: Build Souin as Træfik plugin
98+
-
99+
name: Build Souin as Træfik plugin
82100
run: make build-and-run-traefik
83-
- name: Wait for Souin is really loaded inside Træfik as plugin
101+
-
102+
name: Wait for Souin is really loaded inside Træfik as plugin
84103
uses: jakejarvis/wait-action@master
85104
with:
86105
time: 30s
87-
- name: Set traefik logs file result as environment variable
106+
-
107+
name: Set traefik logs file result as environment variable
88108
run: cd plugins/traefik && echo "TRAEFIK_FILE_RESULT=$(docker-compose logs traefik | grep 'Starting provider \*file.Provider')" >> $GITHUB_ENV
89-
- name: Check logs to define if Souin configuration is loaded too
109+
-
110+
name: Check logs to define if Souin configuration is loaded too
90111
uses: nick-invision/assert-action@v1
91112
with:
92113
expected: '/souin-configuration.yaml'
93114
actual: ${{ env.TRAEFIK_FILE_RESULT }}
94115
comparison: contains
95-
- name: Set traefik logs configuration result as environment variable
116+
-
117+
name: Set traefik logs configuration result as environment variable
96118
run: cd plugins/traefik && echo "TRAEFIK_MIDDLEWARE_RESULT=$(docker-compose logs traefik | grep default_cache)" >> $GITHUB_ENV
97-
- name: Check if the configuration is loaded to define if Souin is loaded too
119+
-
120+
name: Check if the configuration is loaded to define if Souin is loaded too
98121
uses: nick-invision/assert-action@v1
99122
with:
100123
expected: '"middlewares\":{\"souin\":{\"plugin\":{\"souin-plugin'
101124
actual: ${{ env.TRAEFIK_MIDDLEWARE_RESULT }}
102125
comparison: contains
103-
- name: Run Træfik E2E tests
126+
-
127+
name: Run Træfik E2E tests
104128
uses: anthonyvscode/newman-action@v1
105129
with:
106130
collection: "docs/e2e/Souin E2E.postman_collection.json"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ experimental:
241241
plugins:
242242
souin:
243243
moduleName: github.com/darkweak/souin
244-
version: v1.5.6
244+
version: v1.5.8
245245
```
246246
After that you can declare either the whole configuration at once in the middleware block or by service. See the examples below.
247247
```yaml

plugins/caddy/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ go 1.16
44

55
require (
66
github.com/caddyserver/caddy/v2 v2.4.5
7-
github.com/darkweak/souin v1.5.5
7+
github.com/darkweak/souin v1.5.7
88
go.uber.org/zap v1.19.0
99
)

plugins/caddy/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,8 @@ github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7Do
233233
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
234234
github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
235235
github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964/go.mod h1:Xd9hchkHSWYkEqJwUGisez3G1QY8Ryz0sdWrLPMGjLk=
236-
github.com/darkweak/souin v1.5.5 h1:eBevpqewQs7xf8F8oXobCg995PwL23iq0xhqCXjKaVM=
237-
github.com/darkweak/souin v1.5.5/go.mod h1:PESj/hdxxnOwCh6x3YrBrI4iQSgpdM3/Crz5Tbg3hW4=
236+
github.com/darkweak/souin v1.5.7 h1:qtbxW/lhmVt5PTV58FSV0o/URCt+D6Q3+pjpOfG/vQc=
237+
github.com/darkweak/souin v1.5.7/go.mod h1:PESj/hdxxnOwCh6x3YrBrI4iQSgpdM3/Crz5Tbg3hW4=
238238
github.com/davecgh/go-spew v0.0.0-20161028175848-04cdfd42973b/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
239239
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
240240
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=

plugins/traefik/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/darkweak/souin/plugins/traefik
33
go 1.16
44

55
require (
6-
github.com/darkweak/souin v1.5.5
6+
github.com/darkweak/souin v1.5.7
77
github.com/patrickmn/go-cache v2.1.0+incompatible
88
go.uber.org/zap v1.19.0
99
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e // indirect

plugins/traefik/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc
2525
github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk=
2626
github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
2727
github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE=
28-
github.com/darkweak/souin v1.5.5 h1:eBevpqewQs7xf8F8oXobCg995PwL23iq0xhqCXjKaVM=
29-
github.com/darkweak/souin v1.5.5/go.mod h1:PESj/hdxxnOwCh6x3YrBrI4iQSgpdM3/Crz5Tbg3hW4=
28+
github.com/darkweak/souin v1.5.7 h1:qtbxW/lhmVt5PTV58FSV0o/URCt+D6Q3+pjpOfG/vQc=
29+
github.com/darkweak/souin v1.5.7/go.mod h1:PESj/hdxxnOwCh6x3YrBrI4iQSgpdM3/Crz5Tbg3hW4=
3030
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
3131
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
3232
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=

plugins/traefik/vendor/github.com/darkweak/souin/api/souin.go

Lines changed: 7 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugins/traefik/vendor/github.com/darkweak/souin/rfc/bridge.go

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)