Skip to content

Commit 3d09c59

Browse files
authored
Merge pull request #8 from shawnhankim/awssig-v4-test
feat: nginx-aws-signature unit test
2 parents 979696c + 72a0705 commit 3d09c59

Some content is hidden

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

41 files changed

+511
-2534
lines changed

.github/workflows/blank.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

.github/workflows/main.yml

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
name: CI
2+
3+
# Controls when the action will run. Triggers the workflow on push or pull request
4+
# events but only for the main branch
5+
on:
6+
push:
7+
branches: [ main, awssig-v4-test ]
8+
pull_request:
9+
branches: [ main ]
10+
11+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
16+
if: github.ref != 'refs/heads/main'
17+
steps:
18+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
19+
- uses: actions/checkout@v3
20+
21+
- name: Install dependencies
22+
run: sudo apt-get install -y wait-for-it
23+
- name: Run tests - stable njs version
24+
run: export NGINX_TYPE=oss && ./tests/test.sh --type oss
25+
26+
# build_and_deploy:
27+
# runs-on: ubuntu-latest
28+
29+
# if: github.ref == 'refs/heads/main'
30+
# steps:
31+
# # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
32+
# - uses: actions/checkout@v3
33+
34+
# - name: Get current date
35+
# id: date
36+
# run: echo "date=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT
37+
# - name: Configure Github Package Registry
38+
# run: echo ${{ secrets.GITHUB_TOKEN }} | docker login docker.pkg.github.com -u $GITHUB_ACTOR --password-stdin
39+
# - name: Install dependencies
40+
# run: sudo apt-get install -y wait-for-it
41+
42+
# # Run tests and builds image
43+
# - name: Run tests - latest njs version
44+
# run: ./test.sh --latest-njs --type oss
45+
# # latest-njs-oss image push [Github]
46+
# - name: Tag container image for Push to github [latest-njs-oss date]
47+
# run: docker tag nginx-s3-gateway:latest-njs-oss docker.pkg.github.com/$GITHUB_REPOSITORY/nginx-oss-s3-gateway:latest-njs-oss-${{ steps.date.outputs.date }}
48+
# - name: Tag container image for Push to github [latest-njs-oss]
49+
# run: docker tag nginx-s3-gateway:latest-njs-oss docker.pkg.github.com/$GITHUB_REPOSITORY/nginx-oss-s3-gateway:latest-njs-oss
50+
# - name: Push container image to github [latest-njs-oss date]
51+
# run: docker push docker.pkg.github.com/$GITHUB_REPOSITORY/nginx-oss-s3-gateway:latest-njs-oss-${{ steps.date.outputs.date }}
52+
# - name: Push container image to github [latest-njs-oss]
53+
# run: docker push docker.pkg.github.com/$GITHUB_REPOSITORY/nginx-oss-s3-gateway:latest-njs-oss
54+
55+
# # Run tests and builds image
56+
# - name: Run tests - stable njs version - unprivileged process
57+
# run: ./test.sh --unprivileged --type oss
58+
# # unprivileged-oss image push [Github]
59+
# - name: Tag container image for Push to github [unprivileged-oss date]
60+
# run: docker tag nginx-s3-gateway:unprivileged-oss docker.pkg.github.com/$GITHUB_REPOSITORY/nginx-oss-s3-gateway:unprivileged-oss-${{ steps.date.outputs.date }}
61+
# - name: Tag container image for Push to github [unprivileged-oss]
62+
# run: docker tag nginx-s3-gateway:unprivileged-oss docker.pkg.github.com/$GITHUB_REPOSITORY/nginx-oss-s3-gateway:unprivileged-oss
63+
# - name: Push container image to github [unprivileged-oss date]
64+
# run: docker push docker.pkg.github.com/$GITHUB_REPOSITORY/nginx-oss-s3-gateway:unprivileged-oss-${{ steps.date.outputs.date }}
65+
# - name: Push container image to github [unprivileged-oss]
66+
# run: docker push docker.pkg.github.com/$GITHUB_REPOSITORY/nginx-oss-s3-gateway:unprivileged-oss
67+
68+
# # Run tests and builds image
69+
# - name: Run tests - stable njs version
70+
# run: ./test.sh --type oss
71+
# # oss image push [Github]
72+
# - name: Tag container image for Push to github [oss date]
73+
# run: docker tag nginx-s3-gateway:oss docker.pkg.github.com/$GITHUB_REPOSITORY/nginx-oss-s3-gateway:latest-${{ steps.date.outputs.date }}
74+
# - name: Tag container image for Push to github [oss]
75+
# run: docker tag nginx-s3-gateway:oss docker.pkg.github.com/$GITHUB_REPOSITORY/nginx-oss-s3-gateway:latest
76+
# - name: Push container image to github [oss date]
77+
# run: docker push docker.pkg.github.com/$GITHUB_REPOSITORY/nginx-oss-s3-gateway:latest-${{ steps.date.outputs.date }}
78+
# - name: Push container image to github [oss latest]
79+
# run: docker push docker.pkg.github.com/$GITHUB_REPOSITORY/nginx-oss-s3-gateway:latest
80+
# # Login to Docker Hub
81+
# - name: Login to Docker Hub
82+
# uses: docker/login-action@v1
83+
# with:
84+
# username: ${{ secrets.DOCKER_HUB_USERNAME }}
85+
# password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
86+
# # latest-njs-oss image push [Docker Hub]
87+
# - name: Tag container image for Push to Docker Hub [latest-njs-oss date]
88+
# run: docker tag nginx-s3-gateway:latest-njs-oss nginxinc/nginx-s3-gateway:latest-njs-oss-${{ steps.date.outputs.date }}
89+
# - name: Tag container image for Push to Docker Hub [latest-njs-oss]
90+
# run: docker tag nginx-s3-gateway:latest-njs-oss nginxinc/nginx-s3-gateway:latest-njs-oss
91+
# - name: Push container image to Docker Hub [latest-njs-oss date]
92+
# run: docker push nginxinc/nginx-s3-gateway:latest-njs-oss-${{ steps.date.outputs.date }}
93+
# - name: Push container image to Docker Hub [latest-njs-oss]
94+
# run: docker push nginxinc/nginx-s3-gateway:latest-njs-oss
95+
# # unprivileged-oss image push [Docker Hub]
96+
# - name: Tag container image for Push to Docker Hub [unprivileged-oss date]
97+
# run: docker tag nginx-s3-gateway:unprivileged-oss nginxinc/nginx-s3-gateway:unprivileged-oss-${{ steps.date.outputs.date }}
98+
# - name: Tag container image for Push to Docker Hub [unprivileged-oss]
99+
# run: docker tag nginx-s3-gateway:unprivileged-oss nginxinc/nginx-s3-gateway:unprivileged-oss
100+
# - name: Push container image to Docker Hub [unprivileged-oss date]
101+
# run: docker push nginxinc/nginx-s3-gateway:unprivileged-oss-${{ steps.date.outputs.date }}
102+
# - name: Push container image to Docker Hub [unprivileged-oss]
103+
# run: docker push nginxinc/nginx-s3-gateway:unprivileged-oss
104+
# # oss image push [Docker Hub]
105+
# - name: Tag container image for Push to Docker Hub [oss date]
106+
# run: docker tag nginx-s3-gateway:oss nginxinc/nginx-s3-gateway:latest-${{ steps.date.outputs.date }}
107+
# - name: Tag container image for Push to Docker Hub [oss]
108+
# run: docker tag nginx-s3-gateway:oss nginxinc/nginx-s3-gateway:latest
109+
# - name: Push container image to Docker Hub [oss date]
110+
# run: docker push nginxinc/nginx-s3-gateway:latest-${{ steps.date.outputs.date }}
111+
# - name: Push container image to Docker Hub [oss latest]
112+
# run: docker push nginxinc/nginx-s3-gateway:latest

Dockerfile.oss

Lines changed: 0 additions & 34 deletions
This file was deleted.

Makefile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
start:
2+
export NGINX_TYPE=oss && docker-compose -f tests/docker/docker-compose.yml up -d
3+
4+
start-plus:
5+
export NGINX_TYPE=plus && docker-compose -f tests/docker/docker-compose.yml up -d
6+
7+
test:
8+
bash tests/test.sh --type oss
9+
10+
test-plus:
11+
bash tests/test.sh --type plus
12+
13+
down:
14+
docker-compose -f tests/docker/docker-compose.yml down
15+
16+
clean:
17+
docker kill $$(docker ps -q) 2> /dev/null || true
18+
docker system prune -a

0 commit comments

Comments
 (0)