Skip to content

Commit

Permalink
Merge pull request #616 from freedomofpress/sudo_ci_move_to_buster
Browse files Browse the repository at this point in the history
Updates CI to run on Buster for Debian packaging
  • Loading branch information
redshiftzero authored Nov 27, 2019
2 parents 1fafa5c + f6b1391 commit 381104a
Showing 1 changed file with 50 additions and 31 deletions.
81 changes: 50 additions & 31 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,45 +27,63 @@ common-steps:
source .venv/bin/activate
make bandit
- &install_packaging_dependencies
run:
name: Install Debian packaging dependencies and download wheels
command: |
mkdir ~/packaging && cd ~/packaging
git clone https://github.com/freedomofpress/securedrop-debian-packaging.git
cd securedrop-debian-packaging
make install-deps && make fetch-wheels
PKG_DIR=~/project make requirements
- &verify_requirements
run:
name: Ensure that build-requirements.txt and requirements.txt are in sync.
command: |
cd ~/project
# Return 1 if unstaged changes exist (after `make requirements` in the
# previous run step), else return 0.
git diff --quiet
- &make_source_tarball
run:
name: Tag and make source tarball
command: |
cd ~/project
./update_version.sh 1000.0 # Dummy version number, doesn't matter what we put here
python3 setup.py sdist
- &build_debian_package
run:
name: Build debian package
command: |
cd ~/packaging/securedrop-debian-packaging
export PKG_VERSION=1000.0
export PKG_PATH=/home/circleci/project/dist/securedrop-client-$PKG_VERSION.tar.gz
make securedrop-client
version: 2
jobs:
build-stretch:
docker:
- image: circleci/python:3.5-stretch
steps:
- checkout
- *install_packaging_dependencies
- *verify_requirements
- *make_source_tarball
- *build_debian_package

- run:
name: Install Debian packaging dependencies and download wheels
command: |
mkdir ~/packaging && cd ~/packaging
git clone https://github.com/freedomofpress/securedrop-debian-packaging.git
cd securedrop-debian-packaging
make install-deps && make fetch-wheels
PKG_DIR=~/project make requirements
- run:
name: Ensure that build-requirements.txt and requirements.txt are in sync.
command: |
cd ~/project
# Return 1 if unstaged changes exist (after `make requirements` in the
# previous run step), else return 0.
git diff --quiet
- run:
name: Tag and make source tarball
command: |
cd ~/project
./update_version.sh 1000.0 # Dummy version number, doesn't matter what we put here
python3 setup.py sdist
- run:
name: Build debian package
command: |
cd ~/packaging/securedrop-debian-packaging
export PKG_VERSION=1000.0
export PKG_PATH=~/project/dist/securedrop-client-$PKG_VERSION.tar.gz
make securedrop-client
build-buster:
docker:
- image: circleci/python:3.7-buster
steps:
- checkout
- *install_packaging_dependencies
- *verify_requirements
- *make_source_tarball
- *build_debian_package

test-stretch:
docker:
Expand Down Expand Up @@ -94,3 +112,4 @@ workflows:
- test-stretch
- build-stretch
- test-buster
- build-buster

0 comments on commit 381104a

Please sign in to comment.