forked from mendersoftware/mender-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
95 lines (86 loc) · 2.42 KB
/
.gitlab-ci.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
85
86
87
88
89
90
91
92
93
94
95
variables:
# Set to true to skip tests
SKIP_TESTS: "false"
stages:
- test
- trigger
include:
- project: 'Northern.tech/Mender/mendertesting'
file: '.gitlab-ci-check-commits-signoffs.yml'
- project: 'Northern.tech/Mender/mendertesting'
file: '.gitlab-ci-check-python3-format.yml'
- project: 'Northern.tech/Mender/mendertesting'
file: '.gitlab-ci-github-status-updates.yml'
test:
except:
variables:
- $SKIP_TESTS == "true"
stage: test
image: ubuntu:focal
services:
- docker:dind
tags:
- mender-qa-worker-generic
variables:
# DinD setup in Mender CI runners
DOCKER_HOST: "tcp://docker:2376"
DOCKER_CERT_PATH: "/certs/client"
DOCKER_TLS_VERIFY: "1"
DOCKER_TLS_CERTDIR: "/certs"
before_script:
- apt-get update && apt-get install -y
docker.io bash git openssl pwgen python3 jq docker-compose wget sudo
- git config --global user.name "user"
- git config --global user.email "[email protected]"
script:
- ./run-tests.sh
test:internal-links:
stage: test
image: node:19-alpine
script:
- apk add --no-cache git
- npm ci
- ./checklinks.js --color --verbose
test:passive-voice:
stage: test
image: ubuntu
script:
- bash ./scripts/run-passive.sh
test:latest_versions:
stage: test
image: alpine
before_script:
- apk add --no-cache git python3 py3-pip
- pip3 install pyyaml
- export INTEGRATION_REPO_DIR=/tmp/integration
- git clone https://github.com/mendersoftware/integration.git $INTEGRATION_REPO_DIR
- export INTEGRATION_VERSION=origin/staging
script:
- ./autoversion.py
--update
--integration-dir $INTEGRATION_REPO_DIR
--integration-version $INTEGRATION_VERSION
--mender-ci-workflows-version 1.0.0
- git diff HEAD
# exits with non zero status if not staged for commit files exist
- git diff-index --quiet HEAD
only:
- /^(hosted)$/
.trigger:mender-docs-site:
stage: trigger
inherit:
variables: false
rules:
- if: '$CI_COMMIT_BRANCH =~ /^(master|hosted|[0-9]+\.[0-9]+\.x)$/'
- if: '$CI_PIPELINE_SOURCE == "schedule"'
when: never
trigger:mender-docs-site:master:
extends: .trigger:mender-docs-site
trigger:
project: Northern.tech/Mender/mender-docs-site
branch: master
trigger:mender-docs-site:production:
extends: .trigger:mender-docs-site
trigger:
project: Northern.tech/Mender/mender-docs-site
branch: production