From 9636c2edc5f6612267392052a8e24da387c9ba60 Mon Sep 17 00:00:00 2001 From: Gerald Pinder <717217-gmpinder@users.noreply.gitlab.com> Date: Mon, 15 Jan 2024 02:20:08 +0000 Subject: [PATCH] test: Add integration tests for build and template --- Earthfile | 51 +++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 39 insertions(+), 12 deletions(-) diff --git a/Earthfile b/Earthfile index 4eced68..fec9fe0 100644 --- a/Earthfile +++ b/Earthfile @@ -13,22 +13,23 @@ all: BUILD +nightly default: + ARG NIGHTLY=false WAIT - BUILD +lint - BUILD +test + BUILD +lint --NIGHTLY=$NIGHTLY + BUILD +test --NIGHTLY=$NIGHTLY END - BUILD +blue-build-cli - BUILD +blue-build-cli-alpine - BUILD +installer + BUILD +blue-build-cli --NIGHTLY=$NIGHTLY + BUILD +blue-build-cli-alpine --NIGHTLY=$NIGHTLY + BUILD +installer --NIGHTLY=$NIGHTLY + BUILD +integration-test-template --NIGHTLY=$NIGHTLY nightly: - WAIT - BUILD +lint --NIGHTLY=true - BUILD +test --NIGHTLY=true - END - BUILD +blue-build-cli --NIGHTLY=true - BUILD +blue-build-cli-alpine --NIGHTLY=true - BUILD +installer --NIGHTLY=true + BUILD +default --NIGHTLY=true + +integration-tests: + ARG NIGHTLY=false + BUILD +integration-test-template --NIGHTLY=$NIGHTLY + BUILD +integration-test-build --NIGHTLY=$NIGHTLY lint: FROM +common @@ -112,6 +113,32 @@ installer: ARG INSTALLER=true DO cargo+SAVE_IMAGE --IMAGE=$IMAGE --TAG=$TAG --LATEST=$LATEST --NIGHTLY=$NIGHTLY --INSTALLER=$INSTALLER +integration-test-template: + FROM DOCKERFILE -f +integration-test-template-containerfile/test/Containerfile +integration-test-template-containerfile/test/* + +integration-test-template-containerfile: + ARG NIGHTLY=false + FROM +integration-test-base --NIGHTLY=$NIGHTLY + RUN bb -vv template config/recipe-jp-desktop.yml | tee Containerfile + + SAVE ARTIFACT /test + +integration-test-build: + ARG NIGHTLY=false + FROM +integration-test-base --NIGHTLY=$NIGHTLY + + WITH DOCKER + RUN bb -vv build config/recipe-jp-desktop.yml + END + +integration-test-base: + ARG NIGHTLY=false + + FROM +blue-build-cli-alpine --NIGHTLY=$NIGHTLY + + GIT CLONE https://gitlab.com/wunker-bunker/wunker-os.git /test + WORKDIR /test + iso-generator: FROM registry.fedoraproject.org/fedora-toolbox