From 8f8992a18d55c3abf28d4b6fc8036bd39d3dc1cf Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Wed, 6 Dec 2017 13:36:09 +0000 Subject: .gitlab-ci.yml: Add image deployment test for BuildStream Drumroll... we actually boot the VM in QEMU, run a command, and check its output is sane. --- .gitlab-ci.yml | 48 ++++++++++++++++++++++++++++++++++++------------ 1 file changed, 36 insertions(+), 12 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7fe4b91c..5038fa96 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -32,11 +32,17 @@ variables: before_script: - | export BST_SHA='3fd7fe1fd3406fc9c35d0d2719085809c48247c7' + export BST_EXTERNAL_SHA='90edaa55568207c55dc12268ef01998584dd7af5' git clone https://gitlab.com/BuildStream/buildstream.git # Use specific version of BuildStream cd buildstream && git checkout $BST_SHA pip3 install . cd - + git clone https://gitlab.com/BuildStream/bst-external.git + # Use specific version of bst-external plugins + cd bst-external && git checkout $BST_EXTERNAL_SHA + pip3 install . + cd - # Create ~/.ssh for storing keys - mkdir -p ~/.ssh @@ -221,16 +227,34 @@ bst-convert: - elements/ <<: *ybd_cache -# Test building a common Baserock system -bst-build-build-system: +# Test building the simplest Baserock system first +bst-build-minimal-system: stage: build-1 dependencies: - bst-convert <<: *bst_before_script script: - - scripts/bst-build-or-show systems/build-system-content.bst + - scripts/bst-build-or-show systems/minimal-system-content.bst <<: *bst_cache +bst-minimal-system-deploy: + stage: deploy-1 + dependencies: + - bst-convert + - bst-build-minimal-system + <<: *bst_before_script + script: + - scripts/bst-build-or-show systems/minimal-system-image-x86_64.bst + - bst checkout systems/minimal-system-image-x86_64.bst ./minimal-system + - dnf install -y qemu-system-x86 + - scripts/test-minimal-system ./minimal-system/sda.img + <<: *bst_cache + artifacts: + name: "${CI_BUILD_NAME}-${CI_BUILD_REF}" + paths: + - ./minimal-system/sda.img + expire_in: 1 week + # Test building all converted Baserock systems bst-build-base-system: stage: build-2 @@ -241,40 +265,40 @@ bst-build-base-system: - scripts/bst-build-or-show systems/base-system-content.bst <<: *bst_cache -bst-build-genivi-demo-platform-system: +bst-build-build-system: stage: build-2 dependencies: - bst-convert <<: *bst_before_script script: - - scripts/bst-build-or-show systems/genivi-demo-platform-content.bst + - scripts/bst-build-or-show systems/build-system-content.bst <<: *bst_cache -bst-build-gnome-system: +bst-build-genivi-demo-platform-system: stage: build-2 dependencies: - bst-convert <<: *bst_before_script script: - - scripts/bst-build-or-show systems/gnome-system-content.bst + - scripts/bst-build-or-show systems/genivi-demo-platform-content.bst <<: *bst_cache -bst-build-ivi-demo-platform-system: +bst-build-gnome-system: stage: build-2 dependencies: - bst-convert <<: *bst_before_script script: - - scripts/bst-build-or-show systems/ivi-system-content.bst + - scripts/bst-build-or-show systems/gnome-system-content.bst <<: *bst_cache -bst-build-minimal-system: - stage: build-1 +bst-build-ivi-demo-platform-system: + stage: build-2 dependencies: - bst-convert <<: *bst_before_script script: - - scripts/bst-build-or-show systems/minimal-system-content.bst + - scripts/bst-build-or-show systems/ivi-system-content.bst <<: *bst_cache bst-build-openstack-system: -- cgit v1.2.1