Build and deploy ubuntu impish, hirsute, groovy; debian bullseye; fedora 35, 34, 33

This commit is contained in:
Micah Lee 2021-11-24 12:10:36 -08:00
parent 46a0c60459
commit 314236be89
No known key found for this signature in database
GPG key ID: 403C2657CD994F73

View file

@ -6,15 +6,26 @@ aliases:
command: | command: |
export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true
apt-get update apt-get update
apt-get install -y git ssh ruby-dev rubygems podman python-all dh-python python3 python3-stdeb python3-pyside2.qtcore python3-pyside2.qtgui python3-pyside2.qtwidgets python3-appdirs python3-click python3-xdg python3-requests python3-colorama apt-get install -y git ssh podman python-all dh-python python3 python3-stdeb python3-pyside2.qtcore python3-pyside2.qtgui python3-pyside2.qtwidgets python3-appdirs python3-click python3-xdg python3-requests python3-colorama
gem install -N rake
gem install -N package_cloud - &install-dependencies-rpm
name: Install dependencies (rpm)
command: |
dnf install -y podman git openssh make automake gcc gcc-c++ rpm-build python3-setuptools python3-pyside2 python3-appdirs python3-click python3-pyxdg python3-requests python3-colorama
- &build-deb - &build-deb
name: Build the .deb package name: Build the .deb package
command: | command: |
./install/linux/build-deb.py ./install/linux/build-deb.py
dpkg -i deb_dist/dangerzone_*-1_all.deb dpkg -i deb_dist/dangerzone_*-1_all.deb
ls -lh deb_dist/dangerzone_*-1_all.deb
- &build-rpm
name: Build the .deb package
command: |
./install/linux/build-rpm.py
dnf install -y dist/dangerzone-*-1.noarch.rpm
ls -lh dist/dangerzone-*-1.noarch.rpm
- &restore-cache - &restore-cache
key: v1-{{ .Revision }} key: v1-{{ .Revision }}
@ -33,9 +44,20 @@ aliases:
command: | command: |
VERSION=$(cat share/version.txt) VERSION=$(cat share/version.txt)
if [[ "${PACKAGE_TYPE}" == "deb" ]]; then if [[ "${PACKAGE_TYPE}" == "deb" ]]; then
# install packagecloud.io
apt-get install -y ruby-dev rubygems
gem install -N rake
gem install -N package_cloud
# deploy the package
package_cloud push firstlookmedia/code/${PACKAGECLOUD_DISTO} deb_dist/dangerzone_${VERSION}-1_all.deb package_cloud push firstlookmedia/code/${PACKAGECLOUD_DISTO} deb_dist/dangerzone_${VERSION}-1_all.deb
package_cloud push firstlookmedia/code/${PACKAGECLOUD_DISTO} deb_dist/dangerzone_${VERSION}-1.dsc package_cloud push firstlookmedia/code/${PACKAGECLOUD_DISTO} deb_dist/dangerzone_${VERSION}-1.dsc
elif [[ "${PACKAGE_TYPE}" == "rpm" ]]; then elif [[ "${PACKAGE_TYPE}" == "rpm" ]]; then
# install packagecloud.
dnf install -y ruby-devel
gem install package_cloud
# deploy the package
package_cloud push firstlookmedia/code/${PACKAGECLOUD_DISTO} dist/dangerzone-${VERSION}-1.noarch.rpm package_cloud push firstlookmedia/code/${PACKAGECLOUD_DISTO} dist/dangerzone-${VERSION}-1.noarch.rpm
package_cloud push firstlookmedia/code/${PACKAGECLOUD_DISTO} dist/dangerzone-${VERSION}-1.src.rpm package_cloud push firstlookmedia/code/${PACKAGECLOUD_DISTO} dist/dangerzone-${VERSION}-1.src.rpm
fi fi
@ -92,155 +114,143 @@ jobs:
build-ubuntu-hirsute: build-ubuntu-hirsute:
docker: docker:
# The ubuntu:21.04 container doesn't work in CircleCI until they update - image: ubuntu:21.04
# their docker runtime due to this bug:
# https://stackoverflow.com/questions/66319610/gpg-error-in-ubuntu-21-04-after-second-apt-get-update-during-docker-build
# So for now, we'll build the 21.04 package in a 20.10 container
# - image: ubuntu:21.04
- image: ubuntu:20.10
steps: steps:
- run: - run: *install-dependencies-deb
name: Install dependencies
command: |
export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true
apt-get update
apt-get install -y git ssh ruby-dev rubygems podman python-all dh-python python3 python3-stdeb python3-pyside2.qtcore python3-pyside2.qtgui python3-pyside2.qtwidgets python3-appdirs python3-click python3-xdg python3-requests python3-colorama
gem install -N rake
gem install -N package_cloud
- checkout - checkout
- restore_cache: *restore-cache
- run: *copy-image
- run: *build-deb
deploy-ubuntu-hirsute:
docker:
- image: ubuntu:21.04
steps:
- run: *install-dependencies-deb
- checkout
- restore_cache: *restore-cache
- run: *copy-image
- run: *build-deb
- run: - run:
name: Create the .deb package environment:
command: | PACKAGE_TYPE: "deb"
./install/linux/build-deb.py PACKAGECLOUD_DISTRO: "ubuntu/hirsute"
dpkg -i deb_dist/dangerzone_*-1_all.deb <<: *deploy-packagecloud
- run:
name: Deploy to packagecloud.io
command: |
VERSION=$(cat share/version.txt)
package_cloud push firstlookmedia/code/ubuntu/hirsute deb_dist/dangerzone_${VERSION}-1_all.deb
package_cloud push firstlookmedia/code/ubuntu/hirsute deb_dist/dangerzone_${VERSION}-1.dsc
build-ubuntu-groovy: build-ubuntu-groovy:
docker: docker:
- image: ubuntu:20.10 - image: ubuntu:20.10
steps: steps:
- run: - run: *install-dependencies-deb
name: Install dependencies
command: |
export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true
apt-get update
apt-get install -y git ssh ruby-dev rubygems podman python-all dh-python python3 python3-stdeb python3-pyside2.qtcore python3-pyside2.qtgui python3-pyside2.qtwidgets python3-appdirs python3-click python3-xdg python3-requests python3-colorama
gem install -N rake
gem install -N package_cloud
- checkout - checkout
- restore_cache: *restore-cache
- run: *copy-image
- run: *build-deb
deploy-ubuntu-groovy:
docker:
- image: ubuntu:20.10
steps:
- run: *install-dependencies-deb
- checkout
- restore_cache: *restore-cache
- run: *copy-image
- run: *build-deb
- run: - run:
name: Create the .deb package environment:
command: | PACKAGE_TYPE: "deb"
./install/linux/build-deb.py PACKAGECLOUD_DISTRO: "ubuntu/groovy"
dpkg -i deb_dist/dangerzone_*-1_all.deb <<: *deploy-packagecloud
- run:
name: Deploy to packagecloud.io
command: |
VERSION=$(cat share/version.txt)
package_cloud push firstlookmedia/code/ubuntu/groovy deb_dist/dangerzone_${VERSION}-1_all.deb
package_cloud push firstlookmedia/code/ubuntu/groovy deb_dist/dangerzone_${VERSION}-1.dsc
build-debian-bullseye: build-debian-bullseye:
docker: docker:
- image: debian:bullseye - image: debian:bullseye
steps: steps:
- run: - run: *install-dependencies-deb
name: Install dependencies
command: |
apt-get update
apt-get install -y git ssh ruby-dev rubygems podman python-all dh-python python3 python3-stdeb python3-pyside2.qtcore python3-pyside2.qtgui python3-pyside2.qtwidgets python3-appdirs python3-click python3-xdg python3-requests python3-colorama
gem install -N rake
gem install -N package_cloud
- checkout - checkout
- restore_cache: *restore-cache
- run: *copy-image
- run: *build-deb
deploy-debian-bullseye:
docker:
- image: debian:bullseye
steps:
- run: *install-dependencies-deb
- checkout
- restore_cache: *restore-cache
- run: *copy-image
- run: *build-deb
- run: - run:
name: Create the .deb package environment:
command: | PACKAGE_TYPE: "deb"
./install/linux/build-deb.py PACKAGECLOUD_DISTRO: "debian/bullseye"
dpkg -i deb_dist/dangerzone_*-1_all.deb <<: *deploy-packagecloud
build-fedora-35:
docker:
- image: fedora:35
steps:
- run: *install-dependencies-rpm
- checkout
- restore_cache: *restore-cache
- run: *copy-image
- run: *build-rpm
deploy-fedora-35:
docker:
- image: fedora:35
steps:
- run: *install-dependencies-rpm
- checkout
- restore_cache: *restore-cache
- run: *copy-image
- run: *build-rpm
- run: - run:
name: Deploy to packagecloud.io environment:
command: | PACKAGE_TYPE: "rpm"
VERSION=$(cat share/version.txt) PACKAGECLOUD_DISTRO: "fedora/35"
package_cloud push firstlookmedia/code/debian/bullseye deb_dist/dangerzone_${VERSION}-1_all.deb <<: *deploy-packagecloud
package_cloud push firstlookmedia/code/debian/bullseye deb_dist/dangerzone_${VERSION}-1.dsc
build-fedora-34: build-fedora-34:
docker: docker:
# The package_cloud ruby gem doesn't work properly when installed in fedora 34, - image: fedora:34
# so for now we'll built the fedora 34 package in a fedora:33 container
# - image: fedora:34
- image: fedora:33
steps: steps:
- run: - run: *install-dependencies-rpm
name: Install dependencies
command: |
dnf install -y podman git openssh ruby-devel make automake gcc gcc-c++ rpm-build python3-setuptools python3-pyside2 python3-appdirs python3-click python3-pyxdg python3-requests python3-colorama
gem install package_cloud
- checkout - checkout
- run: - restore_cache: *restore-cache
name: Create the .rpm package - run: *copy-image
command: | - run: *build-rpm
./install/linux/build-rpm.py
dnf install -y dist/dangerzone-*-1.noarch.rpm
- run:
name: Deploy to packagecloud.io
command: |
VERSION=$(cat share/version.txt)
package_cloud push firstlookmedia/code/fedora/34 dist/dangerzone-${VERSION}-1.noarch.rpm
package_cloud push firstlookmedia/code/fedora/34 dist/dangerzone-${VERSION}-1.src.rpm
build-fedora-33: deploy-fedora-34:
docker:
- image: fedora:34
steps:
- run: *install-dependencies-rpm
- checkout
- restore_cache: *restore-cache
- run: *copy-image
- run: *build-rpm
- run:
environment:
PACKAGE_TYPE: "rpm"
PACKAGECLOUD_DISTRO: "fedora/34"
<<: *deploy-packagecloud
deploy-fedora-33:
docker: docker:
- image: fedora:33 - image: fedora:33
steps: steps:
- run: - run: *install-dependencies-rpm
name: Install dependencies
command: |
dnf install -y podman git openssh ruby-devel make automake gcc gcc-c++ rpm-build python3-setuptools python3-pyside2 python3-appdirs python3-click python3-pyxdg python3-requests python3-colorama
gem install package_cloud
- checkout - checkout
- restore_cache: *restore-cache
- run: *copy-image
- run: *build-rpm
- run: - run:
name: Create the .rpm package environment:
command: | PACKAGE_TYPE: "rpm"
./install/linux/build-rpm.py PACKAGECLOUD_DISTRO: "fedora/33"
dnf install -y dist/dangerzone-*-1.noarch.rpm <<: *deploy-packagecloud
- run:
name: Deploy to packagecloud.io
command: |
VERSION=$(cat share/version.txt)
package_cloud push firstlookmedia/code/fedora/33 dist/dangerzone-${VERSION}-1.noarch.rpm
package_cloud push firstlookmedia/code/fedora/33 dist/dangerzone-${VERSION}-1.src.rpm
build-fedora-32:
docker:
- image: fedora:32
steps:
- run:
name: Install dependencies
command: |
dnf install -y podman git openssh ruby-devel make automake gcc gcc-c++ rpm-build python3-setuptools python3-pyside2 python3-appdirs python3-click python3-pyxdg python3-requests python3-colorama
gem install package_cloud
- checkout
- run:
name: Create the .rpm package
command: |
./install/linux/build-rpm.py
dnf install -y dist/dangerzone-*-1.noarch.rpm
- run:
name: Deploy to packagecloud.io
command: |
if [[ ! -z "${SKIP_DEPLOY}" ]]; then
echo "Skipping deploy..."
else
VERSION=$(cat share/version.txt)
package_cloud push firstlookmedia/code/fedora/32 dist/dangerzone-${VERSION}-1.noarch.rpm
package_cloud push firstlookmedia/code/fedora/32 dist/dangerzone-${VERSION}-1.src.rpm
fi
workflows: workflows:
version: 2 version: 2
@ -251,6 +261,24 @@ workflows:
- build-ubuntu-impish: - build-ubuntu-impish:
requires: requires:
- build-container-image - build-container-image
- build-ubuntu-hirsute:
requires:
- build-container-image
- build-ubuntu-groovy:
requires:
- build-container-image
- build-debian-bullseye:
requires:
- build-container-image
- build-fedora-35:
requires:
- build-container-image
- build-fedora-34:
requires:
- build-container-image
- build-fedora-33:
requires:
- build-container-image
build-and-deploy: build-and-deploy:
jobs: jobs:
@ -260,45 +288,57 @@ workflows:
only: /^v.*/ only: /^v.*/
branches: branches:
ignore: /.*/ ignore: /.*/
- deploy-ubuntu-impish:
# Ubuntu 21.10 (impish) not yet supported by packagecloud.io requires:
# - build-ubuntu-impish:  - build-container-image
# filters:
# tags:
# only: /^v.*/
# branches:
# ignore: /.*/
- build-ubuntu-hirsute:
filters: filters:
tags: tags:
only: /^v.*/ only: /^v.*/
branches: branches:
ignore: /.*/ ignore: /.*/
- build-ubuntu-groovy: - deploy-ubuntu-hirsute:
requires:
- build-container-image
filters: filters:
tags: tags:
only: /^v.*/ only: /^v.*/
branches: branches:
ignore: /.*/ ignore: /.*/
- build-debian-bullseye: - deploy-ubuntu-groovy:
requires:
- build-container-image
filters: filters:
tags: tags:
only: /^v.*/ only: /^v.*/
branches: branches:
ignore: /.*/ ignore: /.*/
- build-fedora-34: - deploy-debian-bullseye:
requires:
- build-container-image
filters: filters:
tags: tags:
only: /^v.*/ only: /^v.*/
branches: branches:
ignore: /.*/ ignore: /.*/
- build-fedora-33: - deploy-fedora-35:
requires:
- build-container-image
filters: filters:
tags: tags:
only: /^v.*/ only: /^v.*/
branches: branches:
ignore: /.*/ ignore: /.*/
- build-fedora-32: - deploy-fedora-34:
requires:
- build-container-image
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/
- deploy-fedora-33:
requires:
- build-container-image
filters: filters:
tags: tags:
only: /^v.*/ only: /^v.*/