Skip to content

Commit

Permalink
Merge pull request #52 from freedomofpress/oh_my_buster_ci
Browse files Browse the repository at this point in the history
Adds buster packaging in CI
  • Loading branch information
redshiftzero authored Dec 2, 2019
2 parents 7bb1a86 + 81994bf commit df550fd
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 @@ -17,45 +17,63 @@ common-steps:
source .venv/bin/activate
make safety
- &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-proxy-$PKG_VERSION.tar.gz
make securedrop-proxy
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-proxy-$PKG_VERSION.tar.gz
make securedrop-proxy
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 All @@ -80,3 +98,4 @@ workflows:
- test-stretch
- test-buster
- build-stretch
- build-buster

0 comments on commit df550fd

Please sign in to comment.