#/* # *.gitlab-ci.yml # * # * Copyright 2018 Raju Devidas # * # * 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. # * # * # */ # Defines stages each corresponding to a separate hamara-package # This build file is written for hamara svastik stages: - build-calamares-settings-hamara - build-hamara-config - build-hamara-gnome-meta - build-hamara-keyring-2016.5 - build-hamara-live - build-hamara-theme-1.0 - 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 before_script: - 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: name: rajudev/hamara-builder:amd64 allow_failure: true dependencies: [] 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" - cp ../*.deb ../*.dsc ../*.changes ../*.tar.* ../*.buildinfo /incoming/ artifacts: untracked: true expire_in: 1 day #---------------------------------------------------------------------------------------------------------------- build-hamara-config: stage: build-hamara-config image: name: rajudev/hamara-builder:amd64 allow_failure: true dependencies: [] script: - cd packages/hamara-config/ - 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" - cp ../*.deb ../*.dsc ../*.changes ../*.tar.* ../*.buildinfo /incoming/ artifacts: untracked: true expire_in: 1 day #---------------------------------------------------------------------------------------------------------------- build-hamara-gnome-meta: stage: build-hamara-gnome-meta image: name: rajudev/hamara-builder:amd64 allow_failure: true dependencies: [] script: - cd packages/hamara-gnome-meta/ - 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" - cp ../*.deb ../*.dsc ../*.changes ../*.tar.* ../*.buildinfo /incoming/ artifacts: untracked: true expire_in: 1 day #---------------------------------------------------------------------------------------------------------------- build-hamara-keyring-2016.5: stage: build-hamara-keyring-2016.5 image: name: rajudev/hamara-builder:amd64 allow_failure: true dependencies: [] script: - cd packages/hamara-keyring-2016.5/ - 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" - cp ../*.deb ../*.dsc ../*.changes ../*.tar.* ../*.buildinfo /incoming/ artifacts: untracked: true expire_in: 1 day #---------------------------------------------------------------------------------------------------------------- build-hamara-live: stage: build-hamara-live image: name: rajudev/hamara-builder:amd64 allow_failure: true dependencies: [] script: - cd packages/hamara-live/ - 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" - cp ../*.deb ../*.dsc ../*.changes ../*.tar.* ../*.buildinfo /incoming/ artifacts: untracked: true expire_in: 1 day #---------------------------------------------------------------------------------------------------------------- build-hamara-theme-1.0: stage: build-hamara-theme-1.0 image: name: rajudev/hamara-builder:amd64 allow_failure: true dependencies: [] script: - cd packages/hamara-theme-1.0/ - 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" - cp ../*.deb ../*.dsc ../*.changes ../*.tar.* ../*.buildinfo /incoming/ artifacts: untracked: true expire_in: 1 day #---------------------------------------------------------------------------------------------------------------- build-hamara-wallpapers: stage: build-hamara-wallpapers image: name: rajudev/hamara-builder:amd64 allow_failure: true dependencies: [] script: - cd packages/hamara-wallpapers/ - 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" - cp ../*.deb ../*.dsc ../*.changes ../*.tar.* ../*.buildinfo /incoming/ artifacts: untracked: true expire_in: 1 day #---------------------------------------------------------------------------------------------------------------- build-hamara-welcome: stage: build-hamara-welcome image: name: rajudev/hamara-builder:amd64 allow_failure: true dependencies: [] script: - cd packages/hamara-welcome - 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" - cp ../*.deb ../*.dsc ../*.changes ../*.tar.* ../*.buildinfo /incoming/ artifacts: untracked: true expire_in: 1 day #---------------------------------------------------------------------------------------------------------------- build-plymouth-theme-hamara: stage: build-plymouth-theme-hamara image: name: rajudev/hamara-builder:amd64 allow_failure: true dependencies: [] 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" - cp ../*.deb ../*.dsc ../*.changes ../*.tar.* ../*.buildinfo /incoming/ artifacts: untracked: true expire_in: 1 day #----------------------------------------------------------------------------------------------------------------