feat(apisix): add Cloudron package
- Implements Apache APISIX packaging for Cloudron platform. - Includes Dockerfile, CloudronManifest.json, and start.sh. - Configured to use Cloudron's etcd addon. 🤖 Generated with Gemini CLI Co-Authored-By: Gemini <noreply@google.com>
This commit is contained in:
68
CloudronPackages/APISIX/apisix-source/.github/ISSUE_TEMPLATE/bug_report.yml
vendored
Normal file
68
CloudronPackages/APISIX/apisix-source/.github/ISSUE_TEMPLATE/bug_report.yml
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
name: "Bug Report"
|
||||
description: Report a bug to help improve the project.
|
||||
title: "bug: "
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thank you for taking the time to report this bug!
|
||||
|
||||
_The more information you share, the faster we can identify and fix the bug._
|
||||
|
||||
Prior to opening the issue, please make sure that you:
|
||||
|
||||
- Use English to communicate.
|
||||
- Search the [open issues](https://github.com/apache/apisix/issues) and [discussion forum](https://github.com/apache/apisix/discussions) to avoid duplicating the issue.
|
||||
|
||||
- type: textarea
|
||||
id: current-behavior
|
||||
attributes:
|
||||
label: Current Behavior
|
||||
description: Describe the issue you are facing.
|
||||
placeholder: |
|
||||
What is the issue with the current behavior?
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: expected-behavior
|
||||
attributes:
|
||||
label: Expected Behavior
|
||||
description: Describe what you expected to happen.
|
||||
placeholder: |
|
||||
What did you expect to happen instead?
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
id: error
|
||||
attributes:
|
||||
label: Error Logs
|
||||
description: Paste the error logs if any. You can change the [log level](https://github.com/apache/apisix/blob/617c325628f33961be67f61f0fa8002afc370e42/docs/en/latest/FAQ.md#how-to-change-the-log-level) to get a verbose error log.
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
id: steps
|
||||
attributes:
|
||||
label: Steps to Reproduce
|
||||
description: Share the steps you took so that we can reproduce the issue. Reports without proper steps details will likely be closed.
|
||||
placeholder: |
|
||||
1. Run APISIX via the Docker image.
|
||||
2. Create a Route with the Admin API.
|
||||
3. Try configuring ...
|
||||
4. ...
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: environment
|
||||
attributes:
|
||||
label: Environment
|
||||
description: Share your environment details. Reports without proper environment details will likely be closed.
|
||||
value: |
|
||||
- APISIX version (run `apisix version`):
|
||||
- Operating system (run `uname -a`):
|
||||
- OpenResty / Nginx version (run `openresty -V` or `nginx -V`):
|
||||
- etcd version, if relevant (run `curl http://127.0.0.1:9090/v1/server_info`):
|
||||
- APISIX Dashboard version, if relevant:
|
||||
- Plugin runner version, for issues related to plugin runners:
|
||||
- LuaRocks version, for installation issues (run `luarocks --version`):
|
||||
validations:
|
||||
required: true
|
5
CloudronPackages/APISIX/apisix-source/.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
5
CloudronPackages/APISIX/apisix-source/.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: APISIX Discussion Forum
|
||||
url: https://github.com/apache/apisix/discussions
|
||||
about: Please ask and answer questions here.
|
23
CloudronPackages/APISIX/apisix-source/.github/ISSUE_TEMPLATE/feature_request.yml
vendored
Normal file
23
CloudronPackages/APISIX/apisix-source/.github/ISSUE_TEMPLATE/feature_request.yml
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
name: "Feature Request"
|
||||
description: Suggest an enhancement to APISIX.
|
||||
title: "feat: As a user, I want to ..., so that ..."
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
_The more information you share, the faster we can help you._
|
||||
|
||||
Prior to opening the issue, please make sure that you:
|
||||
|
||||
- Use English to communicate.
|
||||
- Search the [open issues](https://github.com/apache/apisix/issues) and [discussion forum](https://github.com/apache/apisix/discussions) to avoid duplicating the issue.
|
||||
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: Description
|
||||
description: Describe the feature you would like to see.
|
||||
placeholder: |
|
||||
As a user, I want to ..., so that...
|
||||
validations:
|
||||
required: true
|
33
CloudronPackages/APISIX/apisix-source/.github/ISSUE_TEMPLATE/improve_docs.yml
vendored
Normal file
33
CloudronPackages/APISIX/apisix-source/.github/ISSUE_TEMPLATE/improve_docs.yml
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
name: "Documentation Issue"
|
||||
description: Issues related to documentation.
|
||||
title: "docs: "
|
||||
labels: [doc]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
_The more information you share, the faster we can help you._
|
||||
|
||||
Prior to opening the issue, please make sure that you:
|
||||
|
||||
- Use English to communicate.
|
||||
- Search the [open issues](https://github.com/apache/apisix/issues) and [discussion forum](https://github.com/apache/apisix/discussions) to avoid duplicating the issue.
|
||||
|
||||
- type: textarea
|
||||
id: current-state
|
||||
attributes:
|
||||
label: Current State
|
||||
description: Describe the current state of the documentation.
|
||||
placeholder: |
|
||||
The documentation for the API in this page (url) is missing ...
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: desired-state
|
||||
attributes:
|
||||
label: Desired State
|
||||
description: Describe the desired state the documentation should be in.
|
||||
placeholder: |
|
||||
There should be line mentioning how the API behaves when ...
|
||||
validations:
|
||||
required: true
|
36
CloudronPackages/APISIX/apisix-source/.github/ISSUE_TEMPLATE/request_help.yml
vendored
Normal file
36
CloudronPackages/APISIX/apisix-source/.github/ISSUE_TEMPLATE/request_help.yml
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
name: "Request Help"
|
||||
description: Stuck? Ask for help!
|
||||
title: "help request: "
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
_The more information you share, the faster we can help you._
|
||||
|
||||
Prior to opening the issue, please make sure that you:
|
||||
|
||||
- Use English to communicate.
|
||||
- Search the [open issues](https://github.com/apache/apisix/issues) and [discussion forum](https://github.com/apache/apisix/discussions) to avoid duplicating the issue.
|
||||
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: Description
|
||||
description: Describe the issue you are facing and what you need help with.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: environment
|
||||
attributes:
|
||||
label: Environment
|
||||
description: Share your environment details. Reports without proper environment details will likely be closed.
|
||||
value: |
|
||||
- APISIX version (run `apisix version`):
|
||||
- Operating system (run `uname -a`):
|
||||
- OpenResty / Nginx version (run `openresty -V` or `nginx -V`):
|
||||
- etcd version, if relevant (run `curl http://127.0.0.1:9090/v1/server_info`):
|
||||
- APISIX Dashboard version, if relevant:
|
||||
- Plugin runner version, for issues related to plugin runners:
|
||||
- LuaRocks version, for installation issues (run `luarocks --version`):
|
||||
validations:
|
||||
required: true
|
33
CloudronPackages/APISIX/apisix-source/.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
33
CloudronPackages/APISIX/apisix-source/.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
### Description
|
||||
|
||||
<!-- Please include a summary of the change and which issue is fixed. -->
|
||||
<!-- Please also include relevant motivation and context. -->
|
||||
|
||||
#### Which issue(s) this PR fixes:
|
||||
<!--
|
||||
*Automatically closes linked issue when PR is merged.
|
||||
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
|
||||
-->
|
||||
Fixes #
|
||||
|
||||
### Checklist
|
||||
|
||||
- [ ] I have explained the need for this PR and the problem it solves
|
||||
- [ ] I have explained the changes or the new features added to this PR
|
||||
- [ ] I have added tests corresponding to this change
|
||||
- [ ] I have updated the documentation to reflect this change
|
||||
- [ ] I have verified that this change is backward compatible (If not, please discuss on the [APISIX mailing list](https://github.com/apache/apisix/tree/master#community) first)
|
||||
|
||||
<!--
|
||||
|
||||
Note
|
||||
|
||||
1. Mark the PR as draft until it's ready to be reviewed.
|
||||
2. Always add/update tests for any changes unless you have a good reason.
|
||||
3. Always update the documentation to reflect the changes made in the PR.
|
||||
4. Make a new commit to resolve conversations instead of `push -f`.
|
||||
5. To resolve merge conflicts, merge master instead of rebasing.
|
||||
6. Use "request review" to notify the reviewer after making changes.
|
||||
7. Only a reviewer can mark a conversation as resolved.
|
||||
|
||||
-->
|
10
CloudronPackages/APISIX/apisix-source/.github/dependabot.yml
vendored
Normal file
10
CloudronPackages/APISIX/apisix-source/.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
# Set update schedule for GitHub Actions
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
# Check for updates to GitHub Actions every weekday
|
||||
interval: "daily"
|
177
CloudronPackages/APISIX/apisix-source/.github/workflows/build.yml
vendored
Normal file
177
CloudronPackages/APISIX/apisix-source/.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,177 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master, 'release/**']
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
- '**/*.md'
|
||||
pull_request:
|
||||
branches: [master, 'release/**']
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
- '**/*.md'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.run_number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform:
|
||||
- ubuntu-latest
|
||||
os_name:
|
||||
- linux_openresty
|
||||
events_module:
|
||||
- lua-resty-worker-events
|
||||
- lua-resty-events
|
||||
test_dir:
|
||||
- t/plugin/[a-k]*
|
||||
- t/plugin/[l-z]*
|
||||
- t/admin t/cli t/config-center-yaml t/control t/core t/debug t/discovery t/error_page t/http3/admin t/misc
|
||||
- t/node t/pubsub t/router t/script t/secret t/stream-node t/utils t/wasm t/xds-library t/xrpc
|
||||
|
||||
runs-on: ${{ matrix.platform }}
|
||||
timeout-minutes: 90
|
||||
env:
|
||||
SERVER_NAME: ${{ matrix.os_name }}
|
||||
OPENRESTY_VERSION: default
|
||||
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.17"
|
||||
|
||||
- name: Cache deps
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: cache-deps
|
||||
with:
|
||||
path: deps
|
||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ matrix.os_name }}-${{ hashFiles('apisix-master-0.rockspec') }}
|
||||
|
||||
- name: Extract test type
|
||||
shell: bash
|
||||
id: test_env
|
||||
run: |
|
||||
test_dir="${{ matrix.test_dir }}"
|
||||
if [[ $test_dir =~ 't/plugin' ]]; then
|
||||
echo "type=plugin" >>$GITHUB_OUTPUT
|
||||
fi
|
||||
if [[ $test_dir =~ 't/admin ' ]]; then
|
||||
echo "type=first" >>$GITHUB_OUTPUT
|
||||
fi
|
||||
if [[ $test_dir =~ ' t/xrpc' ]]; then
|
||||
echo "type=last" >>$GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Free disk space
|
||||
run: |
|
||||
bash ./ci/free_disk_space.sh
|
||||
|
||||
- name: Linux Before install
|
||||
run: sudo ./ci/${{ matrix.os_name }}_runner.sh before_install
|
||||
|
||||
- name: Linux Install
|
||||
run: |
|
||||
sudo --preserve-env=OPENRESTY_VERSION \
|
||||
./ci/${{ matrix.os_name }}_runner.sh do_install
|
||||
|
||||
- name: Linux launch common services
|
||||
run: |
|
||||
make ci-env-up project_compose_ci=ci/pod/docker-compose.common.yml
|
||||
sudo ./ci/init-common-test-service.sh
|
||||
|
||||
- name: Cache images
|
||||
id: cache-images
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: cache-apisix-docker-images
|
||||
with:
|
||||
path: docker-images-backup
|
||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ steps.test_env.outputs.type }}-${{ hashFiles(format('./ci/pod/docker-compose.{0}.yml', steps.test_env.outputs.type )) }}
|
||||
|
||||
- if: ${{ steps.cache-images.outputs.cache-hit == 'true' }}
|
||||
name: Load saved docker images
|
||||
run: |
|
||||
if [[ -f docker-images-backup/apisix-images.tar ]]; then
|
||||
[[ ${{ steps.test_env.outputs.type }} != first ]] && sudo ./ci/init-${{ steps.test_env.outputs.type }}-test-service.sh before
|
||||
docker load --input docker-images-backup/apisix-images.tar
|
||||
echo "loaded docker images"
|
||||
|
||||
# preserve storage space
|
||||
rm docker-images-backup/apisix-images.tar
|
||||
|
||||
make ci-env-up project_compose_ci=ci/pod/docker-compose.${{ steps.test_env.outputs.type }}.yml
|
||||
if [[ ${{ steps.test_env.outputs.type }} != first ]]; then
|
||||
sudo ./ci/init-${{ steps.test_env.outputs.type }}-test-service.sh after
|
||||
fi
|
||||
fi
|
||||
- if: ${{ steps.cache-images.outputs.cache-hit != 'true' }}
|
||||
name: Linux launch services
|
||||
run: |
|
||||
[[ ${{ steps.test_env.outputs.type }} != first ]] && sudo ./ci/init-${{ steps.test_env.outputs.type }}-test-service.sh before
|
||||
[[ ${{ steps.test_env.outputs.type }} == plugin ]] && ./ci/pod/openfunction/build-function-image.sh
|
||||
make ci-env-up project_compose_ci=ci/pod/docker-compose.${{ steps.test_env.outputs.type }}.yml
|
||||
[[ ${{ steps.test_env.outputs.type }} != first ]] && sudo ./ci/init-${{ steps.test_env.outputs.type }}-test-service.sh after
|
||||
echo "Linux launch services, done."
|
||||
- name: Start Dubbo Backend
|
||||
if: matrix.os_name == 'linux_openresty' && (steps.test_env.outputs.type == 'plugin' || steps.test_env.outputs.type == 'last')
|
||||
run: |
|
||||
cur_dir=$(pwd)
|
||||
sudo apt update
|
||||
sudo apt install -y maven openjdk-8-jdk
|
||||
sudo update-java-alternatives --set java-1.8.0-openjdk-amd64
|
||||
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
|
||||
export PATH=$JAVA_HOME/bin:$PATH
|
||||
cd t/lib/dubbo-backend
|
||||
mvn package
|
||||
cd dubbo-backend-provider/target
|
||||
java \
|
||||
-Djava.net.preferIPv4Stack=true \
|
||||
-jar dubbo-demo-provider.one-jar.jar > /tmp/java.log &
|
||||
cd $cur_dir/t/lib/dubbo-serialization-backend
|
||||
mvn package
|
||||
cd dubbo-serialization-backend-provider/target
|
||||
java \
|
||||
-Djava.net.preferIPv4Stack=true \
|
||||
-jar dubbo-demo-provider.one-jar.jar > /tmp/java2.log &
|
||||
|
||||
- name: Build xDS library
|
||||
if: steps.test_env.outputs.type == 'last'
|
||||
run: |
|
||||
cd t/xds-library
|
||||
go build -o libxds.so -buildmode=c-shared main.go export.go
|
||||
|
||||
- name: Build wasm code
|
||||
if: matrix.os_name == 'linux_openresty' && steps.test_env.outputs.type == 'last'
|
||||
run: |
|
||||
export TINYGO_VER=0.20.0
|
||||
wget https://github.com/tinygo-org/tinygo/releases/download/v${TINYGO_VER}/tinygo_${TINYGO_VER}_amd64.deb 2>/dev/null
|
||||
sudo dpkg -i tinygo_${TINYGO_VER}_amd64.deb
|
||||
cd t/wasm && find . -type f -name "*.go" | xargs -Ip tinygo build -o p.wasm -scheduler=none -target=wasi p
|
||||
|
||||
- name: Linux Script
|
||||
env:
|
||||
TEST_FILE_SUB_DIR: ${{ matrix.test_dir }}
|
||||
TEST_EVENTS_MODULE: ${{ matrix.events_module }}
|
||||
run: sudo -E ./ci/${{ matrix.os_name }}_runner.sh script
|
||||
|
||||
- if: ${{ steps.cache-images.outputs.cache-hit != 'true' }}
|
||||
name: Save docker images
|
||||
run: |
|
||||
echo "start backing up, $(date)"
|
||||
bash ./ci/backup-docker-images.sh ${{ steps.test_env.outputs.type }}
|
||||
echo "backup done, $(date)"
|
27
CloudronPackages/APISIX/apisix-source/.github/workflows/check-changelog.yml
vendored
Normal file
27
CloudronPackages/APISIX/apisix-source/.github/workflows/check-changelog.yml
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
name: Check Changelog
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'CHANGELOG.md'
|
||||
- 'ci/check_changelog_prs.ts'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'CHANGELOG.md'
|
||||
- 'ci/check_changelog_prs.ts'
|
||||
|
||||
jobs:
|
||||
check-changelog:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
|
||||
- name: Run check_changelog_prs script
|
||||
working-directory: ci
|
||||
run: |
|
||||
curl -fsSL https://bun.sh/install | bash
|
||||
export PATH="$HOME/.bun/bin:$PATH"
|
||||
bun run check_changelog_prs.ts
|
68
CloudronPackages/APISIX/apisix-source/.github/workflows/cli.yml
vendored
Normal file
68
CloudronPackages/APISIX/apisix-source/.github/workflows/cli.yml
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
name: CLI Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master, 'release/**']
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
- '**/*.md'
|
||||
pull_request:
|
||||
branches: [master, 'release/**']
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
- '**/*.md'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.run_number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform:
|
||||
- ubuntu-latest
|
||||
job_name:
|
||||
- linux_apisix_current_luarocks
|
||||
- linux_apisix_current_luarocks_in_customed_nginx
|
||||
|
||||
runs-on: ${{ matrix.platform }}
|
||||
timeout-minutes: 30
|
||||
env:
|
||||
SERVER_NAME: ${{ matrix.job_name }}
|
||||
OPENRESTY_VERSION: default
|
||||
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Cache deps
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: cache-deps
|
||||
with:
|
||||
path: deps
|
||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ matrix.job_name }}-${{ hashFiles('apisix-master-0.rockspec') }}
|
||||
|
||||
- name: Linux launch common services
|
||||
run: |
|
||||
project_compose_ci=ci/pod/docker-compose.common.yml make ci-env-up
|
||||
|
||||
- name: Linux Before install
|
||||
run: sudo ./ci/${{ matrix.job_name }}_runner.sh before_install
|
||||
|
||||
- name: Linux Install
|
||||
run: |
|
||||
sudo --preserve-env=OPENRESTY_VERSION \
|
||||
./ci/${{ matrix.job_name }}_runner.sh do_install
|
||||
|
||||
- name: Linux Script
|
||||
run: |
|
||||
sudo chmod +x /home/runner
|
||||
sudo ./ci/${{ matrix.job_name }}_runner.sh script
|
39
CloudronPackages/APISIX/apisix-source/.github/workflows/close-unresponded.yml
vendored
Normal file
39
CloudronPackages/APISIX/apisix-source/.github/workflows/close-unresponded.yml
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
name: Check Issues
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 10 * * *'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
prune_stale:
|
||||
permissions:
|
||||
issues: write # for actions/stale to close stale issues
|
||||
name: Prune Unresponded
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
|
||||
steps:
|
||||
- name: Prune Stale
|
||||
uses: actions/stale@v8
|
||||
with:
|
||||
days-before-issue-stale: 60
|
||||
days-before-issue-close: 3
|
||||
stale-issue-message: >
|
||||
Due to lack of the reporter's response this issue has been labeled with "no response".
|
||||
It will be close in 3 days if no further activity occurs. If this issue is still
|
||||
relevant, please simply write any comment. Even if closed, you can still revive the
|
||||
issue at any time or discuss it on the dev@apisix.apache.org list.
|
||||
Thank you for your contributions.
|
||||
close-issue-message: >
|
||||
This issue has been closed due to lack of activity. If you think that
|
||||
is incorrect, or the issue requires additional review, you can revive the issue at
|
||||
any time.
|
||||
# Issues with these labels will never be considered stale.
|
||||
only-labels: 'wait for update'
|
||||
stale-issue-label: 'no response'
|
||||
exempt-issue-labels: "don't close"
|
||||
ascending: true
|
48
CloudronPackages/APISIX/apisix-source/.github/workflows/code-lint.yml
vendored
Normal file
48
CloudronPackages/APISIX/apisix-source/.github/workflows/code-lint.yml
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
name: Code Lint
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [master, 'release/**']
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
- '**/*.md'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install
|
||||
run: |
|
||||
. ./ci/common.sh
|
||||
export_or_prefix
|
||||
export OPENRESTY_VERSION=default
|
||||
|
||||
sudo -E ./ci/linux-install-openresty.sh
|
||||
./utils/linux-install-luarocks.sh
|
||||
sudo -E luarocks install luacheck
|
||||
|
||||
- name: Script
|
||||
run: |
|
||||
. ./ci/common.sh
|
||||
export_or_prefix
|
||||
make lint
|
||||
|
||||
sc-lint:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Shellcheck code
|
||||
run: |
|
||||
scversion="latest"
|
||||
wget -qO- "https://github.com/koalaman/shellcheck/releases/download/${scversion?}/shellcheck-${scversion?}.linux.x86_64.tar.xz" | tar -xJv
|
||||
cp -av "shellcheck-${scversion}/shellcheck" /usr/local/bin/
|
||||
shellcheck --version
|
||||
git ls-files -- "*.sh" | xargs -t shellcheck
|
58
CloudronPackages/APISIX/apisix-source/.github/workflows/doc-lint.yml
vendored
Normal file
58
CloudronPackages/APISIX/apisix-source/.github/workflows/doc-lint.yml
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
name: Doc Lint
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- "docs/**"
|
||||
- "**/*.md"
|
||||
- ".github/workflows/doc-lint.yml"
|
||||
pull_request:
|
||||
branches: [master, "release/**"]
|
||||
paths:
|
||||
- "docs/**"
|
||||
- "**/*.md"
|
||||
- ".github/workflows/doc-lint.yml"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
markdownlint:
|
||||
name: 🍇 Markdown
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 1
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: 🚀 Use Node.js
|
||||
uses: actions/setup-node@v4.4.0
|
||||
with:
|
||||
node-version: "12.x"
|
||||
- run: npm install -g markdownlint-cli@0.25.0
|
||||
- run: markdownlint '**/*.md'
|
||||
- name: check category
|
||||
run: |
|
||||
./utils/check-category.py
|
||||
- name: check Chinese doc
|
||||
run: |
|
||||
sudo pip3 install zhon
|
||||
./utils/fix-zh-doc-segment.py > \
|
||||
/tmp/check.log 2>&1 || (cat /tmp/check.log && exit 1)
|
||||
if grep "find broken newline in file: " /tmp/check.log; then
|
||||
cat /tmp/check.log
|
||||
echo "Newline can't appear in the middle of Chinese sentences."
|
||||
echo "You need to run ./utils/fix-zh-doc-segment.py to fix them."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
Chinse-Copywriting-lint:
|
||||
name: Chinese Copywriting
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 1
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Check Chinese copywriting
|
||||
uses: ./.github/actions/autocorrect
|
||||
with:
|
||||
args: autocorrect --lint --no-diff-bg-color ./docs/zh/latest/
|
182
CloudronPackages/APISIX/apisix-source/.github/workflows/gm-cron.yaml.disabled
vendored
Normal file
182
CloudronPackages/APISIX/apisix-source/.github/workflows/gm-cron.yaml.disabled
vendored
Normal file
@@ -0,0 +1,182 @@
|
||||
name: CI GM (cron)
|
||||
|
||||
on:
|
||||
schedule:
|
||||
# UTC 7:30 every Friday
|
||||
- cron: "30 7 * * 5"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform:
|
||||
- ubuntu-latest
|
||||
os_name:
|
||||
- linux_openresty_tongsuo
|
||||
test_dir:
|
||||
- t/plugin/[a-k]*
|
||||
- t/plugin/[l-z]*
|
||||
- t/admin t/cli t/config-center-yaml t/control t/core t/debug t/discovery t/error_page t/misc
|
||||
- t/node t/pubsub t/router t/script t/stream-node t/utils t/wasm t/xds-library t/xrpc
|
||||
|
||||
runs-on: ${{ matrix.platform }}
|
||||
timeout-minutes: 90
|
||||
env:
|
||||
SERVER_NAME: ${{ matrix.os_name }}
|
||||
OPENRESTY_VERSION: default
|
||||
|
||||
# TODO: refactor the workflows to reduce duplicate parts. Maybe we can write them in shell
|
||||
# scripts or a separate action?
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.17"
|
||||
|
||||
- name: Cache deps
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: cache-deps
|
||||
with:
|
||||
path: deps
|
||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ matrix.os_name }}-${{ hashFiles('apisix-master-0.rockspec') }}
|
||||
|
||||
- name: Cache Tongsuo compilation
|
||||
id: cache-tongsuo
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: cache-tongsuo
|
||||
with:
|
||||
path: ./tongsuo
|
||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ matrix.os_name }}-tongsuo-ver
|
||||
|
||||
- name: Test SSL Env
|
||||
id: test_ssl_env
|
||||
shell: bash
|
||||
if: steps.cache-tongsuo.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
echo "compile_tongsuo=true" >>$GITHUB_OUTPUT
|
||||
|
||||
- name: Extract test type
|
||||
shell: bash
|
||||
id: test_env
|
||||
run: |
|
||||
test_dir="${{ matrix.test_dir }}"
|
||||
if [[ $test_dir =~ 't/plugin' ]]; then
|
||||
echo "type=plugin" >>$GITHUB_OUTPUT
|
||||
fi
|
||||
if [[ $test_dir =~ 't/admin ' ]]; then
|
||||
echo "type=first" >>$GITHUB_OUTPUT
|
||||
fi
|
||||
if [[ $test_dir =~ ' t/xrpc' ]]; then
|
||||
echo "type=last" >>$GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Free disk space
|
||||
run: |
|
||||
bash ./ci/free_disk_space.sh
|
||||
|
||||
- name: Linux launch common services
|
||||
run: |
|
||||
make ci-env-up project_compose_ci=ci/pod/docker-compose.common.yml
|
||||
sudo ./ci/init-common-test-service.sh
|
||||
|
||||
- name: Cache images
|
||||
id: cache-images
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: cache-apisix-docker-images
|
||||
with:
|
||||
path: docker-images-backup
|
||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ steps.test_env.outputs.type }}-${{ hashFiles(format('./ci/pod/docker-compose.{0}.yml', steps.test_env.outputs.type )) }}
|
||||
|
||||
- if: ${{ steps.cache-images.outputs.cache-hit == 'true' }}
|
||||
name: Load saved docker images
|
||||
run: |
|
||||
if [[ -f docker-images-backup/apisix-images.tar ]]; then
|
||||
[[ ${{ steps.test_env.outputs.type }} != first ]] && sudo ./ci/init-${{ steps.test_env.outputs.type }}-test-service.sh before
|
||||
docker load --input docker-images-backup/apisix-images.tar
|
||||
rm docker-images-backup/apisix-images.tar
|
||||
make ci-env-up project_compose_ci=ci/pod/docker-compose.${{ steps.test_env.outputs.type }}.yml
|
||||
echo "loaded docker images"
|
||||
if [[ ${{ steps.test_env.outputs.type }} != first ]]; then
|
||||
sudo ./ci/init-${{ steps.test_env.outputs.type }}-test-service.sh after
|
||||
fi
|
||||
fi
|
||||
- if: ${{ steps.cache-images.outputs.cache-hit != 'true' }}
|
||||
name: Linux launch services
|
||||
run: |
|
||||
[[ ${{ steps.test_env.outputs.type }} != first ]] && sudo ./ci/init-${{ steps.test_env.outputs.type }}-test-service.sh before
|
||||
[[ ${{ steps.test_env.outputs.type }} == plugin ]] && ./ci/pod/openfunction/build-function-image.sh
|
||||
make ci-env-up project_compose_ci=ci/pod/docker-compose.${{ steps.test_env.outputs.type }}.yml
|
||||
[[ ${{ steps.test_env.outputs.type }} != first ]] && sudo ./ci/init-${{ steps.test_env.outputs.type }}-test-service.sh after
|
||||
echo "Linux launch services, done."
|
||||
|
||||
- name: Start Dubbo Backend
|
||||
if: steps.test_env.outputs.type == 'plugin'
|
||||
run: |
|
||||
cur_dir=$(pwd)
|
||||
sudo apt update
|
||||
sudo apt install -y maven openjdk-8-jdk
|
||||
sudo update-java-alternatives --set java-1.8.0-openjdk-amd64
|
||||
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
|
||||
export PATH=$JAVA_HOME/bin:$PATH
|
||||
cd t/lib/dubbo-backend
|
||||
mvn package
|
||||
cd dubbo-backend-provider/target
|
||||
java \
|
||||
-Djava.net.preferIPv4Stack=true \
|
||||
-jar dubbo-demo-provider.one-jar.jar > /tmp/java.log &
|
||||
cd $cur_dir/t/lib/dubbo-serialization-backend
|
||||
mvn package
|
||||
cd dubbo-serialization-backend-provider/target
|
||||
java \
|
||||
-Djava.net.preferIPv4Stack=true \
|
||||
-jar dubbo-demo-provider.one-jar.jar > /tmp/java2.log &
|
||||
|
||||
- name: Build xDS library
|
||||
if: steps.test_env.outputs.type == 'last'
|
||||
run: |
|
||||
cd t/xds-library
|
||||
go build -o libxds.so -buildmode=c-shared main.go export.go
|
||||
|
||||
- name: Build wasm code
|
||||
if: steps.test_env.outputs.type == 'last'
|
||||
run: |
|
||||
export TINYGO_VER=0.20.0
|
||||
wget https://github.com/tinygo-org/tinygo/releases/download/v${TINYGO_VER}/tinygo_${TINYGO_VER}_amd64.deb 2>/dev/null
|
||||
sudo dpkg -i tinygo_${TINYGO_VER}_amd64.deb
|
||||
cd t/wasm && find . -type f -name "*.go" | xargs -Ip tinygo build -o p.wasm -scheduler=none -target=wasi p
|
||||
|
||||
- name: Linux Before install
|
||||
env:
|
||||
COMPILE_TONGSUO: ${{ steps.test_ssl_env.outputs.compile_tongsuo }}
|
||||
run: |
|
||||
sudo --preserve-env=COMPILE_TONGSUO \
|
||||
./ci/${{ matrix.os_name }}_runner.sh before_install
|
||||
|
||||
- name: Linux Install
|
||||
run: |
|
||||
sudo --preserve-env=OPENRESTY_VERSION \
|
||||
./ci/${{ matrix.os_name }}_runner.sh do_install
|
||||
|
||||
- name: Linux Script
|
||||
env:
|
||||
TEST_FILE_SUB_DIR: ${{ matrix.test_dir }}
|
||||
run: sudo -E ./ci/${{ matrix.os_name }}_runner.sh script
|
||||
|
||||
- if: ${{ steps.cache-images.outputs.cache-hit != 'true' }}
|
||||
name: Save docker images
|
||||
run: |
|
||||
echo "start backing up, $(date)"
|
||||
bash ./ci/backup-docker-images.sh ${{ steps.test_env.outputs.type }}
|
||||
echo "backup done, $(date)"
|
93
CloudronPackages/APISIX/apisix-source/.github/workflows/gm.yml.disabled
vendored
Normal file
93
CloudronPackages/APISIX/apisix-source/.github/workflows/gm.yml.disabled
vendored
Normal file
@@ -0,0 +1,93 @@
|
||||
name: CI GM
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
- '**/*.md'
|
||||
pull_request:
|
||||
branches: [master]
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
- '**/*.md'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.run_number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform:
|
||||
- ubuntu-latest
|
||||
os_name:
|
||||
- linux_openresty_tongsuo
|
||||
test_dir:
|
||||
- t/gm
|
||||
|
||||
runs-on: ${{ matrix.platform }}
|
||||
timeout-minutes: 90
|
||||
env:
|
||||
SERVER_NAME: ${{ matrix.os_name }}
|
||||
OPENRESTY_VERSION: default
|
||||
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Cache deps
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: cache-deps
|
||||
with:
|
||||
path: deps
|
||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ matrix.os_name }}-${{ hashFiles('apisix-master-0.rockspec') }}
|
||||
|
||||
- name: Cache Tongsuo compilation
|
||||
id: cache-tongsuo
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: cache-tongsuo
|
||||
with:
|
||||
path: ./tongsuo
|
||||
# TODO: use a fixed release once they have created one.
|
||||
# See https://github.com/Tongsuo-Project/Tongsuo/issues/318
|
||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ matrix.os_name }}-tongsuo-ver
|
||||
|
||||
- name: Test SSL Env
|
||||
id: test_ssl_env
|
||||
shell: bash
|
||||
if: steps.cache-tongsuo.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
echo "compile_tongsuo=true" >>$GITHUB_OUTPUT
|
||||
|
||||
- name: Linux launch common services
|
||||
run: |
|
||||
make ci-env-up project_compose_ci=ci/pod/docker-compose.common.yml
|
||||
sudo ./ci/init-common-test-service.sh
|
||||
|
||||
- name: Linux Before install
|
||||
env:
|
||||
COMPILE_TONGSUO: ${{ steps.test_ssl_env.outputs.compile_tongsuo }}
|
||||
run: |
|
||||
sudo --preserve-env=COMPILE_TONGSUO \
|
||||
./ci/${{ matrix.os_name }}_runner.sh before_install
|
||||
|
||||
- name: Linux Do install
|
||||
run: |
|
||||
sudo --preserve-env=OPENRESTY_VERSION \
|
||||
./ci/${{ matrix.os_name }}_runner.sh do_install
|
||||
|
||||
- name: Linux Script
|
||||
env:
|
||||
TEST_FILE_SUB_DIR: ${{ matrix.test_dir }}
|
||||
run: |
|
||||
sudo -E ./ci/${{ matrix.os_name }}_runner.sh script
|
79
CloudronPackages/APISIX/apisix-source/.github/workflows/kubernetes-ci.yml
vendored
Normal file
79
CloudronPackages/APISIX/apisix-source/.github/workflows/kubernetes-ci.yml
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
name: CI Kubernetes
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master, 'release/**' ]
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
- '**/*.md'
|
||||
pull_request:
|
||||
branches: [ master, 'release/**' ]
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
- '**/*.md'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.run_number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
kubernetes-discovery:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform:
|
||||
- ubuntu-latest
|
||||
os_name:
|
||||
- linux_openresty
|
||||
|
||||
runs-on: ${{ matrix.platform }}
|
||||
timeout-minutes: 15
|
||||
env:
|
||||
SERVER_NAME: ${{ matrix.os_name }}
|
||||
OPENRESTY_VERSION: default
|
||||
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Setup kubernetes cluster
|
||||
run: |
|
||||
KUBERNETES_VERSION="v1.22.7"
|
||||
|
||||
kind create cluster --name apisix-test --config ./t/kubernetes/configs/kind.yaml --image kindest/node:${KUBERNETES_VERSION}
|
||||
|
||||
kubectl wait --for=condition=Ready nodes --all --timeout=180s
|
||||
|
||||
kubectl apply -f ./t/kubernetes/configs/account.yaml
|
||||
|
||||
kubectl apply -f ./t/kubernetes/configs/endpoint.yaml
|
||||
|
||||
KUBERNETES_CLIENT_TOKEN_CONTENT=$(kubectl get secrets | grep apisix-test | awk '{system("kubectl get secret -o jsonpath={.data.token} "$1" | base64 --decode")}')
|
||||
|
||||
KUBERNETES_CLIENT_TOKEN_DIR="/tmp/var/run/secrets/kubernetes.io/serviceaccount"
|
||||
|
||||
KUBERNETES_CLIENT_TOKEN_FILE=${KUBERNETES_CLIENT_TOKEN_DIR}/token
|
||||
|
||||
mkdir -p ${KUBERNETES_CLIENT_TOKEN_DIR}
|
||||
echo -n "$KUBERNETES_CLIENT_TOKEN_CONTENT" > ${KUBERNETES_CLIENT_TOKEN_FILE}
|
||||
|
||||
echo 'KUBERNETES_SERVICE_HOST=127.0.0.1'
|
||||
echo 'KUBERNETES_SERVICE_PORT=6443'
|
||||
echo 'KUBERNETES_CLIENT_TOKEN='"${KUBERNETES_CLIENT_TOKEN_CONTENT}"
|
||||
echo 'KUBERNETES_CLIENT_TOKEN_FILE='${KUBERNETES_CLIENT_TOKEN_FILE}
|
||||
|
||||
kubectl proxy -p 6445 &
|
||||
|
||||
- name: Linux Install
|
||||
run: |
|
||||
sudo ./ci/${{ matrix.os_name }}_runner.sh before_install
|
||||
sudo --preserve-env=OPENRESTY_VERSION ./ci/${{ matrix.os_name }}_runner.sh do_install
|
||||
|
||||
- name: Run test cases
|
||||
run: |
|
||||
./ci/kubernetes-ci.sh run_case
|
37
CloudronPackages/APISIX/apisix-source/.github/workflows/license-checker.yml
vendored
Normal file
37
CloudronPackages/APISIX/apisix-source/.github/workflows/license-checker.yml
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
name: License checker
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master, 'release/**']
|
||||
pull_request:
|
||||
branches: [master, 'release/**']
|
||||
|
||||
jobs:
|
||||
check-license:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 3
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Check License Header
|
||||
uses: apache/skywalking-eyes@v0.6.0
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
49
CloudronPackages/APISIX/apisix-source/.github/workflows/link-check.yml
vendored
Normal file
49
CloudronPackages/APISIX/apisix-source/.github/workflows/link-check.yml
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
name: 'Link Checker'
|
||||
|
||||
# **What it does**: Renders the content of every page and check all internal links.
|
||||
# **Why we have it**: To make sure all links connect correctly.
|
||||
# **Who does it impact**: Docs content.
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
# branches: [master, 'release/**']
|
||||
paths:
|
||||
- '**/*.md'
|
||||
- '**/link-check.yml'
|
||||
pull_request:
|
||||
branches: [master, "release/**"]
|
||||
paths:
|
||||
- '**/*.md'
|
||||
- '**/link-check.yml'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
# Needed for the 'trilom/file-changes-action' action
|
||||
pull-requests: read
|
||||
|
||||
# This allows a subsequently queued workflow run to interrupt previous runs
|
||||
concurrency:
|
||||
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
check-links:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Get script
|
||||
run: |
|
||||
wget https://raw.githubusercontent.com/xuruidong/markdown-link-checker/main/link_checker.py
|
||||
|
||||
- name: Setup python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.9'
|
||||
|
||||
- name: Link check (critical, all files)
|
||||
run: |
|
||||
# python link_checker.py ./ --enable-external --ignore "http://apisix.iresty.com" "https://www.upyun.com" "https://github.com/apache/apisix/actions/workflows/build.yml/badge.svg" "https://httpbin.org/" "https://en.wikipedia.org/wiki/Cache"
|
||||
python link_checker.py ./
|
46
CloudronPackages/APISIX/apisix-source/.github/workflows/lint.yml
vendored
Normal file
46
CloudronPackages/APISIX/apisix-source/.github/workflows/lint.yml
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
name: ❄️ Lint
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
misc:
|
||||
name: misc checker
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out code.
|
||||
uses: actions/checkout@v4
|
||||
- name: spell check
|
||||
run: |
|
||||
pip install codespell==2.1.0
|
||||
# codespell considers some repo name in go.sum are misspelled
|
||||
git grep --cached -l '' | grep -v go.sum | grep -v pnpm-lock.yaml |xargs codespell --ignore-words=.ignore_words --skip="*.ts,*.mts"
|
||||
- name: Merge conflict
|
||||
run: |
|
||||
bash ./utils/check-merge-conflict.sh
|
||||
- name: Plugin Code
|
||||
run: |
|
||||
bash ./utils/check-plugins-code.sh
|
||||
|
||||
ci-eclint:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Nodejs env
|
||||
uses: actions/setup-node@v4.4.0
|
||||
with:
|
||||
node-version: '12'
|
||||
|
||||
- name: Install eclint
|
||||
run: |
|
||||
sudo npm install -g eclint
|
||||
|
||||
- name: Run eclint
|
||||
run: |
|
||||
eclint check
|
109
CloudronPackages/APISIX/apisix-source/.github/workflows/push-dev-image-on-commit.yml
vendored
Normal file
109
CloudronPackages/APISIX/apisix-source/.github/workflows/push-dev-image-on-commit.yml
vendored
Normal file
@@ -0,0 +1,109 @@
|
||||
name: Build and Push `apisix:dev` to DockerHub on Commit
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- "docs/**"
|
||||
- "**/*.md"
|
||||
push:
|
||||
paths-ignore:
|
||||
- "docs/**"
|
||||
- "**/*.md"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build-test-push:
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- runner: ubuntu-24.04
|
||||
arch: amd64
|
||||
- runner: ubuntu-24.04-arm
|
||||
arch: arm64
|
||||
|
||||
runs-on: ${{ matrix.runner }}
|
||||
|
||||
env:
|
||||
APISIX_DOCKER_TAG: master-debian-dev
|
||||
ENV_OS_ARCH: ${{ matrix.arch }}
|
||||
DOCKER_BUILDKIT: 1
|
||||
|
||||
steps:
|
||||
- name: Check out the repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Build APISIX Dashboard
|
||||
run: |
|
||||
# install node.js and pnpm
|
||||
sudo n lts
|
||||
corepack enable pnpm
|
||||
|
||||
# prepare apisix-dashboard source code
|
||||
source .requirements
|
||||
git clone --revision=${APISIX_DASHBOARD_COMMIT} --depth 1 https://github.com/apache/apisix-dashboard.git
|
||||
pushd apisix-dashboard
|
||||
|
||||
# compile
|
||||
pnpm install --frozen-lockfile
|
||||
pnpm run build
|
||||
popd
|
||||
|
||||
# copy the dist files to the ui directory
|
||||
mkdir ui
|
||||
cp -r apisix-dashboard/dist/* ui/
|
||||
rm -r apisix-dashboard
|
||||
|
||||
- name: Build and run
|
||||
run: |
|
||||
make build-on-debian-dev
|
||||
docker compose -f ./docker/compose/docker-compose-master.yaml up -d
|
||||
sleep 30
|
||||
docker logs compose-apisix-1
|
||||
|
||||
- name: Test APISIX
|
||||
run: |
|
||||
curl http://127.0.0.1:9180/apisix/admin/routes/1 \
|
||||
-H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
|
||||
{
|
||||
"uri": "/get",
|
||||
"upstream": {
|
||||
"type": "roundrobin",
|
||||
"nodes": { "httpbin.org:80": 1 }
|
||||
}
|
||||
}'
|
||||
|
||||
result_code=$(curl -I -m 10 -o /dev/null -s -w %{http_code} http://127.0.0.1:9080/get)
|
||||
if [[ $result_code -ne 200 ]]; then
|
||||
printf "result_code: %s\n" "$result_code"
|
||||
exit 125
|
||||
fi
|
||||
|
||||
- name: Login to Docker Hub
|
||||
if: github.ref == 'refs/heads/master'
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USER }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Push apisix image to Docker Hub
|
||||
if: github.ref == 'refs/heads/master'
|
||||
run: |
|
||||
make push-on-debian-dev
|
||||
|
||||
merge-tags:
|
||||
needs: build-test-push
|
||||
if: github.ref == 'refs/heads/master'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USER }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Check out the repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Merge architecture-specific tags
|
||||
run: |
|
||||
make merge-dev-tags
|
179
CloudronPackages/APISIX/apisix-source/.github/workflows/redhat-ci.yaml
vendored
Normal file
179
CloudronPackages/APISIX/apisix-source/.github/workflows/redhat-ci.yaml
vendored
Normal file
@@ -0,0 +1,179 @@
|
||||
name: CI Redhat UBI - Daily
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 0 * * *"
|
||||
pull_request:
|
||||
branches: [master]
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
- '**/*.md'
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.run_number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
test_apisix:
|
||||
name: run ci on redhat ubi
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 90
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
events_module:
|
||||
- lua-resty-worker-events
|
||||
- lua-resty-events
|
||||
test_dir:
|
||||
- t/plugin/[a-k]*
|
||||
- t/plugin/[l-z]*
|
||||
- t/admin t/cli t/config-center-yaml t/control t/core t/debug t/discovery t/error_page t/misc
|
||||
- t/node t/pubsub t/router t/script t/secret t/stream-node t/utils t/xds-library
|
||||
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Cache deps
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: cache-deps
|
||||
with:
|
||||
path: deps
|
||||
key: ${{ runner.os }}-${{ env.cache-name }}-ubi8.6-${{ hashFiles('apisix-master-0.rockspec') }}
|
||||
|
||||
- name: Extract branch name
|
||||
if: ${{ startsWith(github.ref, 'refs/heads/release/') }}
|
||||
id: branch_env
|
||||
shell: bash
|
||||
run: |
|
||||
echo "version=${GITHUB_REF##*/}" >>$GITHUB_OUTPUT
|
||||
|
||||
- name: Extract test type
|
||||
shell: bash
|
||||
id: test_env
|
||||
run: |
|
||||
test_dir="${{ matrix.test_dir }}"
|
||||
if [[ $test_dir =~ 't/plugin' ]]; then
|
||||
echo "type=plugin" >>$GITHUB_OUTPUT
|
||||
fi
|
||||
if [[ $test_dir =~ 't/admin ' ]]; then
|
||||
echo "type=first" >>$GITHUB_OUTPUT
|
||||
fi
|
||||
if [[ $test_dir =~ ' t/xds-library' ]]; then
|
||||
echo "type=last" >>$GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Free disk space
|
||||
run: |
|
||||
bash ./ci/free_disk_space.sh
|
||||
|
||||
- name: Linux launch common services
|
||||
run: |
|
||||
make ci-env-up project_compose_ci=ci/pod/docker-compose.common.yml
|
||||
sudo ./ci/init-common-test-service.sh
|
||||
|
||||
- name: Build rpm package
|
||||
if: ${{ startsWith(github.ref, 'refs/heads/release/') }}
|
||||
run: |
|
||||
export VERSION=${{ steps.branch_env.outputs.version }}
|
||||
sudo gem install --no-document fpm
|
||||
git clone --depth 1 https://github.com/api7/apisix-build-tools.git
|
||||
|
||||
# move codes under build tool
|
||||
mkdir ./apisix-build-tools/apisix
|
||||
for dir in `ls|grep -v "^apisix-build-tools$"`;do cp -r $dir ./apisix-build-tools/apisix/;done
|
||||
|
||||
cd apisix-build-tools
|
||||
make package type=rpm app=apisix version=${VERSION} checkout=release/${VERSION} image_base=ubi image_tag=8.6 local_code_path=./apisix
|
||||
cd ..
|
||||
rm -rf $(ls -1 -I apisix-build-tools -I t -I utils -I ci --ignore=Makefile -I "*.rockspec")
|
||||
|
||||
- name: Start Dubbo Backend
|
||||
run: |
|
||||
cur_dir=$(pwd)
|
||||
sudo apt update
|
||||
sudo apt install -y maven
|
||||
cd t/lib/dubbo-backend
|
||||
mvn package
|
||||
cd dubbo-backend-provider/target
|
||||
java \
|
||||
-Djava.net.preferIPv4Stack=true \
|
||||
-jar dubbo-demo-provider.one-jar.jar > /tmp/java.log &
|
||||
cd $cur_dir/t/lib/dubbo-serialization-backend
|
||||
mvn package
|
||||
cd dubbo-serialization-backend-provider/target
|
||||
java \
|
||||
-Djava.net.preferIPv4Stack=true \
|
||||
-jar dubbo-demo-provider.one-jar.jar > /tmp/java2.log &
|
||||
|
||||
- name: Build xDS library
|
||||
if: steps.test_env.outputs.type == 'last'
|
||||
run: |
|
||||
cd t/xds-library
|
||||
go build -o libxds.so -buildmode=c-shared main.go export.go
|
||||
|
||||
- name: Run redhat docker and mapping apisix into container
|
||||
env:
|
||||
TEST_FILE_SUB_DIR: ${{ matrix.test_dir }}
|
||||
TEST_EVENTS_MODULE: ${{ matrix.events_module }}
|
||||
run: |
|
||||
docker run -itd -v ${{ github.workspace }}:/apisix --env TEST_FILE_SUB_DIR="$TEST_FILE_SUB_DIR" --env TEST_EVENTS_MODULE="$TEST_EVENTS_MODULE" --name ubiInstance --net="host" --dns 8.8.8.8 --dns-search apache.org registry.access.redhat.com/ubi8/ubi:8.6 /bin/bash
|
||||
|
||||
- name: Cache images
|
||||
id: cache-images
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: cache-apisix-docker-images
|
||||
with:
|
||||
path: docker-images-backup
|
||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ steps.test_env.outputs.type }}-${{ hashFiles(format('./ci/pod/docker-compose.{0}.yml', steps.test_env.outputs.type )) }}
|
||||
|
||||
- if: ${{ steps.cache-images.outputs.cache-hit == 'true' }}
|
||||
name: Load saved docker images
|
||||
run: |
|
||||
if [[ -f docker-images-backup/apisix-images.tar ]]; then
|
||||
[[ ${{ steps.test_env.outputs.type }} != first ]] && sudo ./ci/init-${{ steps.test_env.outputs.type }}-test-service.sh before
|
||||
docker load --input docker-images-backup/apisix-images.tar
|
||||
rm docker-images-backup/apisix-images.tar
|
||||
make ci-env-up project_compose_ci=ci/pod/docker-compose.${{ steps.test_env.outputs.type }}.yml
|
||||
echo "loaded docker images"
|
||||
if [[ ${{ steps.test_env.outputs.type }} != first ]]; then
|
||||
sudo ./ci/init-${{ steps.test_env.outputs.type }}-test-service.sh after
|
||||
fi
|
||||
fi
|
||||
- if: ${{ steps.cache-images.outputs.cache-hit != 'true' }}
|
||||
name: Linux launch services
|
||||
run: |
|
||||
[[ ${{ steps.test_env.outputs.type }} != first ]] && sudo ./ci/init-${{ steps.test_env.outputs.type }}-test-service.sh before
|
||||
[[ ${{ steps.test_env.outputs.type }} == plugin ]] && ./ci/pod/openfunction/build-function-image.sh
|
||||
make ci-env-up project_compose_ci=ci/pod/docker-compose.${{ steps.test_env.outputs.type }}.yml
|
||||
[[ ${{ steps.test_env.outputs.type }} != first ]] && sudo ./ci/init-${{ steps.test_env.outputs.type }}-test-service.sh after
|
||||
echo "Linux launch services, done."
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
docker exec ubiInstance bash -c "cd apisix && chmod +x ./ci/redhat-ci.sh && ./ci/redhat-ci.sh install_dependencies"
|
||||
|
||||
- name: Install rpm package
|
||||
if: ${{ startsWith(github.ref, 'refs/heads/release/') }}
|
||||
run: |
|
||||
docker exec ubiInstance bash -c "cd apisix && rpm -iv --prefix=/apisix ./apisix-build-tools/output/apisix-${{ steps.branch_env.outputs.version }}-0.ubi8.6.x86_64.rpm"
|
||||
# Dependencies are attached with rpm, so revert `make deps`
|
||||
docker exec ubiInstance bash -c "cd apisix && rm -rf deps"
|
||||
docker exec ubiInstance bash -c "cd apisix && mv usr/bin . && mv usr/local/apisix/* ."
|
||||
|
||||
- name: Run test cases
|
||||
run: |
|
||||
docker exec ubiInstance bash -c "cd apisix && chmod +x ./ci/redhat-ci.sh && ./ci/redhat-ci.sh run_case"
|
||||
|
||||
- if: ${{ steps.cache-images.outputs.cache-hit != 'true' }}
|
||||
name: Save docker images
|
||||
run: |
|
||||
echo "start backing up, $(date)"
|
||||
bash ./ci/backup-docker-images.sh ${{ steps.test_env.outputs.type }}
|
||||
echo "backup done, $(date)"
|
35
CloudronPackages/APISIX/apisix-source/.github/workflows/semantic.yml
vendored
Normal file
35
CloudronPackages/APISIX/apisix-source/.github/workflows/semantic.yml
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
name: "PR Lint"
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
types:
|
||||
- opened
|
||||
- edited
|
||||
- synchronize
|
||||
|
||||
jobs:
|
||||
main:
|
||||
name: Validate PR title
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
- uses: ./.github/actions/action-semantic-pull-request
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
types: |
|
||||
feat
|
||||
fix
|
||||
docs
|
||||
style
|
||||
refactor
|
||||
perf
|
||||
test
|
||||
build
|
||||
ci
|
||||
chore
|
||||
revert
|
||||
change
|
124
CloudronPackages/APISIX/apisix-source/.github/workflows/source-install.yml
vendored
Normal file
124
CloudronPackages/APISIX/apisix-source/.github/workflows/source-install.yml
vendored
Normal file
@@ -0,0 +1,124 @@
|
||||
name: Source Code Install
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master, 'release/**']
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
- '**/*.md'
|
||||
pull_request:
|
||||
branches: [master, 'release/**']
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
- '**/*.md'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.run_number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
install-on-multi-platform:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform:
|
||||
- ubuntu-latest
|
||||
os_platform:
|
||||
- ubuntu
|
||||
- redhat
|
||||
services:
|
||||
etcd:
|
||||
image: bitnami/etcd:3.5.4
|
||||
ports:
|
||||
- 2379:2379
|
||||
- 2380:2380
|
||||
env:
|
||||
ALLOW_NONE_AUTHENTICATION: yes
|
||||
ETCD_ADVERTISE_CLIENT_URLS: http://0.0.0.0:2379
|
||||
httpbin:
|
||||
image: kennethreitz/httpbin
|
||||
ports:
|
||||
- 8088:80
|
||||
|
||||
runs-on: ${{ matrix.platform }}
|
||||
timeout-minutes: 30
|
||||
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Cache deps
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: cache-deps
|
||||
with:
|
||||
path: deps
|
||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ matrix.os_platform }}-${{ hashFiles('apisix-master-0.rockspec') }}
|
||||
|
||||
- name: Install and start apisix on ${{ matrix.os_platform }}
|
||||
env:
|
||||
INSTALL_PLATFORM: ${{ matrix.os_platform }}
|
||||
run: |
|
||||
if [[ $INSTALL_PLATFORM == "ubuntu" ]]; then
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y git sudo make
|
||||
make deps
|
||||
sudo make install
|
||||
apisix start
|
||||
elif [[ $INSTALL_PLATFORM == "redhat" ]]; then
|
||||
docker run -itd -v ${{ github.workspace }}:/apisix --name ubi8 --net="host" --dns 8.8.8.8 --dns-search apache.org registry.access.redhat.com/ubi8/ubi:8.6 /bin/bash
|
||||
docker exec ubi8 bash -c "yum install -y git sudo make"
|
||||
docker exec ubi8 bash -c "cd apisix && make deps"
|
||||
docker exec ubi8 bash -c "cd apisix && make install"
|
||||
docker exec ubi8 bash -c "cd apisix && apisix start"
|
||||
elif [[ $INSTALL_PLATFORM == "centos7" ]]; then
|
||||
docker run -itd -v ${{ github.workspace }}:/apisix --name centos7Instance --net="host" --dns 8.8.8.8 --dns-search apache.org docker.io/centos:7 /bin/bash
|
||||
docker exec centos7Instance bash -c "yum install -y git sudo make"
|
||||
docker exec centos7Instance bash -c "cd apisix && make deps"
|
||||
docker exec centos7Instance bash -c "cd apisix && make install"
|
||||
docker exec centos7Instance bash -c "cd apisix && apisix start"
|
||||
fi
|
||||
sleep 6
|
||||
|
||||
- name: Test apisix
|
||||
run: |
|
||||
wget https://github.com/mikefarah/yq/releases/download/3.4.1/yq_linux_amd64 -O /usr/bin/yq && sudo chmod +x /usr/bin/yq
|
||||
get_admin_key() {
|
||||
local admin_key=$(yq '.deployment.admin.admin_key[0].key' conf/config.yaml)
|
||||
echo "$admin_key"
|
||||
}
|
||||
export admin_key=$(get_admin_key); echo $admin_key
|
||||
cat conf/config.yaml
|
||||
curl -v http://127.0.0.1:9180/apisix/admin/routes/1 \
|
||||
-H "X-API-KEY: $admin_key" -X PUT -d '
|
||||
{
|
||||
"uri": "/get",
|
||||
"upstream": {
|
||||
"type": "roundrobin",
|
||||
"nodes": {
|
||||
"127.0.0.1:8088": 1
|
||||
}
|
||||
}
|
||||
}'
|
||||
result_code=`curl -I -m 10 -o /dev/null -s -w %{http_code} http://127.0.0.1:9080/get`
|
||||
if [[ $result_code -ne 200 ]]; then
|
||||
printf "result_code: %s\n" "$result_code"
|
||||
echo "===============access.log==============="
|
||||
cat logs/access.log
|
||||
echo "===============error.log==============="
|
||||
cat logs/error.log
|
||||
exit 125
|
||||
fi
|
||||
|
||||
- name: Check error log
|
||||
run: |
|
||||
if grep -q '\[error\]' logs/error.log; then
|
||||
echo "=====found error log====="
|
||||
cat /usr/local/apisix/logs/error.log
|
||||
exit 125
|
||||
fi
|
52
CloudronPackages/APISIX/apisix-source/.github/workflows/stale.yml
vendored
Normal file
52
CloudronPackages/APISIX/apisix-source/.github/workflows/stale.yml
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
name: Stable Test
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 10 * * *'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
prune_stale:
|
||||
permissions:
|
||||
issues: write # for actions/stale to close stale issues
|
||||
pull-requests: write # for actions/stale to close stale PRs
|
||||
name: Prune Stale
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
|
||||
steps:
|
||||
- name: Prune Stale
|
||||
uses: actions/stale@v8
|
||||
with:
|
||||
days-before-issue-stale: 350
|
||||
days-before-issue-close: 14
|
||||
stale-issue-message: >
|
||||
This issue has been marked as stale due to 350 days of inactivity.
|
||||
It will be closed in 2 weeks if no further activity occurs. If this issue is still
|
||||
relevant, please simply write any comment. Even if closed, you can still revive the
|
||||
issue at any time or discuss it on the dev@apisix.apache.org list.
|
||||
Thank you for your contributions.
|
||||
close-issue-message: >
|
||||
This issue has been closed due to lack of activity. If you think that
|
||||
is incorrect, or the issue requires additional review, you can revive the issue at
|
||||
any time.
|
||||
days-before-pr-stale: 60
|
||||
days-before-pr-close: 28
|
||||
stale-pr-message: >
|
||||
This pull request has been marked as stale due to 60 days of inactivity.
|
||||
It will be closed in 4 weeks if no further activity occurs. If you think
|
||||
that's incorrect or this pull request should instead be reviewed, please simply
|
||||
write any comment. Even if closed, you can still revive the PR at any time or
|
||||
discuss it on the dev@apisix.apache.org list.
|
||||
Thank you for your contributions.
|
||||
close-pr-message: >
|
||||
This pull request/issue has been closed due to lack of activity. If you think that
|
||||
is incorrect, or the pull request requires review, you can revive the PR at any time.
|
||||
# Issues with these labels will never be considered stale.
|
||||
exempt-issue-labels: 'bug,enhancement,good first issue'
|
||||
stale-issue-label: 'stale'
|
||||
stale-pr-label: 'stale'
|
||||
ascending: true
|
55
CloudronPackages/APISIX/apisix-source/.github/workflows/tars-ci.yml
vendored
Normal file
55
CloudronPackages/APISIX/apisix-source/.github/workflows/tars-ci.yml
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
name: CI Tars
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master, 'release/**' ]
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
- '**/*.md'
|
||||
pull_request:
|
||||
branches: [ master, 'release/**' ]
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
- '**/*.md'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.run_number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
tars:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform:
|
||||
- ubuntu-latest
|
||||
os_name:
|
||||
- linux_openresty
|
||||
|
||||
runs-on: ${{ matrix.platform }}
|
||||
timeout-minutes: 15
|
||||
env:
|
||||
SERVER_NAME: ${{ matrix.os_name }}
|
||||
OPENRESTY_VERSION: default
|
||||
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Setup Tars MySql
|
||||
run: |
|
||||
docker run -d -p 3306:3306 -v $PWD/t/tars/conf/tars.sql:/docker-entrypoint-initdb.d/tars.sql -e MYSQL_ROOT_PASSWORD=tars2022 mysql:5.7
|
||||
|
||||
- name: Linux Install
|
||||
run: |
|
||||
sudo ./ci/${{ matrix.os_name }}_runner.sh before_install
|
||||
sudo --preserve-env=OPENRESTY_VERSION ./ci/${{ matrix.os_name }}_runner.sh do_install
|
||||
|
||||
- name: Run test cases
|
||||
run: |
|
||||
./ci/tars-ci.sh run_case
|
62
CloudronPackages/APISIX/apisix-source/.github/workflows/update-labels.yml
vendored
Normal file
62
CloudronPackages/APISIX/apisix-source/.github/workflows/update-labels.yml
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
name: Update labels when user responds in issue and pr
|
||||
permissions:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
pull_request_review_comment:
|
||||
types: [created]
|
||||
|
||||
jobs:
|
||||
issue_commented:
|
||||
if: github.event.issue && !github.event.issue.pull_request && github.event.comment.user.login == github.event.issue.user.login && contains(github.event.issue.labels.*.name, 'wait for update') && !contains(github.event.issue.labels.*.name, 'user responded')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: update labels when user responds
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
github.rest.issues.addLabels({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
labels: ["user responded"]
|
||||
})
|
||||
github.rest.issues.removeLabel({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
name: "wait for update"
|
||||
})
|
||||
|
||||
pr_commented:
|
||||
if: github.event.issue && github.event.issue.pull_request && github.event.comment.user.login == github.event.issue.user.login && (contains(github.event.issue.labels.*.name, 'wait for update') || contains(github.event.issue.labels.*.name, 'discuss') || contains(github.event.issue.labels.*.name, 'need test cases')) && !contains(github.event.issue.labels.*.name, 'user responded')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: update label when user responds
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
github.rest.issues.addLabels({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
labels: ["user responded"]
|
||||
})
|
||||
|
||||
pr_review_commented:
|
||||
if: github.event.pull_request && github.event.comment.user.login == github.event.pull_request.user.login && (contains(github.event.pull_request.labels.*.name, 'wait for update') || contains(github.event.pull_request.labels.*.name, 'discuss') || contains(github.event.issue.labels.*.name, 'need test cases')) && !contains(github.event.pull_request.labels.*.name, 'user responded')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: update label when user responds
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
github.rest.issues.addLabels({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
labels: ["user responded"]
|
||||
})
|
Reference in New Issue
Block a user