.gitlab-ci.yml 10.1 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
#/*
# *.gitlab-ci.yml
# *
# * Copyright 2018 Raju Devidas <raju@hamaralinux.org>
# *
# * This program is free software; you can redistribute it and/or modify
# * it under the terms of the GNU General Public License as published by
# * the Free Software Foundation; either version 2 of the License, or
# * (at your option) any later version.
# *
# * This program is distributed in the hope that it will be useful,
# * but WITHOUT ANY WARRANTY; without even the implied warranty of
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# * GNU General Public License for more details.
# *
# * You should have received a copy of the GNU General Public License
# * along with this program; if not, write to the Free Software
# * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# * MA 02110-1301, USA.
# *
# *
# */
23

24
# Defines stages each corresponding to a separate hamara-package
25
# This build file is written for hamara svastik
26 27
stages:
    - build-calamares-settings-hamara
28 29
    - build-hamara-config
    - build-hamara-gnome-meta
30 31
    - build-hamara-keyring-2016.5
    - build-hamara-live
32
    - build-hamara-theme-1.0
33 34 35 36 37 38 39
    - build-hamara-wallpapers
    - build-hamara-welcome
    - build-plymouth-theme-hamara

# These steps will run before each build.
# They are included here to avoid repetition of same code on later stages.
# similar to a macro
40 41

before_script:
42 43 44 45 46 47 48 49 50 51 52 53
   - export DEBIAN_FRONTEND=noninteractive
   - echo "Preparing the container for builds"
   - apt update
   - apt-get -y upgrade
   - apt-get -y dist-upgrade
   - apt-get -y install apt-utils figlet dpkg-dev fakeroot git-buildpackage lintian pristine-tar
   - figlet BUILD

#----------------------------------------------------------------------------------------------------------------
build-calamares-settings-hamara:
    stage: build-calamares-settings-hamara
    image:
54
        name: rajudev/hamara-builder:amd64
55
    allow_failure: true
56
    dependencies: []
57 58 59 60 61 62 63 64 65 66 67 68

    script:
        - cd packages/calamares-settings-hamara/
        - export BUILD_DEPENDS=`perl -ne 'next if /^#/; $p=(s/^Build-Depends:\s*/ / or (/^ / and $p)); s/,|\n|\([^)]+\)//mg; print if $p' < debian/control`
        - apt-get install -y --no-install-recommends $BUILD_DEPENDS
        - apt-get -y autoremove --purge
        - apt-get clean
        - rm -rf /var/lib/apt/lists/*
        - dpkg-buildpackage -us -uc
        - ls -al / # test the directory structure presence
        #copy the contents of the package to the incoming directory
        - echo "Deploying packages to repositories"
69
        - cp ../*.deb ../*.dsc ../*.changes ../*.tar.* ../*.buildinfo /incoming/
70 71 72 73 74 75 76

    artifacts:
        untracked: true
        expire_in: 1 day

#----------------------------------------------------------------------------------------------------------------

77

78 79
build-hamara-config:
    stage: build-hamara-config
80
    image:
81
        name: rajudev/hamara-builder:amd64
82 83
    allow_failure: true
    dependencies: []
84

85
    script:
86
        - cd packages/hamara-config/
87 88 89 90 91 92 93 94
        - export BUILD_DEPENDS=`perl -ne 'next if /^#/; $p=(s/^Build-Depends:\s*/ / or (/^ / and $p)); s/,|\n|\([^)]+\)//mg; print if $p' < debian/control`
        - apt-get install -y --no-install-recommends $BUILD_DEPENDS
        - apt-get -y autoremove --purge
        - apt-get clean
        - rm -rf /var/lib/apt/lists/*
        - dpkg-buildpackage -us -uc
        - ls -al / # test the directory structure presence
        - echo "Deploying packages to repositories"
95
        - cp ../*.deb ../*.dsc ../*.changes ../*.tar.* ../*.buildinfo /incoming/
96 97 98 99

    artifacts:
        untracked: true
        expire_in: 1 day
100

101 102

#----------------------------------------------------------------------------------------------------------------
103 104


105 106
build-hamara-gnome-meta:
    stage: build-hamara-gnome-meta
107
    image:
108
        name: rajudev/hamara-builder:amd64
109 110 111 112
    allow_failure: true
    dependencies: []

    script:
113
        - cd packages/hamara-gnome-meta/
114 115 116 117 118 119 120 121
        - export BUILD_DEPENDS=`perl -ne 'next if /^#/; $p=(s/^Build-Depends:\s*/ / or (/^ / and $p)); s/,|\n|\([^)]+\)//mg; print if $p' < debian/control`
        - apt-get install -y --no-install-recommends $BUILD_DEPENDS
        - apt-get -y autoremove --purge
        - apt-get clean
        - rm -rf /var/lib/apt/lists/*
        - dpkg-buildpackage -us -uc
        - ls -al / # test the directory structure presence
        - echo "Deploying packages to repositories"
122
        - cp ../*.deb ../*.dsc ../*.changes ../*.tar.* ../*.buildinfo /incoming/
123 124 125 126

    artifacts:
        untracked: true
        expire_in: 1 day
127

128

129 130
#----------------------------------------------------------------------------------------------------------------

131 132
build-hamara-keyring-2016.5:
    stage: build-hamara-keyring-2016.5
133
    image:
134
        name: rajudev/hamara-builder:amd64
135
    allow_failure: true
136
    dependencies: []
137 138

    script:
139
        - cd packages/hamara-keyring-2016.5/
140 141 142 143 144 145 146 147
        - export BUILD_DEPENDS=`perl -ne 'next if /^#/; $p=(s/^Build-Depends:\s*/ / or (/^ / and $p)); s/,|\n|\([^)]+\)//mg; print if $p' < debian/control`
        - apt-get install -y --no-install-recommends $BUILD_DEPENDS
        - apt-get -y autoremove --purge
        - apt-get clean
        - rm -rf /var/lib/apt/lists/*
        - dpkg-buildpackage -us -uc
        - ls -al / # test the directory structure presence
        - echo "Deploying packages to repositories"
148
        - cp ../*.deb ../*.dsc ../*.changes ../*.tar.* ../*.buildinfo /incoming/
149 150 151 152 153 154

    artifacts:
        untracked: true
        expire_in: 1 day
#----------------------------------------------------------------------------------------------------------------

155 156
build-hamara-live:
    stage: build-hamara-live
157
    image:
158
        name: rajudev/hamara-builder:amd64
159
    allow_failure: true
160
    dependencies: []
161 162

    script:
163
        - cd packages/hamara-live/
164 165 166 167 168 169 170 171
        - export BUILD_DEPENDS=`perl -ne 'next if /^#/; $p=(s/^Build-Depends:\s*/ / or (/^ / and $p)); s/,|\n|\([^)]+\)//mg; print if $p' < debian/control`
        - apt-get install -y --no-install-recommends $BUILD_DEPENDS
        - apt-get -y autoremove --purge
        - apt-get clean
        - rm -rf /var/lib/apt/lists/*
        - dpkg-buildpackage -us -uc
        - ls -al / # test the directory structure presence
        - echo "Deploying packages to repositories"
172
        - cp ../*.deb ../*.dsc ../*.changes ../*.tar.* ../*.buildinfo /incoming/
173 174 175 176 177 178 179

    artifacts:
        untracked: true
        expire_in: 1 day

#----------------------------------------------------------------------------------------------------------------

180 181
build-hamara-theme-1.0:
    stage: build-hamara-theme-1.0
182
    image:
183
        name: rajudev/hamara-builder:amd64
184
    allow_failure: true
185
    dependencies: []
186 187

    script:
188
        - cd packages/hamara-theme-1.0/
189 190 191 192 193 194 195 196
        - export BUILD_DEPENDS=`perl -ne 'next if /^#/; $p=(s/^Build-Depends:\s*/ / or (/^ / and $p)); s/,|\n|\([^)]+\)//mg; print if $p' < debian/control`
        - apt-get install -y --no-install-recommends $BUILD_DEPENDS
        - apt-get -y autoremove --purge
        - apt-get clean
        - rm -rf /var/lib/apt/lists/*
        - dpkg-buildpackage -us -uc
        - ls -al / # test the directory structure presence
        - echo "Deploying packages to repositories"
197
        - cp ../*.deb ../*.dsc ../*.changes ../*.tar.* ../*.buildinfo /incoming/
198 199 200 201 202 203 204

    artifacts:
        untracked: true
        expire_in: 1 day

#----------------------------------------------------------------------------------------------------------------

205 206
build-hamara-wallpapers:
    stage: build-hamara-wallpapers
207
    image:
208
        name: rajudev/hamara-builder:amd64
209
    allow_failure: true
210
    dependencies: []
211 212

    script:
213
        - cd packages/hamara-wallpapers/
214 215 216 217 218 219 220 221
        - export BUILD_DEPENDS=`perl -ne 'next if /^#/; $p=(s/^Build-Depends:\s*/ / or (/^ / and $p)); s/,|\n|\([^)]+\)//mg; print if $p' < debian/control`
        - apt-get install -y --no-install-recommends $BUILD_DEPENDS
        - apt-get -y autoremove --purge
        - apt-get clean
        - rm -rf /var/lib/apt/lists/*
        - dpkg-buildpackage -us -uc
        - ls -al / # test the directory structure presence
        - echo "Deploying packages to repositories"
222
        - cp ../*.deb ../*.dsc ../*.changes ../*.tar.* ../*.buildinfo /incoming/
223 224 225 226 227 228 229

    artifacts:
        untracked: true
        expire_in: 1 day

#----------------------------------------------------------------------------------------------------------------

230 231
build-hamara-welcome:
    stage: build-hamara-welcome
232
    image:
233
        name: rajudev/hamara-builder:amd64
234
    allow_failure: true
235
    dependencies: []
236 237

    script:
238
        - cd packages/hamara-welcome
239 240 241 242 243 244 245 246
        - export BUILD_DEPENDS=`perl -ne 'next if /^#/; $p=(s/^Build-Depends:\s*/ / or (/^ / and $p)); s/,|\n|\([^)]+\)//mg; print if $p' < debian/control`
        - apt-get install -y --no-install-recommends $BUILD_DEPENDS
        - apt-get -y autoremove --purge
        - apt-get clean
        - rm -rf /var/lib/apt/lists/*
        - dpkg-buildpackage -us -uc
        - ls -al / # test the directory structure presence
        - echo "Deploying packages to repositories"
247
        - cp ../*.deb ../*.dsc ../*.changes ../*.tar.* ../*.buildinfo /incoming/
248

249 250 251
    artifacts:
        untracked: true
        expire_in: 1 day
252

253
#----------------------------------------------------------------------------------------------------------------
254

255 256 257
build-plymouth-theme-hamara:
    stage: build-plymouth-theme-hamara
    image:
258
        name: rajudev/hamara-builder:amd64
259
    allow_failure: true
260
    dependencies: []
261

262 263 264 265 266 267 268 269 270 271
    script:
        - cd packages/plymouth-theme-hamara
        - export BUILD_DEPENDS=`perl -ne 'next if /^#/; $p=(s/^Build-Depends:\s*/ / or (/^ / and $p)); s/,|\n|\([^)]+\)//mg; print if $p' < debian/control`
        - apt-get install -y --no-install-recommends $BUILD_DEPENDS
        - apt-get -y autoremove --purge
        - apt-get clean
        - rm -rf /var/lib/apt/lists/*
        - dpkg-buildpackage -us -uc
        - ls -al / # test the directory structure presence
        - echo "Deploying packages to repositories"
272
        - cp ../*.deb ../*.dsc ../*.changes ../*.tar.* ../*.buildinfo /incoming/
273 274 275 276
    artifacts:
        untracked: true
        expire_in: 1 day
#----------------------------------------------------------------------------------------------------------------