From 18fd3a23151deeb10cfbb93118b395795165ee20 Mon Sep 17 00:00:00 2001 From: Martin Roth Date: Fri, 21 Jul 2023 14:10:51 -0600 Subject: util/docker: Update coreboot-sdk-test to coreboot-jenkins-test The coreboot-jenkins-test docker image takes the coreboot-jenkins-node docker image and runs a series of tests to verify that things build properly. This was original created to test the coreboot-sdk, but build functions like the documentation have been moved from the sdk image into the jenkins node, so the test needs to be renamed. Add the makefile target to the help and phony target list at the same time. Signed-off-by: Martin Roth Change-Id: I0e6282bbb163064f177c8e68e7180ba2bdc101f1 Reviewed-on: https://review.coreboot.org/c/coreboot/+/76706 Tested-by: build bot (Jenkins) Reviewed-by: Felix Singer --- util/docker/Makefile | 12 ++++++---- util/docker/coreboot-jenkins-test/Dockerfile | 34 ++++++++++++++++++++++++++++ util/docker/coreboot-sdk-test/Dockerfile | 33 --------------------------- 3 files changed, 41 insertions(+), 38 deletions(-) create mode 100644 util/docker/coreboot-jenkins-test/Dockerfile delete mode 100644 util/docker/coreboot-sdk-test/Dockerfile (limited to 'util') diff --git a/util/docker/Makefile b/util/docker/Makefile index c86d8fd36a..c4713dd15c 100644 --- a/util/docker/Makefile +++ b/util/docker/Makefile @@ -48,10 +48,11 @@ coreboot-sdk: test-docker sed "s/{{CROSSGCC_PARAM}}/$(COREBOOT_CROSSGCC_PARAM)/g" | \ $(DOCKER) build -t coreboot/coreboot-sdk:$(COREBOOT_IMAGE_TAG) - -coreboot-sdk-test: coreboot-sdk test-docker - @echo "Testing coreboot SDK $(crossgcc_version), built from commit $(DOCKER_COMMIT)" - cat coreboot-sdk-test/Dockerfile | \ - $(DOCKER) build -t coreboot/coreboot-sdk-test:$(COREBOOT_IMAGE_TAG) - +coreboot-jenkins-test: test-docker + @echo "Testing coreboot SDK and jenkins node version $(crossgcc_version), built from commit $(DOCKER_COMMIT)" + cat coreboot-jenkins-test/Dockerfile | \ + sed "s/{{SDK_VERSION}}/$(COREBOOT_IMAGE_TAG)/g" | \ + $(DOCKER) build -t coreboot/coreboot-jenkins-test:$(COREBOOT_IMAGE_TAG) - upload-coreboot-sdk: test-docker-login $(DOCKER) push coreboot/coreboot-sdk:$(COREBOOT_IMAGE_TAG) @@ -186,6 +187,7 @@ docker-livehtml-docs: help: @echo "Commands for working with docker images:" @echo " coreboot-sdk - Build coreboot-sdk container" + @echo " coreboot-jenkins-test - Test the coreboot-jenkins-node build functionality" @echo " upload-coreboot-sdk - Upload coreboot-sdk to hub.docker.com" @echo " coreboot-jenkins-node - Build coreboot-jenkins-node container" @echo " upload-coreboot-jenkins-node - Upload coreboot-jenkins-node to hub.docker.com" @@ -215,7 +217,7 @@ help: @echo " DOCKER_COMMIT=$(DOCKER_COMMIT)" .PHONY: test-docker test-docker-login -.PHONY: coreboot-jenkins-node upload-coreboot-jenkins-node +.PHONY: coreboot-jenkins-node upload-coreboot-jenkins-node coreboot-jenkins-test .PHONY: coreboot-sdk upload-coreboot-sdk .PHONY: doc.coreboot.org .PHONY: clean-coreboot-containers clean-coreboot-images diff --git a/util/docker/coreboot-jenkins-test/Dockerfile b/util/docker/coreboot-jenkins-test/Dockerfile new file mode 100644 index 0000000000..030c4d2bbc --- /dev/null +++ b/util/docker/coreboot-jenkins-test/Dockerfile @@ -0,0 +1,34 @@ +FROM coreboot/coreboot-jenkins-node:{{SDK_VERSION}} + +# Test the built image +RUN mkdir -p /tmp/work && \ + cd /tmp/work && \ + git clone https://review.coreboot.org/bios_extract.git && \ + make -C bios_extract && \ + git clone https://review.coreboot.org/memtest86plus.git && \ + make -C memtest86plus && \ + git clone https://review.coreboot.org/flashrom.git && \ + CONFIG_EVERYTHING=yes make -C flashrom && \ + git clone https://review.coreboot.org/em100.git && \ + make -C em100 && \ + git clone https://review.coreboot.org/coreboot.git && \ + (cd coreboot && git submodule update --init --checkout ) && \ + make -C coreboot CPUS=$(nproc) test-abuild + +RUN \ + cd /tmp/work && \ + make -C coreboot olddefconfig && \ + make -C coreboot all -j && \ + make -C coreboot printall && \ + make -C coreboot filelist && \ + make -C coreboot ctags-project && \ + make -C coreboot cscope-project + +RUN \ + cd /tmp/work && \ + make -C coreboot test-payloads && \ + make -C coreboot test-tools -j && \ + make -C coreboot test-lint -j && \ + make -C coreboot test-cleanup -j && \ + cd && \ + rm -rf /tmp/work/ diff --git a/util/docker/coreboot-sdk-test/Dockerfile b/util/docker/coreboot-sdk-test/Dockerfile deleted file mode 100644 index 0ea57d123f..0000000000 --- a/util/docker/coreboot-sdk-test/Dockerfile +++ /dev/null @@ -1,33 +0,0 @@ -FROM coreboot-sdk -# Test the built image -RUN mkdir -p /tmp/work && \ - cd /tmp/work && \ - git clone https://review.coreboot.org/bios_extract.git && \ - make -C bios_extract && \ - git clone https://review.coreboot.org/memtest86plus.git && \ - make -C memtest86plus && \ - git clone https://review.coreboot.org/flashrom.git && \ - CONFIG_EVERYTHING=yes make -C flashrom && \ - git clone https://review.coreboot.org/em100.git && \ - make -C em100 && \ - git clone https://review.coreboot.org/coreboot.git && \ - (cd coreboot && git submodule update --init --checkout ) && \ - make -C coreboot CPUS=$(nproc) test-abuild - -RUN \ - cd /tmp/work && \ - make -C coreboot olddefconfig && \ - make -C coreboot all -j && \ - make -C coreboot printall && \ - make -C coreboot filelist && \ - make -C coreboot ctags-project && \ - make -C coreboot cscope-project - -RUN \ - cd /tmp/work && \ - make -C coreboot test-payloads&& \ - make -C coreboot test-tools -j && \ - make -C coreboot test-lint -j && \ - make -C coreboot test-cleanup -j && \ - cd && \ - rm -rf /tmp/work/ -- cgit v1.2.3