@ -8,6 +8,8 @@ variables:
RASPBIAN_URL : http://downloads.raspberrypi.org/raspbian_lite/images/raspbian_lite-2019-09-30/2019-09-26-raspbian-buster-lite.zip
RASPBIAN_NAME : 2019-09-26 -raspbian-buster-lite
DEBIAN_FRONTEND : noninteractive
include:
- project : 'Northern.tech/Mender/mendertesting'
file : '.gitlab-ci-check-commits.yml'
@ -17,8 +19,8 @@ include:
stages:
- test
- build
- test_acceptance
- convert
- test_acceptance
- publish
build:
@ -35,25 +37,30 @@ build:
test_acceptance:
stage : test_acceptance
image : docker:18-dind
image : teracy/ubuntu:18.04-dind-18.09.9
services:
- docker:18-dind
tags:
- mender-qa-slave
dependencies:
- build
- convert_raspbian
before_script:
# Start up Docker (DonD)
- /usr/local/bin/dockerd-entrypoint.sh &
- sleep 10
- export DOCKER_HOST="unix:///var/run/docker.sock"
- docker version
# Install dependencies
- apk --update --no-cache add bash wget git util-linux mtools python3 py3-pip
gcc python3-dev libffi-dev lzo-dev libc-dev openssl-dev make sudo
- apt update
- apt install -qyy bash wget git util-linux mtools python3 python3-pip
gcc python3-dev libffi-dev liblzo2-dev libc-dev libssl-dev make sudo
awscli unzip
# Python3 dependencies
- pip3 install -r https://raw.githubusercontent.com/mendersoftware/meta-mender/master/tests/acceptance/requirements_py3.txt
# Load image under test
- export IMAGE_NAME=$DOCKER_REPOSITORY:pr
- docker load -i image.tar
# Fetch artifacts from temporary S3 bucket
- aws s3 cp s3://mender-gitlab-tmp-storage/$CI_PROJECT_NAME/$CI_PIPELINE_ID/deploy.tar.gz deploy.tar.gz
- tar xzf deploy.tar.gz
# Extract converted Raspbian artifacts
- unxz deploy/raspberrypi-mender-raspbian.sdimg.xz
script:
- ./scripts/test/run-tests.sh
artifacts:
@ -75,7 +82,7 @@ convert_raspbian:
dependencies:
- build
before_script:
- apt update && apt install -yy bash wget unzip
- apt update && apt install -yy bash wget unzip awscli
- export IMAGE_NAME=$DOCKER_REPOSITORY:pr
- docker load -i image.tar
@ -90,20 +97,10 @@ convert_raspbian:
-c configs/raspberrypi3_config
-c configs/images/raspberrypi3_raspbian_config
-c mender_client_version_config
- cp deploy/raspberrypi-mender-raspbian.sdimg.xz deploy/${RASPBIAN_NAME}-mender-${MENDER_CLIENT_VERSION}.img.xz
- unxz deploy/raspberrypi-mender-raspbian.sdimg.xz
# Verify converted image
- . ./scripts/test/test-utils.sh
- run_tests raspbian mender-raspbian "-k TestMenderInstalled"
after_script:
- mkdir -p output
- mv deploy/*.img.xz output
artifacts:
paths:
- output
expire_in : 2 weeks
# Upload to temporary S3 bucket
- tar czf deploy.tar.gz deploy
- aws s3 cp deploy.tar.gz s3://mender-gitlab-tmp-storage/$CI_PROJECT_NAME/$CI_PIPELINE_ID/deploy.tar.gz
publish:s3:
when : manual
@ -111,9 +108,14 @@ publish:s3:
image : debian:buster
before_script:
- apt update && apt install -yyq awscli
# Fetch artifacts from temporary S3 bucket
- aws s3 cp s3://mender-gitlab-tmp-storage/$CI_PROJECT_NAME/$CI_PIPELINE_ID/deploy.tar.gz deploy.tar.gz
- tar xzf deploy.tar.gz
script:
- echo "Publishing ${RASPBIAN_NAME}-mender-${MENDER_CLIENT_VERSION}.img.xz version to S3"
- aws s3 cp output/${RASPBIAN_NAME}-mender-${MENDER_CLIENT_VERSION}.img.xz
- aws s3 cp deploy/raspberrypi-mender-raspbian.sd img.xz
s3://$S3_BUCKET_NAME/${RASPBIAN_NAME}/arm/${RASPBIAN_NAME}-mender-${MENDER_CLIENT_VERSION}.img.xz
- aws s3api put-object-acl --acl public-read --bucket $S3_BUCKET_NAME
--key ${RASPBIAN_NAME}/arm/${RASPBIAN_NAME}-mender-${MENDER_CLIENT_VERSION}.img.xz