forked from auto-ssl/lua-resty-auto-ssl
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from ryokdy/merge-mar-2020
Merge auto-ssl/lua-resty-auto-ssl
- Loading branch information
Showing
74 changed files
with
3,986 additions
and
4,114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
-- vi: set ft=lua: | ||
|
||
return { | ||
_all = { | ||
lua = "spec/support/resty", | ||
output = "gtest", | ||
|
||
-- Randomize test order. | ||
["shuffle-files"] = true, | ||
["shuffle-tests"] = true, | ||
|
||
-- Disable auto-insulate so we can persist processes (like redis and ngrok) | ||
-- across test files. | ||
["auto-insulate"] = false, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
.git | ||
build | ||
t/run | ||
spec/tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- "*" | ||
pull_request: | ||
branches: | ||
- "*" | ||
schedule: | ||
- cron: "18 7 * * *" | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
variant: | ||
- centos | ||
- alpine | ||
- ubuntu | ||
- openresty1.13 | ||
- lua51 | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Build Container | ||
run: docker-compose build ${{ matrix.variant }} | ||
- name: Lint | ||
run: docker-compose run --rm ${{ matrix.variant }} make lint | ||
- name: Test | ||
run: docker-compose run --name "${{ matrix.variant }}-test" ${{ matrix.variant }} make test | ||
- name: Copy Artifacts | ||
if: always() | ||
run: | | ||
rm -rf /tmp/resty-auto-ssl-test | ||
docker cp ${{ matrix.variant }}-test:/tmp/resty-auto-ssl-test /tmp/resty-auto-ssl-test | ||
- name: Upload Artifacts | ||
if: always() | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: "${{ matrix.variant }}-logs" | ||
path: /tmp/resty-auto-ssl-test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
/build | ||
/lib/resty/auto-ssl/vendor/* | ||
/t/run | ||
/lua-resty-auto-ssl-* | ||
!/lua-resty-auto-ssl-*.rockspec | ||
/spec/tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,43 @@ | ||
FROM alpine:latest | ||
|
||
RUN \ | ||
# Test dependencies | ||
apk add \ | ||
--no-cache \ | ||
build-base \ | ||
findutils \ | ||
pcre-dev \ | ||
perl-dev \ | ||
procps \ | ||
FROM openresty/openresty:1.15.8.1-4-centos | ||
|
||
# Runtime dependencies | ||
RUN yum -y install \ | ||
bash \ | ||
coreutils \ | ||
curl \ | ||
diffutils \ | ||
grep \ | ||
openssl \ | ||
sed | ||
|
||
# Build dependencies. | ||
RUN yum -y install make | ||
|
||
# Dependencies for the release process. | ||
RUN yum -y install git zip | ||
|
||
# Test dependencies | ||
RUN yum -y install epel-release && \ | ||
yum -y install \ | ||
gcc \ | ||
git \ | ||
lsof \ | ||
lua \ | ||
procps-ng \ | ||
redis \ | ||
sudo \ | ||
zlib-dev && \ | ||
# Runtime dependencies | ||
apk add \ | ||
--no-cache \ | ||
bash \ | ||
coreutils \ | ||
curl \ | ||
diffutils \ | ||
grep \ | ||
openssl \ | ||
sed && \ | ||
# Even though we install full pkill (via the procps package, which we do for | ||
# "-U" support in our tests), the /usr/bin version that symlinks BusyBox's | ||
# more limited pkill version takes precedence. So manually remove this | ||
# BusyBox symlink to the full pkill version is used. | ||
if [ -L /usr/bin/pkill ]; then rm /usr/bin/pkill; fi | ||
https://bin.equinox.io/a/6iuHhJeWypm/ngrok-2.3.34-linux-amd64.rpm | ||
|
||
RUN mkdir /app | ||
WORKDIR /app | ||
|
||
COPY Makefile /app/Makefile | ||
RUN make install-test-deps | ||
|
||
ENV PATH="/tmp/resty-auto-ssl-test-luarocks/bin:${PATH}" | ||
ENV LUA_PATH="/tmp/resty-auto-ssl-test-luarocks/share/lua/5.1/?.lua;/tmp/resty-auto-ssl-test-luarocks/share/lua/5.1/?/init.lua;${LUA_PATH}" | ||
ENV LUA_CPATH="/tmp/resty-auto-ssl-test-luarocks/lib/lua/5.1/?.so;${LUA_CPATH}" | ||
|
||
COPY . /app | ||
|
||
CMD ["bash"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
FROM openresty/openresty:1.15.8.2-1-alpine-fat | ||
|
||
RUN mkdir /app | ||
WORKDIR /app | ||
|
||
# Runtime dependencies | ||
RUN apk add --no-cache \ | ||
bash \ | ||
curl \ | ||
diffutils \ | ||
grep \ | ||
openssl \ | ||
sed | ||
|
||
# Build dependencies. | ||
RUN apk add --no-cache \ | ||
make | ||
|
||
# Test dependencies | ||
RUN apk add --no-cache \ | ||
findutils \ | ||
gcc \ | ||
git \ | ||
lsof \ | ||
lua \ | ||
procps \ | ||
redis \ | ||
sudo \ | ||
tzdata \ | ||
wget && \ | ||
curl -fsSL -o /tmp/ngrok.tar.gz https://bin.equinox.io/a/naDTyS8Kyxv/ngrok-2.3.34-linux-386.tar.gz && \ | ||
tar -xvf /tmp/ngrok.tar.gz -C /usr/local/bin/ && \ | ||
rm -f /tmp/ngrok.tar.gz && \ | ||
chmod +x /usr/local/bin/ngrok | ||
|
||
COPY Makefile /app/Makefile | ||
RUN make install-test-deps | ||
|
||
ENV PATH="/tmp/resty-auto-ssl-test-luarocks/bin:${PATH}" | ||
ENV LUA_PATH="/tmp/resty-auto-ssl-test-luarocks/share/lua/5.1/?.lua;/tmp/resty-auto-ssl-test-luarocks/share/lua/5.1/?/init.lua;${LUA_PATH}" | ||
ENV LUA_CPATH="/tmp/resty-auto-ssl-test-luarocks/lib/lua/5.1/?.so;${LUA_CPATH}" | ||
|
||
COPY . /app | ||
|
||
CMD ["bash"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
FROM openresty/openresty:1.11.2.1-centos | ||
|
||
# Runtime dependencies | ||
RUN yum -y install \ | ||
bash \ | ||
coreutils \ | ||
curl \ | ||
diffutils \ | ||
grep \ | ||
openssl \ | ||
sed | ||
|
||
# Build dependencies. | ||
RUN yum -y install make | ||
|
||
# Test dependencies | ||
RUN yum -y install epel-release && \ | ||
yum -y install \ | ||
gcc \ | ||
git \ | ||
lsof \ | ||
lua \ | ||
procps-ng \ | ||
redis \ | ||
sudo \ | ||
https://bin.equinox.io/a/6iuHhJeWypm/ngrok-2.3.34-linux-amd64.rpm | ||
|
||
ENV PATH /usr/local/openresty/luajit/bin:/usr/local/openresty/bin:/usr/local/openresty/nginx/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | ||
ENV TEST_NGINX_RESOLVER 127.0.0.11 ipv6=off | ||
|
||
RUN mkdir /app | ||
WORKDIR /app | ||
|
||
COPY Makefile /app/Makefile | ||
RUN make install-test-deps | ||
|
||
ENV PATH="/tmp/resty-auto-ssl-test-luarocks/bin:${PATH}" | ||
ENV LUA_PATH="/tmp/resty-auto-ssl-test-luarocks/share/lua/5.1/?.lua;/tmp/resty-auto-ssl-test-luarocks/share/lua/5.1/?/init.lua;;" | ||
ENV LUA_CPATH="/tmp/resty-auto-ssl-test-luarocks/lib/lua/5.1/?.so;;" | ||
|
||
COPY . /app | ||
|
||
ENTRYPOINT [] | ||
CMD ["bash"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
FROM openresty/openresty:1.13.6.2-2-centos | ||
|
||
# Runtime dependencies | ||
RUN yum -y install \ | ||
bash \ | ||
coreutils \ | ||
curl \ | ||
diffutils \ | ||
grep \ | ||
openssl \ | ||
sed | ||
|
||
# Build dependencies. | ||
RUN yum -y install make | ||
|
||
# Test dependencies | ||
RUN yum -y install epel-release && \ | ||
yum -y install \ | ||
gcc \ | ||
git \ | ||
lsof \ | ||
lua \ | ||
procps-ng \ | ||
redis \ | ||
sudo \ | ||
https://bin.equinox.io/a/6iuHhJeWypm/ngrok-2.3.34-linux-amd64.rpm | ||
|
||
RUN mkdir /app | ||
WORKDIR /app | ||
|
||
COPY Makefile /app/Makefile | ||
RUN make install-test-deps | ||
|
||
ENV PATH="/tmp/resty-auto-ssl-test-luarocks/bin:${PATH}" | ||
ENV LUA_PATH="/tmp/resty-auto-ssl-test-luarocks/share/lua/5.1/?.lua;/tmp/resty-auto-ssl-test-luarocks/share/lua/5.1/?/init.lua;${LUA_PATH}" | ||
ENV LUA_CPATH="/tmp/resty-auto-ssl-test-luarocks/lib/lua/5.1/?.so;${LUA_CPATH}" | ||
|
||
COPY . /app | ||
|
||
CMD ["bash"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
FROM openresty/openresty:1.15.8.2-1-bionic | ||
|
||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
# Runtime dependencies | ||
RUN apt-get update && \ | ||
apt-get -y install \ | ||
bash \ | ||
coreutils \ | ||
curl \ | ||
diffutils \ | ||
grep \ | ||
openssl \ | ||
sed | ||
|
||
# Build dependencies. | ||
RUN apt-get update && \ | ||
apt-get -y install make | ||
|
||
# Test dependencies | ||
RUN apt-get update && \ | ||
apt-get -y install \ | ||
git \ | ||
lsof \ | ||
lua5.2 \ | ||
redis-server \ | ||
sudo \ | ||
tzdata && \ | ||
curl -fsSL -o /tmp/ngrok.deb https://bin.equinox.io/a/b2wQezFbsHk/ngrok-2.3.34-linux-amd64.deb && \ | ||
dpkg -i /tmp/ngrok.deb || apt-get -fy install && \ | ||
rm -f /tmp/ngrok.deb | ||
|
||
RUN mkdir /app | ||
WORKDIR /app | ||
|
||
COPY Makefile /app/Makefile | ||
RUN make install-test-deps | ||
|
||
ENV PATH="/tmp/resty-auto-ssl-test-luarocks/bin:${PATH}" | ||
ENV LUA_PATH="/tmp/resty-auto-ssl-test-luarocks/share/lua/5.1/?.lua;/tmp/resty-auto-ssl-test-luarocks/share/lua/5.1/?/init.lua;${LUA_PATH}" | ||
ENV LUA_CPATH="/tmp/resty-auto-ssl-test-luarocks/lib/lua/5.1/?.so;${LUA_CPATH}" | ||
|
||
COPY . /app | ||
|
||
CMD ["bash"] |
Oops, something went wrong.