-
Notifications
You must be signed in to change notification settings - Fork 4
/
.gitlab-ci.yml
64 lines (58 loc) · 1.79 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
include:
- project: 'nitrokey/gitlab-ci'
file:
- 'common-jobs/common_jobs.yml'
- 'common-jobs/github_commands.yml'
stages:
- pull-github
- checks
- build
- deploy
- commands
variables:
GIT_STRATEGY: clone
GIT_DEPTH: 0
GIT_SUBMODULE_STRATEGY: recursive
SCRIPTS_REPO: [email protected]:nitrokey/gitlab-ci.git
REPO_GROUP: nitrokey
REPO_NAME: nextbox
MAIN_BRANCH: master
COMMAND_MERGE_ENABLED: "true"
checks:
image: registry.git.nitrokey.com/nitrokey/nextbox/build-image:latest
rules:
- if: '$CI_PIPELINE_SOURCE == "push"'
- if: '$CI_PIPELINE_SOURCE == "pipeline" && $COMMAND_BOT == "nitrokey-ci" && $COMMAND == "build"'
- if: '$CI_PIPELINE_SOURCE == "schedule"'
- if: '$CI_PIPELINE_SOURCE == "web"'
tags:
- docker-arm
stage: checks
script:
- apt update
- apt install -qy python3 python3-pip python3-apt python3-distutils
- pip install -r requirements.txt
- pip install -r daemon/requirements.txt
- python3 -m mypy daemon/
build-image:
image: registry.git.nitrokey.com/nitrokey/nextbox/build-image:latest
rules:
- if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $MAIN_BRANCH'
- if: '$CI_PIPELINE_SOURCE == "pipeline" && $COMMAND_BOT == "nitrokey-ci" && $COMMAND == "build"'
- if: '$CI_PIPELINE_SOURCE == "schedule"'
- if: '$CI_PIPELINE_SOURCE == "web"'
tags:
- docker-arm
stage: build
script:
- pwd
- cd image
- make
after_script:
- !reference [notify_github, script] # use notify_github from include
- mkdir -p artifacts
- cp ./image/gen-image/deploy/*final.zip ./artifacts/
- wget $icon_server/checkmark/$CI_COMMIT_REF_NAME/$CI_COMMIT_SHA/$CI_JOB_NAME/$CI_JOB_STATUS/${CI_JOB_URL#*/*/*/}
artifacts:
paths:
- artifacts