From 3ae1bfefed89cc0cd127a1dc2a378c6a8c309938 Mon Sep 17 00:00:00 2001 From: Micah Lee Date: Mon, 2 Dec 2019 13:47:11 -0800 Subject: [PATCH 1/4] Switch to CircleCI 2.1, and move workflows to the bottom --- .circleci/config.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c2421ac..823c520 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,13 +1,7 @@ -workflows: - version: 2 - test: - jobs: - - test -version: 2 +version: 2.1 + jobs: test: - environment: - FLM_ENV: "test" docker: - image: circleci/python:3.7-buster steps: @@ -17,7 +11,7 @@ jobs: sudo apt-get update sudo apt-get install -y gnupg2 python3-pyqt5 tor xvfb - run: - name: start tor service + name: Start tor service command: sudo service tor start - checkout - run: @@ -26,3 +20,9 @@ jobs: - run: name: Run tests command: pipenv run xvfb-run -s "-screen 0 1280x1024x24" python setup.py pytest + +workflows: + version: 2 + test: + jobs: + - test From 2c9ce44616dbdeda3b51f0ed97e010aaf426a787 Mon Sep 17 00:00:00 2001 From: Micah Lee Date: Mon, 2 Dec 2019 14:07:05 -0800 Subject: [PATCH 2/4] Build and deploy packages using CircleCI on tags for ubuntu 18.04, 19.04, and 19.10 --- .circleci/config.yml | 93 ++++++++++++++++++++++++++++++++++++++++++++ install/build_deb.sh | 3 ++ 2 files changed, 96 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 823c520..cad4514 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,6 +1,7 @@ version: 2.1 jobs: + test: docker: - image: circleci/python:3.7-buster @@ -21,8 +22,100 @@ jobs: name: Run tests command: pipenv run xvfb-run -s "-screen 0 1280x1024x24" python setup.py pytest + build-ubuntu-bionic: + docker: + - image: ubuntu:18.04 + steps: + - run: + name: Install dependencies + command: | + apt-get update + DEBIAN_FRONTEND=noninteractive apt-get install -y git ssh ruby-dev rubygems build-essential fakeroot python-all python3-all dh-python python3-pyqt5 python3-stdeb python3-requests python3-socks python3-packaging python3-dateutil python3-pytest python3-pytest-runner gnupg2 + gem install --no-ri --no-rdoc rake + gem install --no-ri --no-rdoc package_cloud + - checkout + - run: + name: Create the .deb package + command: | + ./install/build_deb.sh + dpkg -i deb_dist/gpgsync_*.deb + - run: + name: Deploy to packagecloud.io + command: | + VERSION=$(cat share/version |cut -dv -f2) + package_cloud push firstlookmedia/code/ubuntu/bionic deb_dist/gpgsync_${VERSION}-1_all.deb + package_cloud push firstlookmedia/code/ubuntu/bionic deb_dist/gpgsync_${VERSION}-1.dsc + + build-ubuntu-disco: + docker: + - image: ubuntu:19.04 + steps: + - run: + name: Install dependencies + command: | + apt-get update + DEBIAN_FRONTEND=noninteractive apt-get install -y git ssh ruby-dev rubygems build-essential fakeroot python-all python3-all dh-python python3-pyqt5 python3-stdeb python3-requests python3-socks python3-packaging python3-dateutil python3-pytest python3-pytest-runner gnupg2 + gem install --no-ri --no-rdoc rake + gem install --no-ri --no-rdoc package_cloud + - checkout + - run: + name: Create the .deb package + command: | + ./install/build_deb.sh + dpkg -i deb_dist/gpgsync_*.deb + - run: + name: Deploy to packagecloud.io + command: | + VERSION=$(cat share/version |cut -dv -f2) + package_cloud push firstlookmedia/code/ubuntu/disco deb_dist/gpgsync_${VERSION}-1_all.deb + package_cloud push firstlookmedia/code/ubuntu/disco deb_dist/gpgsync_${VERSION}-1.dsc + + build-ubuntu-eoan: + docker: + - image: ubuntu:19.10 + steps: + - run: + name: Install dependencies + command: | + apt-get update + DEBIAN_FRONTEND=noninteractive apt-get install -y git ssh ruby-dev rubygems build-essential fakeroot python-all python3-all dh-python python3-pyqt5 python3-stdeb python3-requests python3-socks python3-packaging python3-dateutil python3-pytest python3-pytest-runner gnupg2 + gem install --no-ri --no-rdoc rake + gem install --no-ri --no-rdoc package_cloud + - checkout + - run: + name: Create the .deb package + command: | + ./install/build_deb.sh + dpkg -i deb_dist/gpgsync_*.deb + - run: + name: Deploy to packagecloud.io + command: | + VERSION=$(cat share/version |cut -dv -f2) + package_cloud push firstlookmedia/code/ubuntu/eoan deb_dist/gpgsync_${VERSION}-1_all.deb + package_cloud push firstlookmedia/code/ubuntu/eoan deb_dist/gpgsync_${VERSION}-1.dsc + workflows: version: 2 test: jobs: - test + - build-tags: + jobs: + - build-ubuntu-bionic: + filters: + tags: + only: /^v.*/ + branches: + ignore: /.*/ + - build-ubuntu-disco: + filters: + tags: + only: /^v.*/ + branches: + ignore: /.*/ + - build-ubuntu-eoan: + filters: + tags: + only: /^v.*/ + branches: + ignore: /.*/ diff --git a/install/build_deb.sh b/install/build_deb.sh index c512346..6cadf81 100755 --- a/install/build_deb.sh +++ b/install/build_deb.sh @@ -8,6 +8,9 @@ VERSION=`cat share/version` # clean up from last build rm -r deb_dist >/dev/null 2>&1 +# build source package +python3 setup.py --command-packages=stdeb.command sdist_dsc + # build binary package python3 setup.py --command-packages=stdeb.command bdist_deb From 1fc2918b4a8f11d35663945acd515d22dd6e7b85 Mon Sep 17 00:00:00 2001 From: Micah Lee Date: Mon, 2 Dec 2019 14:12:44 -0800 Subject: [PATCH 3/4] Typo in circleci config --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index cad4514..14a24ba 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -99,7 +99,7 @@ workflows: test: jobs: - test - - build-tags: + build-tags: jobs: - build-ubuntu-bionic: filters: From 7e073357f08df6e330a82e68f365949166d0a08f Mon Sep 17 00:00:00 2001 From: Micah Lee Date: Mon, 2 Dec 2019 14:25:31 -0800 Subject: [PATCH 4/4] Add debian buster, bullseye, and fedora 30, 31 packages to circleci deployment --- .circleci/config.yml | 116 +++++++++++++++++++++++++++++++++++++++++++ install/build_rpm.sh | 2 +- 2 files changed, 117 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 14a24ba..48ea990 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -94,6 +94,98 @@ jobs: package_cloud push firstlookmedia/code/ubuntu/eoan deb_dist/gpgsync_${VERSION}-1_all.deb package_cloud push firstlookmedia/code/ubuntu/eoan deb_dist/gpgsync_${VERSION}-1.dsc + build-debian-buster: + docker: + - image: debian:buster + steps: + - run: + name: Install dependencies + command: | + apt-get update + DEBIAN_FRONTEND=noninteractive apt-get install -y git ssh ruby-dev rubygems build-essential fakeroot python-all python3-all dh-python python3-pyqt5 python3-stdeb python3-requests python3-socks python3-packaging python3-dateutil python3-pytest python3-pytest-runner gnupg2 + gem install --no-ri --no-rdoc rake + gem install --no-ri --no-rdoc package_cloud + - checkout + - run: + name: Create the .deb package + command: | + ./install/build_deb.sh + dpkg -i deb_dist/gpgsync_*.deb + - run: + name: Deploy to packagecloud.io + command: | + VERSION=$(cat share/version |cut -dv -f2) + package_cloud push firstlookmedia/code/debian/buster deb_dist/gpgsync_${VERSION}-1_all.deb + package_cloud push firstlookmedia/code/debian/buster deb_dist/gpgsync_${VERSION}-1.dsc + + build-debian-bullseye: + docker: + - image: debian:bullseye + steps: + - run: + name: Install dependencies + command: | + apt-get update + DEBIAN_FRONTEND=noninteractive apt-get install -y git ssh ruby-dev rubygems build-essential fakeroot python-all python3-all dh-python python3-pyqt5 python3-stdeb python3-requests python3-socks python3-packaging python3-dateutil python3-pytest python3-pytest-runner gnupg2 + gem install --no-ri --no-rdoc rake + gem install --no-ri --no-rdoc package_cloud + - checkout + - run: + name: Create the .deb package + command: | + ./install/build_deb.sh + dpkg -i deb_dist/gpgsync_*.deb + - run: + name: Deploy to packagecloud.io + command: | + VERSION=$(cat share/version |cut -dv -f2) + package_cloud push firstlookmedia/code/debian/bullseye deb_dist/gpgsync_${VERSION}-1_all.deb + package_cloud push firstlookmedia/code/debian/bullseye deb_dist/gpgsync_${VERSION}-1.dsc + + build-fedora-30: + docker: + - image: fedora:30 + steps: + - run: + name: Install dependencies + command: | + dnf install -y git openssh ruby-devel make automake gcc gcc-c++ rpm-build qt5-devel python3-qt5 python3-requests python3-pytest-runner python3-packaging python3-dateutil gnupg2 + gem install package_cloud + - checkout + - run: + name: Create the .rpm package + command: | + ./install/build_rpm.sh + dnf install -y dist/gpgsync-*-1.noarch.rpm + - run: + name: Deploy to packagecloud.io + command: | + VERSION=$(cat share/version |cut -dv -f2) + package_cloud push firstlookmedia/code/fedora/30 dist/gpgsync-${VERSION}-1.noarch.rpm + package_cloud push firstlookmedia/code/fedora/30 dist/gpgsync-${VERSION}-1.src.rpm + + build-fedora-31: + docker: + - image: fedora:31 + steps: + - run: + name: Install dependencies + command: | + dnf install -y git openssh ruby-devel make automake gcc gcc-c++ rpm-build qt5-devel python3-qt5 python3-requests python3-pytest-runner python3-packaging python3-dateutil gnupg2 + gem install package_cloud + - checkout + - run: + name: Create the .rpm package + command: | + ./install/build_rpm.sh + dnf install -y dist/gpgsync-*-1.noarch.rpm + - run: + name: Deploy to packagecloud.io + command: | + VERSION=$(cat share/version |cut -dv -f2) + package_cloud push firstlookmedia/code/fedora/31 dist/gpgsync-${VERSION}-1.noarch.rpm + package_cloud push firstlookmedia/code/fedora/31 dist/gpgsync-${VERSION}-1.src.rpm + workflows: version: 2 test: @@ -119,3 +211,27 @@ workflows: only: /^v.*/ branches: ignore: /.*/ + - build-debian-buster: + filters: + tags: + only: /^v.*/ + branches: + ignore: /.*/ + - build-debian-bullseye: + filters: + tags: + only: /^v.*/ + branches: + ignore: /.*/ + - build-fedora-30: + filters: + tags: + only: /^v.*/ + branches: + ignore: /.*/ + - build-fedora-31: + filters: + tags: + only: /^v.*/ + branches: + ignore: /.*/ diff --git a/install/build_rpm.sh b/install/build_rpm.sh index 9228ebd..fb056e8 100755 --- a/install/build_rpm.sh +++ b/install/build_rpm.sh @@ -10,7 +10,7 @@ VERSION=${VERSION:1} rm -r build dist >/dev/null 2>&1 # build binary package -python3 setup.py bdist_rpm --requires="python3-qt5, python3-requests, python3-nose, python3-packaging, python3-dateutil, gnupg2" +python3 setup.py bdist_rpm --requires="python3-qt5, python3-requests, python3-packaging, python3-dateutil, gnupg2" # return install instructions if build succeeds if [[ $? -eq 0 ]]; then