-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
70 lines (65 loc) · 1.39 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
stages:
- lint
- build
- test
lint:yaml:
image: python:alpine
stage: lint
before_script:
- pip install yamllint
script:
- yamllint meta/*.yml
build:debian:
image: ligo/base:stretch
stage: build
dependencies: []
before_script:
- apt-get update
- apt-get --assume-yes install equivs ruby
script:
- ruby generate.rb
- for i in stage/*/deb/; do ( cd $i; equivs-build control ); done
- mkdir debs
- for i in stage/*/deb/*.deb; do cp $i debs; done
artifacts:
expire_in: 3h
paths:
- debs
build:rhel:
image: ligo/base:el7
stage: build
dependencies: []
before_script:
- yum --assumeyes install rpm-build rpmlint ruby
script:
- ruby generate.rb
- |
for i in stage/*/rpm/*.spec; do
rpmlint $i
rpmbuild -ba --define "_topdir $CI_PROJECT_DIR/rpmbuild" $i
done
- mkdir rpms srpms
- mv rpmbuild/RPMS/noarch/*.rpm rpms
- mv rpmbuild/SRPMS/*.rpm srpms
artifacts:
expire_in: 3h
paths:
- rpms
- srpms
test:debian:
image: ligo/base:stretch
stage: test
dependencies:
- build:debian
script:
- apt-get update
- apt-get --assume-yes upgrade
- dpkg -i debs/*.deb || apt-get --assume-yes -f install
test:rhel:
image: ligo/base:el7
stage: test
dependencies:
- build:rhel
script:
- yum --assumeyes update
- yum --assumeyes localinstall rpms/*.rpm