-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
36 lines (32 loc) · 1.36 KB
/
.gitlab-ci.yml
File metadata and controls
36 lines (32 loc) · 1.36 KB
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
image: docker.uib.gmbh/opsi/dev/pybuilder:uib-python-default
stages:
- package
- test
package:makeopsipackage:
stage: package
rules:
- if: $CI_COMMIT_TAG
when: always
- when: manual
script:
- sed -i s'/# de_DE.UTF-8 UTF-8/de_DE.UTF-8 UTF-8/' /etc/locale.gen
- locale-gen
- opsi-dev-tool --binary-pull
- version=`grep OPSI/control -A 10 -e "\[Product\]" | grep "version:" | tr -d "^a-zA-Z :"`
- package=`grep OPSI/control -A 5 -e "\[Package\]" | grep "version:" | tr -d "^a-zA-Z :"`
- '[ "$CI_COMMIT_TAG" = "" ] && sed -i "0,/version: $package\$/s/version: $package\$/version: $package.$CI_JOB_ID/" OPSI/control'
- LC_ALL="de_DE.UTF-8" opsi-makepackage --no-set-rights -l 6
- upload-package opsi-script-test*.opsi
artifacts:
name: controlfile
paths:
- OPSI/control
test:win10:
stage: test
when: manual
script:
- echo "starting jenkins job via POST request"
- version=$(grep OPSI/control -A 10 -e "\[Product\]" | grep "version:" | tr -d "^a-zA-Z :")
- package=$(grep OPSI/control -A 5 -e "\[Package\]" | grep "version:" | tr -d "^a-zA-Z :")
# any opsi-script-test version x-y~z is testing opsi-script x.y (no prerelease)
- opsi-dev-cli -l info jenkins test --dependencies="{\"opsi-script\":\"$version-$(echo $package | cut -f 1 -d '.')\"}" --versions="$version-$(echo $package | tr '.' '~')"