Skip to content

Commit

Permalink
Trying something new with running the pipeline against many different…
Browse files Browse the repository at this point in the history
… OS versions and nginx versins using a matrix
  • Loading branch information
nicholaschiasson committed Oct 7, 2020
1 parent 3a1ccad commit 3434df7
Show file tree
Hide file tree
Showing 13 changed files with 245 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM nicholaschiasson/nginx-module-toolbox:amazonlinux-2-1.10.3-2.4.0

WORKDIR /src/openssl
RUN curl -sL https://www.openssl.org/source/openssl-1.1.1g.tar.gz -o openssl.tar.gz
RUN tar --strip-components=1 -xzf openssl.tar.gz

WORKDIR /src/modules

RUN curl -sL https://github.com/yaoweibin/nginx_upstream_check_module/archive/master.tar.gz -o nginx_upstream_check_module.tar.gz
RUN mkdir nginx_upstream_check_module
RUN tar --directory=nginx_upstream_check_module --strip-components=1 -xzf nginx_upstream_check_module.tar.gz

RUN curl -sL https://github.com/vozlt/nginx-module-vts/archive/v0.1.18.tar.gz -o nginx-module-vts.tar.gz
RUN mkdir nginx-module-vts
RUN tar --directory=nginx-module-vts --strip-components=1 -xzf nginx-module-vts.tar.gz

RUN rm *.tar.gz

WORKDIR /github/workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM nicholaschiasson/nginx-module-toolbox:amazonlinux-2-1.12.2-2.4.0

WORKDIR /src/openssl
RUN curl -sL https://www.openssl.org/source/openssl-1.1.1g.tar.gz -o openssl.tar.gz
RUN tar --strip-components=1 -xzf openssl.tar.gz

WORKDIR /src/modules

RUN curl -sL https://github.com/yaoweibin/nginx_upstream_check_module/archive/master.tar.gz -o nginx_upstream_check_module.tar.gz
RUN mkdir nginx_upstream_check_module
RUN tar --directory=nginx_upstream_check_module --strip-components=1 -xzf nginx_upstream_check_module.tar.gz

RUN curl -sL https://github.com/vozlt/nginx-module-vts/archive/v0.1.18.tar.gz -o nginx-module-vts.tar.gz
RUN mkdir nginx-module-vts
RUN tar --directory=nginx-module-vts --strip-components=1 -xzf nginx-module-vts.tar.gz

RUN rm *.tar.gz

WORKDIR /github/workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM nicholaschiasson/nginx-module-toolbox:amazonlinux-2-1.14.2-2.4.0

WORKDIR /src/openssl
RUN curl -sL https://www.openssl.org/source/openssl-1.1.1g.tar.gz -o openssl.tar.gz
RUN tar --strip-components=1 -xzf openssl.tar.gz

WORKDIR /src/modules

RUN curl -sL https://github.com/yaoweibin/nginx_upstream_check_module/archive/master.tar.gz -o nginx_upstream_check_module.tar.gz
RUN mkdir nginx_upstream_check_module
RUN tar --directory=nginx_upstream_check_module --strip-components=1 -xzf nginx_upstream_check_module.tar.gz

RUN curl -sL https://github.com/vozlt/nginx-module-vts/archive/v0.1.18.tar.gz -o nginx-module-vts.tar.gz
RUN mkdir nginx-module-vts
RUN tar --directory=nginx-module-vts --strip-components=1 -xzf nginx-module-vts.tar.gz

RUN rm *.tar.gz

WORKDIR /github/workspace
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM nicholaschiasson/nginx-module-toolbox:amazonlinux-2-1.16.1-2.2.2
FROM nicholaschiasson/nginx-module-toolbox:amazonlinux-2-1.16.1-2.4.0

WORKDIR /src/openssl
RUN curl -sL https://www.openssl.org/source/openssl-1.1.1g.tar.gz -o openssl.tar.gz
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM nicholaschiasson/nginx-module-toolbox:amazonlinux-2-1.18.0-2.4.0

WORKDIR /src/openssl
RUN curl -sL https://www.openssl.org/source/openssl-1.1.1g.tar.gz -o openssl.tar.gz
RUN tar --strip-components=1 -xzf openssl.tar.gz

WORKDIR /src/modules

RUN curl -sL https://github.com/yaoweibin/nginx_upstream_check_module/archive/master.tar.gz -o nginx_upstream_check_module.tar.gz
RUN mkdir nginx_upstream_check_module
RUN tar --directory=nginx_upstream_check_module --strip-components=1 -xzf nginx_upstream_check_module.tar.gz

RUN curl -sL https://github.com/vozlt/nginx-module-vts/archive/v0.1.18.tar.gz -o nginx-module-vts.tar.gz
RUN mkdir nginx-module-vts
RUN tar --directory=nginx-module-vts --strip-components=1 -xzf nginx-module-vts.tar.gz

RUN rm *.tar.gz

WORKDIR /github/workspace
19 changes: 19 additions & 0 deletions .github/actions/nginx-module-toolbox/Dockerfile.centos-8-1.10.3
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM nicholaschiasson/nginx-module-toolbox:centos-8-1.10.3-2.4.0

WORKDIR /src/openssl
RUN curl -sL https://www.openssl.org/source/openssl-1.1.1g.tar.gz -o openssl.tar.gz
RUN tar --strip-components=1 -xzf openssl.tar.gz

WORKDIR /src/modules

RUN curl -sL https://github.com/yaoweibin/nginx_upstream_check_module/archive/master.tar.gz -o nginx_upstream_check_module.tar.gz
RUN mkdir nginx_upstream_check_module
RUN tar --directory=nginx_upstream_check_module --strip-components=1 -xzf nginx_upstream_check_module.tar.gz

RUN curl -sL https://github.com/vozlt/nginx-module-vts/archive/v0.1.18.tar.gz -o nginx-module-vts.tar.gz
RUN mkdir nginx-module-vts
RUN tar --directory=nginx-module-vts --strip-components=1 -xzf nginx-module-vts.tar.gz

RUN rm *.tar.gz

WORKDIR /github/workspace
19 changes: 19 additions & 0 deletions .github/actions/nginx-module-toolbox/Dockerfile.centos-8-1.12.2
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM nicholaschiasson/nginx-module-toolbox:centos-8-1.12.2-2.4.0

WORKDIR /src/openssl
RUN curl -sL https://www.openssl.org/source/openssl-1.1.1g.tar.gz -o openssl.tar.gz
RUN tar --strip-components=1 -xzf openssl.tar.gz

WORKDIR /src/modules

RUN curl -sL https://github.com/yaoweibin/nginx_upstream_check_module/archive/master.tar.gz -o nginx_upstream_check_module.tar.gz
RUN mkdir nginx_upstream_check_module
RUN tar --directory=nginx_upstream_check_module --strip-components=1 -xzf nginx_upstream_check_module.tar.gz

RUN curl -sL https://github.com/vozlt/nginx-module-vts/archive/v0.1.18.tar.gz -o nginx-module-vts.tar.gz
RUN mkdir nginx-module-vts
RUN tar --directory=nginx-module-vts --strip-components=1 -xzf nginx-module-vts.tar.gz

RUN rm *.tar.gz

WORKDIR /github/workspace
19 changes: 19 additions & 0 deletions .github/actions/nginx-module-toolbox/Dockerfile.centos-8-1.14.2
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM nicholaschiasson/nginx-module-toolbox:centos-8-1.14.2-2.4.0

WORKDIR /src/openssl
RUN curl -sL https://www.openssl.org/source/openssl-1.1.1g.tar.gz -o openssl.tar.gz
RUN tar --strip-components=1 -xzf openssl.tar.gz

WORKDIR /src/modules

RUN curl -sL https://github.com/yaoweibin/nginx_upstream_check_module/archive/master.tar.gz -o nginx_upstream_check_module.tar.gz
RUN mkdir nginx_upstream_check_module
RUN tar --directory=nginx_upstream_check_module --strip-components=1 -xzf nginx_upstream_check_module.tar.gz

RUN curl -sL https://github.com/vozlt/nginx-module-vts/archive/v0.1.18.tar.gz -o nginx-module-vts.tar.gz
RUN mkdir nginx-module-vts
RUN tar --directory=nginx-module-vts --strip-components=1 -xzf nginx-module-vts.tar.gz

RUN rm *.tar.gz

WORKDIR /github/workspace
19 changes: 19 additions & 0 deletions .github/actions/nginx-module-toolbox/Dockerfile.centos-8-1.16.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM nicholaschiasson/nginx-module-toolbox:centos-8-1.16.1-2.4.0

WORKDIR /src/openssl
RUN curl -sL https://www.openssl.org/source/openssl-1.1.1g.tar.gz -o openssl.tar.gz
RUN tar --strip-components=1 -xzf openssl.tar.gz

WORKDIR /src/modules

RUN curl -sL https://github.com/yaoweibin/nginx_upstream_check_module/archive/master.tar.gz -o nginx_upstream_check_module.tar.gz
RUN mkdir nginx_upstream_check_module
RUN tar --directory=nginx_upstream_check_module --strip-components=1 -xzf nginx_upstream_check_module.tar.gz

RUN curl -sL https://github.com/vozlt/nginx-module-vts/archive/v0.1.18.tar.gz -o nginx-module-vts.tar.gz
RUN mkdir nginx-module-vts
RUN tar --directory=nginx-module-vts --strip-components=1 -xzf nginx-module-vts.tar.gz

RUN rm *.tar.gz

WORKDIR /github/workspace
19 changes: 19 additions & 0 deletions .github/actions/nginx-module-toolbox/Dockerfile.centos-8-1.18.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM nicholaschiasson/nginx-module-toolbox:centos-8-1.18.0-2.4.0

WORKDIR /src/openssl
RUN curl -sL https://www.openssl.org/source/openssl-1.1.1g.tar.gz -o openssl.tar.gz
RUN tar --strip-components=1 -xzf openssl.tar.gz

WORKDIR /src/modules

RUN curl -sL https://github.com/yaoweibin/nginx_upstream_check_module/archive/master.tar.gz -o nginx_upstream_check_module.tar.gz
RUN mkdir nginx_upstream_check_module
RUN tar --directory=nginx_upstream_check_module --strip-components=1 -xzf nginx_upstream_check_module.tar.gz

RUN curl -sL https://github.com/vozlt/nginx-module-vts/archive/v0.1.18.tar.gz -o nginx-module-vts.tar.gz
RUN mkdir nginx-module-vts
RUN tar --directory=nginx-module-vts --strip-components=1 -xzf nginx-module-vts.tar.gz

RUN rm *.tar.gz

WORKDIR /github/workspace
11 changes: 10 additions & 1 deletion .github/actions/nginx-module-toolbox/action.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
name: Nginx Module Toolbox
inputs:
imageBase:
description: Base docker image version.
required: true
default: amazonlinux-2
nginxVersion:
description: Nginx version.
required: true
default: 1.16.1
runs:
using: docker
image: Dockerfile
image: Dockerfile.${{ inputs.imageBase }}-${{ inputs.nginxVersion }}
64 changes: 62 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,56 +8,116 @@ jobs:
analyse:
runs-on: ubuntu-latest
name: Analyse
strategy:
matrix:
imageBase:
# - alpine-3
- amazonlinux-2
- centos-8
# - ubuntu-20.04
nginxVersion:
- 1.10.3
- 1.12.2
- 1.14.2
- 1.16.1
- 1.18.0
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Analyse
uses: ./.github/actions/nginx-module-toolbox
with:
entrypoint: ./scripts/analyse.sh
imageBase: ${{ matrix.imageBase }}
nginxVersion: ${{ matrix.nginxVersion }}
lint:
runs-on: ubuntu-latest
name: Lint
strategy:
matrix:
imageBase:
# - alpine-3
- amazonlinux-2
- centos-8
# - ubuntu-20.04
nginxVersion:
- 1.10.3
- 1.12.2
- 1.14.2
- 1.16.1
- 1.18.0
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Lint
uses: ./.github/actions/nginx-module-toolbox
with:
entrypoint: ./scripts/lint.sh
imageBase: ${{ matrix.imageBase }}
nginxVersion: ${{ matrix.nginxVersion }}
build:
runs-on: ubuntu-latest
name: Build
strategy:
matrix:
imageBase:
# - alpine-3
- amazonlinux-2
- centos-8
# - ubuntu-20.04
nginxVersion:
- 1.10.3
- 1.12.2
- 1.14.2
- 1.16.1
- 1.18.0
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build
uses: ./.github/actions/nginx-module-toolbox
with:
entrypoint: ./scripts/build.sh
imageBase: ${{ matrix.imageBase }}
nginxVersion: ${{ matrix.nginxVersion }}
- name: Upload Artifacts
if: ${{ env.GITHUB_ACTIONS_ENVIRONMENT != 'local' }}
uses: actions/upload-artifact@v2
with:
name: nginx
name: nginx-${{ matrix.imageBase }}-${{ matrix.nginxVersion }}
path: bin
test:
runs-on: ubuntu-latest
name: Test
needs: build
strategy:
matrix:
imageBase:
# - alpine-3
- amazonlinux-2
- centos-8
# - ubuntu-20.04
nginxVersion:
- 1.10.3
- 1.12.2
- 1.14.2
- 1.16.1
- 1.18.0
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Download Artifacts
if: ${{ env.GITHUB_ACTIONS_ENVIRONMENT != 'local' }}
uses: actions/download-artifact@v2
with:
name: nginx
name: nginx-${{ matrix.imageBase }}-${{ matrix.nginxVersion }}
path: bin
- name: Test
uses: ./.github/actions/nginx-module-toolbox
with:
entrypoint: ./scripts/test.sh
imageBase: ${{ matrix.imageBase }}
nginxVersion: ${{ matrix.nginxVersion }}
tag:
runs-on: ubuntu-latest
name: Tag
Expand Down
2 changes: 1 addition & 1 deletion t/006.compatibility_nginx-module-vts.t
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ run_tests();

__DATA__
=== TEST 1: Valid upstream
=== TEST 1: Virtual host traffic status
--- init
`echo 'local-data: "example.com 1 A 127.0.0.2"' > /etc/unbound_local_zone.conf &&
echo 'local-data: "example.com 1 A 127.0.0.3"' >> /etc/unbound_local_zone.conf &&
Expand Down

0 comments on commit 3434df7

Please sign in to comment.