forked from OpenMPDK/dss-ecosystem
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
68 lines (60 loc) · 1.63 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
variables:
BRANCH_NAME: $CI_COMMIT_BRANCH
SONAR_BRANCH: -Dsonar.branch.name=$CI_COMMIT_BRANCH
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
variables:
BRANCH_NAME: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME
SONAR_BRANCH: ''
- if: $CI_COMMIT_BRANCH == "master" && $CI_PIPELINE_SOURCE == "push"
- if: $CI_COMMIT_BRANCH =~ /^(stable|feature)\/.*/ && $CI_PIPELINE_SOURCE == "push"
image:
name: dss-build_$BRANCH_NAME
cache:
paths:
- bw-output
- dss_client/build
stages:
- build
- scan
- lint
build dss_client:
stage: build
script:
- git config --global http.sslVerify false
- ./dss_client/scripts/getrdddeps.sh
- build-wrapper-linux-x86-64 --out-dir bw-output/ ./dss_client/scripts/build.sh
- /stagemergeartifacts.sh
variables:
DSSGLOBLIST: "dss_client-*.tgz"
artifacts:
paths:
- dss_client/dss_client-*.tgz
package datamover:
stage: build
script:
- git config --global http.sslVerify false
- git fetch --tags
- export RELEASESTRING=$(git describe --tags --exact-match 2>/dev/null || git rev-parse --short HEAD)
- git archive --format=tgz -19 --output="nkv-datamover-$RELEASESTRING.tgz" HEAD:dss_datamover
- /stagemergeartifacts.sh
variables:
DSSGLOBLIST: "nkv-datamover-*.tgz"
artifacts:
paths:
- nkv-datamover-*.tgz
sonar-scanner:
stage: scan
script:
- sonar-scanner $SONAR_BRANCH
allow_failure: true
pycodestyle:
stage: lint
script: "pycodestyle $PROJECT --show-source --show-pep8"
parallel:
matrix:
- PROJECT:
- dss_ai_benchmark
- dss_client
- dss_datamover