ci: migrate to GitLab CI with multi-distribution RPM builds

- Replace GitHub Actions with GitLab CI using Docker-in-Docker
- Build 3 RPMs (el7, el8, el9) + 1 DEB from Dockerfile.package
- Add verify jobs for each target distribution
- Remove obsolete files:
  - Dockerfile, Dockerfile.test-socket (replaced by Dockerfile.package)
  - scripts/socket_consumer.py, scripts/socket_listener.py
  - scripts/test_unix_socket.sh, scripts/run_integration_tests.sh
- Update README.md with new package targets
- Update architecture.yml for GitLab CI workflow

Breaks: Single RPM no longer supported (glibc incompatibility)
Replaced by: Distribution-specific RPMs (el7, el8, el9)

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
Jacquin Antoine
2026-02-28 16:06:57 +01:00
parent 2fc3f92cf8
commit a935ed1641
14 changed files with 392 additions and 1312 deletions

View File

@ -24,14 +24,15 @@ Apache HTTPD 2.4 module for logging all incoming HTTP requests as JSON lines to
### Using Docker (recommended)
```bash
# Build DEB and RPM packages
make package-deb # Creates dist/deb/libapache2-mod-reqin-log_*.deb
make package-rpm # Creates dist/rpm/mod_reqin_log-*.rpm
make package # Build both packages
# Build all packages (DEB + RPMs for el7, el8, el9)
make package
# Test package installation
make test-package-deb # Test DEB in Docker container
make test-package-rpm # Test RPM in Docker container
make test-package-deb # Test DEB in Docker container
make test-package-rpm-el7 # Test el7 RPM (CentOS 7/RHEL 7)
make test-package-rpm-el8 # Test el8 RPM (Rocky 8/RHEL 8)
make test-package-rpm-el9 # Test el9 RPM (Rocky 9/RHEL 9)
make test-package # Test all packages
```
### Build from Source
@ -237,11 +238,13 @@ ls -la /usr/lib/apache2/modules/mod_reqin_log.so
### Run Unit Tests
```bash
# Install test dependencies
# Using Docker (recommended)
docker build -f Dockerfile.tests -t mod_reqin_log:tests .
docker run --rm mod_reqin_log:tests ctest --output-on-failure
# Or locally with cmocka
sudo dnf install cmocka-devel # Rocky Linux
sudo apt install libcmocka-dev # Debian/Ubuntu
# Build and run tests
mkdir build && cd build
cmake ..
make test
@ -250,16 +253,25 @@ make test
### Integration Testing
```bash
# Start socket consumer
python3 scripts/socket_consumer.py &
# Using GitLab CI (recommended)
# All integration tests run automatically in CI
# Start Apache with module enabled
sudo systemctl start httpd
# Or manually with the Python test suite
python3 tests/integration/test_integration.py --url http://localhost:8080
```
# Send test requests
curl -H "X-Request-Id: test-123" http://localhost/
### Build and Test Packages
# Check consumer output
```bash
# Build all packages (DEB + RPMs for el7, el8, el9)
make package
# Test package installation
make test-package-deb # Test DEB in Docker
make test-package-rpm-el7 # Test el7 RPM in Docker
make test-package-rpm-el8 # Test el8 RPM in Docker
make test-package-rpm-el9 # Test el9 RPM in Docker
make test-package # Test all packages
```
## License