Commit 5f517b3
committed
Create Dockerfile for deps and smoke test scripts
### 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.041 parent c4b0262 commit 5f517b3
2 files changed
+29
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
0 commit comments