-
Notifications
You must be signed in to change notification settings - Fork 30
build_module.sh hardening & CI #117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
thresheek
wants to merge
17
commits into
nginx:master
Choose a base branch
from
thresheek:buildmodulefixes
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
9337cef
build_module: add missing colon in INFO log messages for download cases
thresheek 9328b4d
build_module: exit on git clone failure when fetching NGINX packaging…
thresheek be01606
build_module: exit on git checkout failure for OSS version and Plus r…
thresheek f3b2405
build_module: exit if NGINX version cannot be determined from packagi…
thresheek 0749aba
build_module: suppress stderr from apk --version on non-Alpine systems
thresheek ccd347a
build_module: quote variables throughout to handle paths with spaces
thresheek 4ed3b0a
build_module: add error handling for all cd invocations
thresheek 1eb4b75
build_module: add early validation for arguments
thresheek 61bf082
build_module: validate archive top-level directory to prevent path tr…
thresheek 0999e18
build_module: replace try_n_times with wget_n_times and check the exi…
thresheek 13d85d1
build_module: correct wget_n_times retry count
thresheek caa410b
build_module: use mktemp -d for unpredictable temporary build directory
thresheek e146fea
build_module: fix artifacts collection for debian-based distros
thresheek 95176bb
build_module: replace non-POSIX echo invocations with printf
thresheek 10f2bbb
build_module: exit on git clone failure for module source
thresheek 3350e86
build_module: use /. to copy directory contents including dotfiles
thresheek 344c036
CI: add build_module.sh test workflow
thresheek File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,52 @@ | ||
| name: build_module.sh CI | ||
|
|
||
| on: | ||
| pull_request: | ||
| push: | ||
| workflow_dispatch: | ||
|
|
||
| defaults: | ||
| run: | ||
| shell: sh -e {0} | ||
|
|
||
| jobs: | ||
| build-module: | ||
| name: build-module (${{ matrix.os.container }}, ${{ matrix.nginx.flavor }}) | ||
| runs-on: ubuntu-24.04 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: | ||
| - container: almalinux:9 | ||
| pre_install: | | ||
| dnf install -y git | ||
| - container: ubuntu:26.04 | ||
| pre_install: | | ||
| apt-get update | ||
| apt-get install -y --no-install-recommends git ca-certificates | ||
| - container: alpine:3.23 | ||
| pre_install: | | ||
| apk add --no-cache git | ||
| printf "#!/bin/sh\\nSETFATTR=true /usr/bin/abuild -F \"\$@\"\\n" > /usr/local/bin/abuild | ||
| chmod +x /usr/local/bin/abuild | ||
| nginx: | ||
| - flavor: oss | ||
| build_args: "" | ||
| - flavor: plus | ||
| build_args: "-r 37.0" | ||
| container: ${{ matrix.os.container }} | ||
|
|
||
| steps: | ||
| - name: Install prerequisites | ||
| run: ${{ matrix.os.pre_install }} | ||
|
|
||
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | ||
|
|
||
| - name: Build echo-nginx-module (${{ matrix.nginx.flavor }}) | ||
| run: | | ||
| sh build_module.sh -y -n echo ${{ matrix.nginx.build_args }} -V 0.64 \ | ||
| https://github.com/openresty/echo-nginx-module/archive/v0.64.tar.gz | ||
|
|
||
| - name: List built packages | ||
| if: always() | ||
| run: find build-module-artifacts -type f | xargs ls -ld | ||
|
thresheek marked this conversation as resolved.
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.