-
Notifications
You must be signed in to change notification settings - Fork 78
/
.gitlab-ci-default-pipeline.yml
84 lines (73 loc) · 2.89 KB
/
.gitlab-ci-default-pipeline.yml
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
76
77
78
79
80
81
82
83
84
include:
- project: 'Northern.tech/Mender/mendertesting'
file: '.gitlab-ci-check-commits.yml'
- project: 'Northern.tech/Mender/mendertesting'
file: '.gitlab-ci-check-license.yml'
- project: 'Northern.tech/Mender/mendertesting'
file: '.gitlab-ci-check-python3-format.yml'
- project: 'Northern.tech/Mender/mendertesting'
file: '.gitlab-ci-check-docker-build.yml'
variables:
LICENSE_HEADERS_IGNORE_FILES_REGEXP: '\./extra/gitdm.*'
test:extra-tools:
image: "python:3"
stage: test
before_script:
- pip install -r extra/requirements.txt
- pip install pytest PyGithub
# Rename the branch we're on, so that it's not in the way for the
# subsequent fetch. It's ok if this fails, it just means we're not on any
# branch.
- git branch -m temp-branch || true
# Set up git identity
- git config --global user.name "Northern.tech" && git config --global user.email "[email protected]"
# Needed for the statistics generator
- git config --global mailmap.file $(pwd)/extra/gitdm/mailmap
# Add github remote for tests using --integration-versions-including
- git remote add github https://github.com/mendersoftware/integration.git
- git fetch github
# Fetch master branch for tests using --in-integration-version
- git fetch origin master:master
- git fetch origin --tags
- git submodule update --init --recursive
# Fetch all Open Source release repositories for testing release_tool.
- for repo in $(env TEST_RELEASE_TOOL_LIST_OPEN_SOURCE_ONLY=1 extra/release_tool.py --list --all); do
- if [ $repo == integration ]; then
- continue
- fi
- git clone https://github.com/mendersoftware/$repo ../$repo
- done
script:
- ( cd extra/changelog-generator && ./test-changelog-generator )
- python3 -m pytest extra/test_release_tool.py
- python3 -m pytest extra/test_statistics_generator.py
# Smoke test to verify requirements.txt are sane
test:integration-tests:requirements:
stage: test
rules:
- changes:
- tests/requirements-system/apk-requirements.txt
- tests/requirements-python/python-requirements.txt
# Use same image as in mender-qa
image: docker:24.0.7-dind-alpine3.18
script:
# Get and install the integration test requirements
- apk add $(cat tests/requirements-system/apk-requirements.txt)
- pip install -r tests/requirements-python/python-requirements.txt
build:docker:
tags:
- hetzner-amd-beefy
variables:
DOCKER_REPOSITORY: mendersoftware/mender-client-docker-addons
DOCKER_DIR: extra/mender-client-docker-addons
publish:image:
variables:
DOCKER_REPOSITORY: mendersoftware/mender-client-docker-addons
DOCKER_DIR: extra/mender-client-docker-addons
publish:image:mender:
variables:
DOCKER_REPOSITORY: mendersoftware/mender-client-docker-addons
DOCKER_DIR: extra/mender-client-docker-addons
publish:image:saas:
rules:
- when: never