-
Notifications
You must be signed in to change notification settings - Fork 152
/
.gitlab-ci-disabled.yml
130 lines (122 loc) · 3.22 KB
/
.gitlab-ci-disabled.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
.only-default: &only-default
only:
- branches
except:
- master
stages:
- documentation
- deploy
- sourcepackage
- packages
variables:
LANG: en_US.UTF-8
BUILD_IMAGES_PROJECT: kiwi3/kiwi-ci-containers
TUMBLEWEED_BUILD: buildenv-tumbleweed
FEDORA_BUILD: buildenv-fedora
build_doc:
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$TUMBLEWEED_BUILD
stage: documentation
<<: *only-default
script:
- tox -e packagedoc
artifacts:
paths:
- doc/build/
cache:
key: "$CI_JOB_NAME"
paths:
- doc/build
build_suse_doc:
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$TUMBLEWEED_BUILD
stage: documentation
only:
- branches
script:
- tox -e doc_suse
artifacts:
paths:
- doc/build/
push_suse_doc:
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$TUMBLEWEED_BUILD
stage: deploy
only:
- master
script:
- "export GIT_SSH=$(pwd)/run_ssh"
- "export ID_DOC_SUSE=$(pwd)/id_doc_suse"
- echo 'exec ssh -o StrictHostKeyChecking=no -i $ID_DOC_SUSE "$@"' > run_ssh
- chmod u+x run_ssh
- base64 --decode "$DOC_SUSE_SECRET" > id_doc_suse
- chmod 600 id_doc_suse
- git clone git@github.com:OSInside/kiwi-suse-doc.git /tmp/kiwi-suse-doc
- cp doc/DC-kiwi /tmp/kiwi-suse-doc/doc/build
- cp doc/source/.images/* /tmp/kiwi-suse-doc/doc/build/images/src/png
- cp doc/build/xml/book.xml /tmp/kiwi-suse-doc/doc/build/xml
- git config --global user.email "kiwi-internal@suse.de"
- git config --global user.name "SUSE KIWI Team"
- cd /tmp/kiwi-suse-doc
- git add .
- git commit -a -m "upstream sync" && git push || true
dependencies:
- build_suse_doc
rpm_source_package:
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD
stage: sourcepackage
<<: *only-default
script:
- groupadd -f -g 135 -r mock # workaround RHBZ#1740545
- 'sed -i "s|build: clean tox|build:|" Makefile'
- make build
- mv dist/python-kiwi.spec .
- rm dist/python-kiwi.changes
- >
mock
--isolation=simple -r /etc/mock/fedora-33-x86_64.cfg
--buildsrpm --sources ./dist
--resultdir $(pwd)/mock-result-srpm
--spec ./python-kiwi.spec 2>&1 | tee srpm_build_out
artifacts:
when: always
paths:
- srpm_build_out
- mock-result-srpm
expire_in: 1 week
rpm_fedora_33:
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD
stage: packages
<<: *only-default
script:
- "export SRC_RPM=$(ls mock-result-srpm/*kiwi*)"
- cp $SRC_RPM .
- >
mock
--isolation=simple
--resultdir $(pwd)/mock-result-fedora
-r /etc/mock/fedora-33-x86_64.cfg $(basename $SRC_RPM)
artifacts:
when: always
paths:
- mock-result-fedora
expire_in: 1 week
dependencies:
- rpm_source_package
rpm_suse_TW:
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD
stage: packages
<<: *only-default
script:
- "export SRC_RPM=$(ls mock-result-srpm/*kiwi*)"
- cp $SRC_RPM .
- >
mock
--isolation=simple
--resultdir $(pwd)/mock-result-tw
-r /etc/mock/opensuse-tumbleweed-x86_64.cfg $(basename $SRC_RPM)
artifacts:
when: always
paths:
- mock-result-tw
expire_in: 1 week
allow_failure: true
dependencies:
- rpm_source_package