-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
75 lines (70 loc) · 2.29 KB
/
.gitlab-ci.yml
File metadata and controls
75 lines (70 loc) · 2.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
stages:
- test
include:
- project: Northern.tech/Mender/mendertesting
file:
- qa-common/runner.yml
- qa-common/retry.yml
- project: 'Northern.tech/Mender/mendertesting'
file:
- '.gitlab-ci-github-status-updates.yml'
- '.gitlab-ci-check-commits.yml'
- '.gitlab-ci-check-license.yml'
- '.gitlab-ci-check-python3-format.yml'
default:
tags: !reference [.qa-common-default-runner, tags]
retry: !reference [.qa-common-default-retry, retry]
variables:
MENDER_VERSION: mender-master
MENDER_ARTIFACT_VERSION: 4.1.0
MENDER_CONFIGURE_VERSION: $CI_COMMIT_REF_NAME
test:unit:
stage: test
needs: []
image: python:alpine
before_script:
- apk add --update git make curl
- git submodule update --init --recursive
script:
- make test
test:integration:
stage: test
needs: []
image: docker:24.0.7-dind-alpine3.18
tags:
- hetzner-amd-beefy
before_script:
# DinD setup in Mender CI runners
- unset DOCKER_HOST
- unset DOCKER_TLS_VERIFY
- unset DOCKER_CERT_PATH
# Start dockerd in the background
- /usr/local/bin/dockerd &
# Wait for dockerd to start
- |-
MAX_WAIT=30
while [ ! -e "/var/run/docker.sock" ] && [ $MAX_WAIT -gt 0 ]; do
MAX_WAIT=$(($MAX_WAIT - 1))
sleep 1
done
# Verify that the docker server is up and running
- docker version
# Init the git submodules
- apk add --update --no-cache $(cat tests/integration/apk-requirements.txt)
- git submodule update --init --recursive
# Install test dependencies
- apk add --update --no-cache $(cat tests/integration/mender_integration/tests/requirements-system/apk-requirements.txt)
- pip install -r tests/integration/mender_integration/tests/requirements-python/python-requirements.txt
# Download and install mender-artifact
- apk add --no-cache dpkg
- wget "https://downloads.mender.io/repos/workstation-tools/pool/main/m/mender-artifact/mender-artifact_${MENDER_ARTIFACT_VERSION}-1%2bubuntu%2bnoble_amd64.deb"
--output-document mender-artifact.deb
- dpkg --extract mender-artifact.deb /
script:
- cd tests/integration/
- GENERATE_PYTEST_REPORT=true ./run.sh
artifacts:
expire_in: 2w
when: always
reports:
junit: ${CI_PROJECT_DIR}/tests/integration/report.xml