File tree 10 files changed +64
-20
lines changed
10 files changed +64
-20
lines changed Original file line number Diff line number Diff line change 7
7
- develop
8
8
9
9
pool :
10
- vmImage : ' ubuntu-18.04 '
10
+ vmImage : ' ubuntu-latest '
11
11
12
12
variables :
13
13
plugin : ' url-rewrite'
@@ -18,21 +18,21 @@ stages:
18
18
- job : Build
19
19
steps :
20
20
- bash : |
21
- sudo apt install -y lua5.3
22
- sudo apt install -y liblua5.3 -dev
21
+ sudo apt install -y lua5.1
22
+ sudo apt install -y liblua5.1 -dev
23
23
24
24
wget https://luarocks.org/releases/luarocks-3.3.1.tar.gz
25
25
tar zxpf luarocks-3.3.1.tar.gz
26
- cd luarocks-3.3.1 && ./configure --with-lua-include=/usr/include/lua5.3 \
26
+ cd luarocks-3.3.1 && ./configure --with-lua-include=/usr/include/lua5.1 \
27
27
&& make && sudo make install
28
28
cd .. && rm -rf luarocks-3.3.1 && rm luarocks-3.3.1.tar.gz
29
29
displayName: Install Lua and Luarocks
30
30
31
31
- bash : |
32
32
sudo apt install -y libssl-dev
33
- wget https://download.konghq.com/gateway-2 .x-ubuntu-bionic/pool/all/k/kong/kong_2.6 .0_amd64.deb
34
- sudo apt install -y ./kong_2.6 .0_amd64.deb
35
- rm kong_2.6 .0_amd64.deb
33
+ wget https://download.konghq.com/gateway-3 .x-ubuntu-bionic/pool/all/k/kong/kong_3.0 .0_amd64.deb
34
+ sudo apt install -y ./kong_3.0 .0_amd64.deb
35
+ rm kong_3.0 .0_amd64.deb
36
36
displayName: Install kong
37
37
38
38
- task : Bash@3
Original file line number Diff line number Diff line change
1
+ * @ andremacdowell @ brennogb @ glauberatanaka @ guih50 @ henrique1996n1 @ jonathanlazaro1 @ leoferlopes @ mauriciokb @ Wuerike
Original file line number Diff line number Diff line change 18
18
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
19
19
- uses : actions/checkout@v2
20
20
21
+ - name : ' Create PR: Merge main into develop branch'
22
+ id : create-develop-pull-request
23
+ uses :
thomaseizinger/[email protected]
24
+ env :
25
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
26
+ with :
27
+ head : main
28
+ base : develop
29
+ labels : develop
30
+ title : Merge main into develop branch
31
+ body : |
32
+ This PR merges the main branch back into develop.
33
+ This happens to ensure that the updates that happend on the release branch, i.e. CHANGELOG and manifest updates are also present on the develop branch.
34
+
21
35
- name : before install
22
36
run : |
23
37
sudo apt-get update
Original file line number Diff line number Diff line change
1
+ const capturingRegex = / V E R S I O N = " (?< version > [ \d . ] * ) " / ;
2
+
3
+ module . exports . readVersion = function ( contents ) {
4
+ const { version } = contents . match ( capturingRegex ) . groups ;
5
+ return version ;
6
+ } ;
7
+
8
+ module . exports . writeVersion = function ( contents , version ) {
9
+ const replacer = ( ) => `VERSION = "${ version } "` ;
10
+
11
+ return contents . replace ( capturingRegex , replacer ) ;
12
+ } ;
Original file line number Diff line number Diff line change 8
8
{
9
9
"filename" : " Makefile" ,
10
10
"updater" : " .standard-version/makefile-updater.js"
11
+ },
12
+ {
13
+ "filename" : " url-rewrite/handler.lua" ,
14
+ "updater" : " .standard-version/package-updater.js"
11
15
}
12
16
]
13
17
}
Original file line number Diff line number Diff line change 1
- FROM debian:stretch
1
+ FROM ubuntu:22.04
2
2
3
3
RUN apt-get update -y
4
4
5
- RUN apt-get install -y \
6
- lua5.1 \
7
- liblua5.1-0-dev \
8
- luarocks \
9
- git \
10
- libssl1.0-dev \
11
- make
12
-
5
+ RUN apt update -y && apt install -y lua5.1 liblua5.1-dev build-essential wget git zip unzip
13
6
RUN git config --global url.https://github.com/.insteadOf git://github.com/
7
+ RUN wget https://download.konghq.com/gateway-3.x-ubuntu-bionic/pool/all/k/kong/kong_3.0.0_amd64.deb &&\
8
+ apt install -y ./kong_3.0.0_amd64.deb
14
9
15
10
WORKDIR /home/plugin
16
11
17
- ADD Makefile .
12
+ COPY Makefile .
13
+ COPY rockspec.template .
18
14
RUN make setup
19
15
20
- ADD kong-plugin-url-rewrite-*.rockspec .
21
16
RUN chmod -R a+rw /home/plugin
Original file line number Diff line number Diff line change 1
- DEV_ROCKS = "lua-cjson 2.1.0" "kong 2.6 .0" "luacov 0.12.0" "busted 2.0.rc12" "luacov-cobertura 0.2-1" "luacheck 0.20.0"
1
+ DEV_ROCKS = "https://raw.githubusercontent.com/openresty/ lua-cjson/ 2.1.0.8/lua-cjson-2.1.0.6-1.rockspec " "kong 3.0 .0" "luacov 0.12.0" "busted 2.0.rc12" "luacov-cobertura 0.2-1" "luacheck 0.20.0"
2
2
PROJECT_FOLDER = url-rewrite
3
3
LUA_PROJECT = kong-plugin-url-rewrite
4
4
VERSION = "1.1.1-0"
Original file line number Diff line number Diff line change
1
+ version : " 3.8"
2
+
3
+ services :
4
+
5
+ kong :
6
+ build :
7
+ context : .
8
+ dockerfile : Dockerfile
9
+ stdin_open : true
10
+ volumes :
11
+ - ./${PROJECT_FOLDER}:/home/plugin
12
+ ports :
13
+ - " 8001:8001"
14
+ - " 8000:8000"
15
+ entrypoint : /bin/bash
Original file line number Diff line number Diff line change @@ -2,6 +2,8 @@ package = "kong-plugin-url-rewrite"
2
2
version = "1.1.1-0"
3
3
source = {
4
4
url = "git://github.com/stone-payments/kong-plugin-url-rewrite",
5
+ branch = "main",
6
+ tag = "v1.1.1",
5
7
}
6
8
description = {
7
9
summary = "KongAPI Gateway middleware plugin for url-rewrite purposes.",
Original file line number Diff line number Diff line change 1
1
local URLRewriter = {
2
- PRIORITY = 700
2
+ PRIORITY = 700 ,
3
+ VERSION = " 1.1.1"
3
4
}
4
5
5
6
function split (s , delimiter )
You can’t perform that action at this time.
0 commit comments