This repository has been archived by the owner on Mar 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.gitlab-ci.yml
93 lines (88 loc) · 2.23 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
variables:
_USER: "builduser"
_PATH: /home/$_USER/$CI_PROJECT_NAME
stages:
- build
build-deb-32-precise:
image: migasfree/deb-ci:32
stage: build
script:
- useradd -m $_USER
- mkdir -p $_PATH
- mv * $_PATH
- pushd $_PATH
- echo "_NWJS_VERSION=0.14.7" > $_PATH/.env
- su -c "/usr/bin/debuild --no-tgz-check -us -uc" $_USER
- popd
- mv /home/$_USER/*.deb .
artifacts:
expire_in: 1 days
paths:
- ./*.deb
only:
- tags
build-deb-32:
image: migasfree/deb-ci:32
stage: build
script:
- useradd -m $_USER
- mkdir -p $_PATH
- mv * $_PATH
- pushd $_PATH
- echo "_NWJS_VERSION=0.31.5" > $_PATH/.env
- su -c "/usr/bin/debuild --no-tgz-check -us -uc" $_USER
- popd
- mv /home/$_USER/*.deb .
artifacts:
expire_in: 1 days
paths:
- ./*.deb
only:
- tags
build-deb-64:
image: migasfree/deb-ci:64
stage: build
script:
- useradd -m $_USER
- mkdir -p $_PATH
- mv * $_PATH
- pushd $_PATH
- echo "_NWJS_VERSION=0.31.5" > $_PATH/.env
- su -c "/usr/bin/debuild --no-tgz-check -us -uc" $_USER
- popd
- mv /home/$_USER/*.deb .
artifacts:
expire_in: 1 days
paths:
- ./*.deb
only:
- tags
build-rpm-64:
image: migasfree/rpm-ci:64
stage: build
script:
- _VERSION=`grep "^Version" rpm/$CI_PROJECT_NAME.spec | awk '{print $2}'`
- _ARCH=`grep "^BuildArchitectures" rpm/$CI_PROJECT_NAME.spec | awk '{print $2}'`
- useradd -m $_USER
- mkdir -p $_PATH/SOURCES/$CI_PROJECT_NAME-$_VERSION
- mkdir -p $_PATH/SPECS
- mkdir -p $_PATH/BUILD
- mkdir -p $_PATH/RPMS
- mkdir -p $_PATH/SRPMS
- mkdir -p $_PATH/BUILDROOT
- chown -R $_USER:$_USER $_PATH
- mv * $_PATH/SOURCES/$CI_PROJECT_NAME-$_VERSION
- mv $_PATH/SOURCES/$CI_PROJECT_NAME-$_VERSION/rpm/* $_PATH/SPECS
- rm -rf $_PATH/SOURCES/rpm/
- pushd $_PATH/SOURCES
- echo "_NWJS_VERSION=0.31.5" > $CI_PROJECT_NAME-$_VERSION/.env
- tar -cvzf $CI_PROJECT_NAME-$_VERSION.tar.gz $CI_PROJECT_NAME-$_VERSION
- su -c "rpmbuild --define '_topdir $_PATH' -ba $_PATH/SPECS/$CI_PROJECT_NAME.spec" $_USER
- popd
- mv $_PATH/RPMS/$_ARCH/*.rpm .
artifacts:
expire_in: 1 days
paths:
- ./*.rpm
only:
- tags