mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-29 18:22:37 +02:00
Refactor build-ubuntu-impish to use aliases, and define separate deploy-ubuntu-impish
This commit is contained in:
parent
92012c3699
commit
57ff5deac8
1 changed files with 58 additions and 30 deletions
|
@ -1,5 +1,45 @@
|
||||||
version: 2.1
|
version: 2.1
|
||||||
|
|
||||||
|
aliases:
|
||||||
|
- &install-dependencies-deb
|
||||||
|
name: Install dependencies (deb)
|
||||||
|
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
|
||||||
|
|
||||||
|
- &build-deb
|
||||||
|
name: Build the .deb package
|
||||||
|
command: |
|
||||||
|
./install/linux/build-deb.py
|
||||||
|
dpkg -i deb_dist/dangerzone_*-1_all.deb
|
||||||
|
|
||||||
|
- &restore-cache
|
||||||
|
key: v1-{{ .Revision }}
|
||||||
|
paths:
|
||||||
|
- /caches/dangerzone-converter.tar.gz
|
||||||
|
- /caches/image-id.txt
|
||||||
|
|
||||||
|
- ©-image
|
||||||
|
name: Copy container image into package
|
||||||
|
command: |
|
||||||
|
cp /caches/dangerzone-converter.tar.gz share/
|
||||||
|
cp /caches/image-id.txt share/
|
||||||
|
|
||||||
|
- &deploy-packagecloud
|
||||||
|
name: Deploy to packagecloud.io
|
||||||
|
command: |
|
||||||
|
VERSION=$(cat share/version.txt)
|
||||||
|
if [[ "${PACKAGE_TYPE}" == "deb" ]]; then
|
||||||
|
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
|
||||||
|
elif [[ "${PACKAGE_TYPE}" == "rpm" ]]; then
|
||||||
|
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
|
||||||
|
fi
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-container-image:
|
build-container-image:
|
||||||
working_directory: /app
|
working_directory: /app
|
||||||
|
@ -29,36 +69,26 @@ jobs:
|
||||||
docker:
|
docker:
|
||||||
- image: ubuntu:21.10
|
- image: ubuntu:21.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: *restore-cache
|
||||||
key: v1-{{ .Revision }}
|
- run: *copy-image
|
||||||
paths:
|
- run: *build-deb
|
||||||
- /caches/dangerzone-converter.tar.gz
|
|
||||||
- /caches/image-id.txt
|
deploy-ubuntu-impish:
|
||||||
|
docker:
|
||||||
|
- image: ubuntu:21.10
|
||||||
|
steps:
|
||||||
|
- run: *install-dependencies-deb
|
||||||
|
- checkout
|
||||||
|
- restore_cache: *restore-cache
|
||||||
|
- run: *copy-image
|
||||||
|
- run: *build-deb
|
||||||
- run:
|
- run:
|
||||||
name: Copy container image into package
|
environment:
|
||||||
command: |
|
PACKAGE_TYPE: "deb"
|
||||||
cp /caches/dangerzone-converter.tar.gz share/
|
PACKAGECLOUD_DISTRO: "ubuntu/impish"
|
||||||
cp /caches/image-id.txt share/
|
<<: *deploy-packagecloud
|
||||||
- run:
|
|
||||||
name: Create the .deb package
|
|
||||||
command: |
|
|
||||||
./install/linux/build-deb.py
|
|
||||||
dpkg -i deb_dist/dangerzone_*-1_all.deb
|
|
||||||
- run:
|
|
||||||
name: Deploy to packagecloud.io
|
|
||||||
command: |
|
|
||||||
VERSION=$(cat share/version.txt)
|
|
||||||
package_cloud push firstlookmedia/code/ubuntu/impish deb_dist/dangerzone_${VERSION}-1_all.deb
|
|
||||||
package_cloud push firstlookmedia/code/ubuntu/impish deb_dist/dangerzone_${VERSION}-1.dsc
|
|
||||||
|
|
||||||
build-ubuntu-hirsute:
|
build-ubuntu-hirsute:
|
||||||
docker:
|
docker:
|
||||||
|
@ -219,8 +249,6 @@ workflows:
|
||||||
jobs:
|
jobs:
|
||||||
- build-container-image
|
- build-container-image
|
||||||
- build-ubuntu-impish:
|
- build-ubuntu-impish:
|
||||||
environment:
|
|
||||||
SKIP_DEPLOY: 1
|
|
||||||
requires:
|
requires:
|
||||||
- build-container-image
|
- build-container-image
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue