From ac94943039f6cd70cd19b03846f5019d2eecc152 Mon Sep 17 00:00:00 2001 From: Devan Carpenter Date: Sun, 17 Dec 2023 19:40:47 -0500 Subject: DD44: document using script to run jobs local --- design-documents/044-ci-system.rst | 38 +++++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 15 deletions(-) (limited to 'design-documents') diff --git a/design-documents/044-ci-system.rst b/design-documents/044-ci-system.rst index 78d64830..cfb733aa 100644 --- a/design-documents/044-ci-system.rst +++ b/design-documents/044-ci-system.rst @@ -94,24 +94,32 @@ Running CI Locally Running the CI scripts locally can be useful for development and testing. -*Be aware that custom configs for a given job may specify a alternate -container.* - - -Example of building the environment and running a job locally: +Included in each CI directory is a script which simplifies running jobs +in the same way the CI Worker does, in containers, using either `podman` +or `docker`, detecting if you have either installed. :: - # From root of repo directory, build the container: - docker build -t -f ci/Containerfile . # <- don't forget the "." - - # Then to run one of the job scripts. For example: - docker run --rm --volume $PWD:/workdir --workdir /workdir ci/jobs/1-build/job.sh - - # or to get an interactive shell in the container, with the repo mounted at /workdir: - docker run -ti --rm --volume $PWD:/workdir --workdir /workdir /bin/bash - - + # Usage: + ./contrib/ci/ci.sh + + # For example, if the CI jobs tree looks like this: + ./contrib/ci/jobs + ├── 0-codespell/ + ├── 1-build/ + ├── 2-test/ + ├── 3-docs/ + ├── 4-deb-package/ + └── 5-deploy-package/ + + # Then you can run job '0-codespell' as follows: + ./contrib/ci/ci.sh 0-codespell + + # If you are using podman and have "qemu-user-binfmt" installed + # then you may attempt to run any job under an alternative CPU + # architecture by providing a second argument. + # For example: + ./contrib/ci/ci.sh 0-codespell arm64 Additional Builders -- cgit v1.2.3