-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.gitlab-ci.yml
57 lines (45 loc) · 1.64 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
stages:
- build
- upload
- release
build_vipm_pkg:
variables:
GIT_DEPTH: 0 # this is needed so build numbers calculate correctly. It is based on number of commits in entire repository.
GIT_STRATEGY: clone
stage: build
tags:
- LV20x64
script:
- 'g-cli clearlvcache'
- 'g-cli --kill vitester -- -r UnitTestReport.xml Approval\ Testing.lvproj'
- 'g-cli --kill vipb -- -av -b Approval\ Tests\\Approval\ Tests.vipb -rn release-notes.txt -t 600'
artifacts:
paths:
- build/
- UnitTestReport.xml
reports:
junit: UnitTestReport.xml
when: always
release_job:
stage: release
image: registry.gitlab.com/gitlab-org/release-cli:latest
rules:
- if: $CI_COMMIT_TAG =~ /[0-9]*.[0-9]*.[0-9]/ # Run this job when a tag is created manually
script:
- 'echo "creating release"'
release:
name: 'Release $CI_COMMIT_TAG'
description: '$(cat release-notes.txt)'
tag_name: '$CI_COMMIT_TAG'
ref: '$CI_COMMIT_TAG'
assets:
links:
- name: '$(ls -t build | head -1)'
url: '${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/approval-tests/${CI_COMMIT_TAG}/$(ls -t build/ | head -1)'
upload_job:
stage: upload
image: registry.gitlab.com/sas_public/curl-jq
rules:
- if: $CI_COMMIT_TAG =~ /[0-9]*.[0-9]*.[0-9]/ # Run this job when a tag is created manually
script:
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file "build/$(ls -t build/ | head -1)" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/approval-tests/${CI_COMMIT_TAG}/$(ls -t build/ | head -1)"'