-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[patch] divide gateway for future architecture
Signed-off-by: kpango <[email protected]>
- Loading branch information
kpango
committed
Jul 28, 2020
1 parent
bff597f
commit 01c785d
Showing
334 changed files
with
46,897 additions
and
2,358 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
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,93 @@ | ||
# name: 'Build docker image: gateway-backup' | ||
on: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- '*.*.*' | ||
- 'v*.*.*' | ||
- '*.*.*-*' | ||
- 'v*.*.*-*' | ||
paths: | ||
- 'internal/**' | ||
- '!internal/db/**' | ||
- '!internal/k8s/**' | ||
- 'apis/grpc/**' | ||
- 'pkg/gateway/backup/**' | ||
- 'cmd/gateway/backup/**' | ||
- 'dockers/base/Dockerfile' | ||
- 'dockers/gateway/backup/Dockerfile' | ||
- 'versions/GO_VERSION' | ||
pull_request: | ||
paths: | ||
- 'internal/**' | ||
- '!internal/db/**' | ||
- '!internal/k8s/**' | ||
- 'apis/grpc/**' | ||
- 'pkg/gateway/backup/**' | ||
- 'cmd/gateway/backup/**' | ||
- 'dockers/base/Dockerfile' | ||
- 'dockers/gateway/backup/Dockerfile' | ||
- 'versions/GO_VERSION' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
with: | ||
fetch-depth: 10 | ||
- name: Build the Docker image | ||
run: | | ||
echo 'Build docker image' | ||
make docker/build/gateway-backup | ||
- name: login to DockerHub | ||
run: | | ||
echo 'Login to DockerHub' | ||
echo ${DOCKERHUB_PASS} | docker login --username ${DOCKERHUB_USER} --password-stdin | ||
env: | ||
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }} | ||
DOCKERHUB_PASS: ${{ secrets.DOCKERHUB_PASS }} | ||
- name: push to DockerHub (master) | ||
if: github.ref == 'refs/heads/master' | ||
run: | | ||
echo 'Push to DockerHub (master)' | ||
imagename=`make docker/name/gateway-backup` | ||
docker tag ${imagename} ${imagename}:nightly | ||
docker push ${imagename}:nightly | ||
- name: push to DockerHub (pull request) | ||
if: github.event_name == 'pull_request' | ||
run: | | ||
echo 'Push to DockerHub (pull request)' | ||
imagename=`make docker/name/gateway-backup` | ||
pr_num=`cat $GITHUB_EVENT_PATH | jq -r ".number"` | ||
docker tag ${imagename} ${imagename}:pr-${pr_num} | ||
docker push ${imagename}:pr-${pr_num} | ||
- name: push to DockerHub (tags) | ||
if: startsWith( github.ref, 'refs/tags/') | ||
run: | | ||
echo 'Push to DockerHub (tags)' | ||
imagename=`make docker/name/gateway-backup` | ||
docker push ${imagename}:latest | ||
tag_name=`echo $GITHUB_REF | sed -e 's:^refs/tags/::'` | ||
docker tag ${imagename} ${imagename}:${tag_name} | ||
docker push ${imagename}:${tag_name} | ||
docker tag ${imagename} ${imagename}:nightly | ||
docker push ${imagename}:nightly | ||
slack: | ||
name: Slack notification | ||
needs: build | ||
runs-on: ubuntu-latest | ||
if: github.ref == 'refs/heads/master' || startsWith( github.ref, 'refs/tags/') | ||
steps: | ||
- uses: technote-space/workflow-conclusion-action@v1 | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: 8398a7/action-slack@v2 | ||
with: | ||
author_name: backup-gateway image build | ||
status: ${{ env.WORKFLOW_CONCLUSION }} | ||
only_mention_fail: channel | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_NOTIFY_WEBHOOK_URL }} |
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,93 @@ | ||
name: 'Build docker image: gateway-filter' | ||
on: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- '*.*.*' | ||
- 'v*.*.*' | ||
- '*.*.*-*' | ||
- 'v*.*.*-*' | ||
paths: | ||
- 'internal/**' | ||
- '!internal/db/**' | ||
- '!internal/k8s/**' | ||
- 'apis/grpc/**' | ||
- 'pkg/gateway/filter/**' | ||
- 'cmd/gateway/filter/**' | ||
- 'dockers/base/Dockerfile' | ||
- 'dockers/gateway/filter/Dockerfile' | ||
- 'versions/GO_VERSION' | ||
pull_request: | ||
paths: | ||
- 'internal/**' | ||
- '!internal/db/**' | ||
- '!internal/k8s/**' | ||
- 'apis/grpc/**' | ||
- 'pkg/gateway/filter/**' | ||
- 'cmd/gateway/filter/**' | ||
- 'dockers/base/Dockerfile' | ||
- 'dockers/gateway/filter/Dockerfile' | ||
- 'versions/GO_VERSION' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
with: | ||
fetch-depth: 10 | ||
- name: Build the Docker image | ||
run: | | ||
echo 'Build docker image' | ||
make docker/build/gateway-filter | ||
- name: login to DockerHub | ||
run: | | ||
echo 'Login to DockerHub' | ||
echo ${DOCKERHUB_PASS} | docker login --username ${DOCKERHUB_USER} --password-stdin | ||
env: | ||
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }} | ||
DOCKERHUB_PASS: ${{ secrets.DOCKERHUB_PASS }} | ||
- name: push to DockerHub (master) | ||
if: github.ref == 'refs/heads/master' | ||
run: | | ||
echo 'Push to DockerHub (master)' | ||
imagename=`make docker/name/gateway-filter` | ||
docker tag ${imagename} ${imagename}:nightly | ||
docker push ${imagename}:nightly | ||
- name: push to DockerHub (pull request) | ||
if: github.event_name == 'pull_request' | ||
run: | | ||
echo 'Push to DockerHub (pull request)' | ||
imagename=`make docker/name/gateway-filter` | ||
pr_num=`cat $GITHUB_EVENT_PATH | jq -r ".number"` | ||
docker tag ${imagename} ${imagename}:pr-${pr_num} | ||
docker push ${imagename}:pr-${pr_num} | ||
- name: push to DockerHub (tags) | ||
if: startsWith( github.ref, 'refs/tags/') | ||
run: | | ||
echo 'Push to DockerHub (tags)' | ||
imagename=`make docker/name/gateway-filter` | ||
docker push ${imagename}:latest | ||
tag_name=`echo $GITHUB_REF | sed -e 's:^refs/tags/::'` | ||
docker tag ${imagename} ${imagename}:${tag_name} | ||
docker push ${imagename}:${tag_name} | ||
docker tag ${imagename} ${imagename}:nightly | ||
docker push ${imagename}:nightly | ||
slack: | ||
name: Slack notification | ||
needs: build | ||
runs-on: ubuntu-latest | ||
if: github.ref == 'refs/heads/master' || startsWith( github.ref, 'refs/tags/') | ||
steps: | ||
- uses: technote-space/workflow-conclusion-action@v1 | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: 8398a7/action-slack@v2 | ||
with: | ||
author_name: filter-gateway image build | ||
status: ${{ env.WORKFLOW_CONCLUSION }} | ||
only_mention_fail: channel | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_NOTIFY_WEBHOOK_URL }} |
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,93 @@ | ||
name: 'Build docker image: gateway-lb' | ||
on: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- '*.*.*' | ||
- 'v*.*.*' | ||
- '*.*.*-*' | ||
- 'v*.*.*-*' | ||
paths: | ||
- 'internal/**' | ||
- '!internal/db/**' | ||
- '!internal/k8s/**' | ||
- 'apis/grpc/**' | ||
- 'pkg/gateway/lb/**' | ||
- 'cmd/gateway/lb/**' | ||
- 'dockers/base/Dockerfile' | ||
- 'dockers/gateway/lb/Dockerfile' | ||
- 'versions/GO_VERSION' | ||
pull_request: | ||
paths: | ||
- 'internal/**' | ||
- '!internal/db/**' | ||
- '!internal/k8s/**' | ||
- 'apis/grpc/**' | ||
- 'pkg/gateway/lb/**' | ||
- 'cmd/gateway/lb/**' | ||
- 'dockers/base/Dockerfile' | ||
- 'dockers/gateway/lb/Dockerfile' | ||
- 'versions/GO_VERSION' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
with: | ||
fetch-depth: 10 | ||
- name: Build the Docker image | ||
run: | | ||
echo 'Build docker image' | ||
make docker/build/gateway-lb | ||
- name: login to DockerHub | ||
run: | | ||
echo 'Login to DockerHub' | ||
echo ${DOCKERHUB_PASS} | docker login --username ${DOCKERHUB_USER} --password-stdin | ||
env: | ||
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }} | ||
DOCKERHUB_PASS: ${{ secrets.DOCKERHUB_PASS }} | ||
- name: push to DockerHub (master) | ||
if: github.ref == 'refs/heads/master' | ||
run: | | ||
echo 'Push to DockerHub (master)' | ||
imagename=`make docker/name/gateway-lb` | ||
docker tag ${imagename} ${imagename}:nightly | ||
docker push ${imagename}:nightly | ||
- name: push to DockerHub (pull request) | ||
if: github.event_name == 'pull_request' | ||
run: | | ||
echo 'Push to DockerHub (pull request)' | ||
imagename=`make docker/name/gateway-lb` | ||
pr_num=`cat $GITHUB_EVENT_PATH | jq -r ".number"` | ||
docker tag ${imagename} ${imagename}:pr-${pr_num} | ||
docker push ${imagename}:pr-${pr_num} | ||
- name: push to DockerHub (tags) | ||
if: startsWith( github.ref, 'refs/tags/') | ||
run: | | ||
echo 'Push to DockerHub (tags)' | ||
imagename=`make docker/name/gateway-lb` | ||
docker push ${imagename}:latest | ||
tag_name=`echo $GITHUB_REF | sed -e 's:^refs/tags/::'` | ||
docker tag ${imagename} ${imagename}:${tag_name} | ||
docker push ${imagename}:${tag_name} | ||
docker tag ${imagename} ${imagename}:nightly | ||
docker push ${imagename}:nightly | ||
slack: | ||
name: Slack notification | ||
needs: build | ||
runs-on: ubuntu-latest | ||
if: github.ref == 'refs/heads/master' || startsWith( github.ref, 'refs/tags/') | ||
steps: | ||
- uses: technote-space/workflow-conclusion-action@v1 | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: 8398a7/action-slack@v2 | ||
with: | ||
author_name: lb-gateway image build | ||
status: ${{ env.WORKFLOW_CONCLUSION }} | ||
only_mention_fail: channel | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_NOTIFY_WEBHOOK_URL }} |
Oops, something went wrong.