-
Notifications
You must be signed in to change notification settings - Fork 25
Bintar deps validation script #694
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
base: dev
Are you sure you want to change the base?
Conversation
5a03ab6
to
7320133
Compare
05533eb
to
ed1387f
Compare
fee71ca
to
a046d68
Compare
26efa9b
to
df65af1
Compare
This commit introduces two different validation scripts. * One that checks dependencies of ELF files in bintar archives. * One that does a smoke test on bintar archives: Goes through each supported distribution and starts a bare-bones container image. Then within the image it does: 1. Extract the archive mariadb-install-db 2. Run ./mariadb-install-db 3. Start ./mariadbd as a process inside the container 4. Use the ./mariadb client from the archive to connect and run SELECT VERSION().
df65af1
to
c4b0262
Compare
@cvicentiu As you know, the workers run different Python versions depending on the Host operating system and these scripts come with a bunch of requirements to be installed beforehand. This can make the maintenance, delivery and installation a pain point. For
For
Let me know what are your thoughts, |
### Usage example # Build - from the ROOT of the repository docker build --build-arg SCRIPT=smoke_test.py -f scripts/bintars/BUILD/Dockerfile -t local:bintar_smoke_test . docker build --build-arg SCRIPT=deps_test.py -f scripts/bintars/BUILD/Dockerfile -t local:bintar_deps_test . # Interactive session (for debugging) docker run --rm -it --entrypoint=/bin/bash local:bintar_deps_test docker run --rm -it --entrypoint=/bin/bash local:bintar_smoke_test # deps test - mount a volume for mariadb archive $ docker run --rm -v /home/razvan/Documents/bincheck:/runtime \ local:bintar_deps_test \ /runtime/mariadb-10.6.21-linux-systemd-x86_64.tar.gz config/deps_10.6.yaml --- INFO: Product version (major.minor) 10.6 INFO: Extracting archive /runtime/mariadb-10.6.21-linux-systemd-x86_64.tar.gz INFO: Fetching archive dependencies INFO: Cleaned up tests/mariadb-10.6.21-linux-systemd-x86_64 INFO: All OK --- # smoke test - mount a volume for mariadb archive and docker socket (Docker Out of Docker) # is important that the test-directory is a bind mounted host path # so the script can further mount volumes for sibling containers $ docker run --rm -v /var/run/docker.sock:/var/run/docker.sock \ -v /tmp/buildnumber-builder:/tmp/buildnumber-builder \ -v /home/razvan/Documents/bincheck:/runtime \ local:bintar_smoke_test \ /runtime/mariadb-10.6.21-linux-systemd-x86_64.tar.gz \ config/supported_os.yaml --test_directory /tmp/buildnumber-builder --- INFO: Product version (major.minor) 10.6 INFO: Extracting archive /runtime/mariadb-10.6.21-linux-systemd-x86_64.tar.gz INFO: Using docker socket http+docker://localhost INFO: [1/2]: ubuntu:20.04 PASS INFO: [2/2]: ubuntu:22.04 PASS INFO: ------ TEST SUMMARY ------ INFO: PASSED: [ubuntu:20.04, ubuntu:22.04] INFO: Cleaned up /tmp/buildnumber-builder/mariadb-10.6.21-linux-systemd-x86_64 --- # These are written as ROOT. Buildbot-Worker cannot clean them /tmp$ tree buildnumber-builder/ buildnumber-builder/ ├── ubuntu_20.04 └── ubuntu_22.04
@cvicentiu I've added a Dockerfile to build two images for deps and smoke tests deps approach is pretty elegant, with no major workarounds. Instead for smoke tests, the
See the commit message for details. |
This commit introduces two different validation scripts.
Goes through each supported distribution and starts a bare-bones
container image. Then within the image it does:
SELECT VERSION().