Skip to content

Commit

Permalink
CI: build artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
edaniszewski committed May 7, 2018
1 parent d298b97 commit 9afe226
Showing 1 changed file with 35 additions and 4 deletions.
39 changes: 35 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,28 @@ jobs:
docker push ${tag}
done
# Package the Synse Server
package:
working_directory: ~/synse-server
docker:
- image: circleci/python:3.6.4
steps:
- checkout
- run:
name: Install Dependencies
command: |
sudo chown -R circleci:circleci /usr/local/bin
sudo chown -R circleci:circleci /usr/local/lib/python3.6/site-packages
pip install -r requirements.txt
- run:
name: Package
command: python setup.py sdist --formats=gztar,zip,bztar,tar
- persist_to_workspace:
root: .
paths:
- dist


# Create a new release draft when a tag is pushed
release:
working_directory: ~/synse-server
Expand All @@ -93,6 +115,8 @@ jobs:
else
echo "Versions match: ${version}"
fi
- attach_workspace:
at: /tmp/workspace
- run:
name: Get GHR Distributor
command: |
Expand All @@ -110,9 +134,6 @@ jobs:
- run:
name: Create Release
command: |
# ghr needs a path to artifacts specified to upload. since
# we have none right now, we'll just create an empty directory
mkdir build
if git describe --exact-match --tags HEAD; then
CIRCLE_TAG=$(git describe --exact-match --tags HEAD)
fi
Expand All @@ -122,21 +143,31 @@ jobs:
-b "$(cat ./CHANGELOG.md)" \
-replace \
-draft \
${CIRCLE_TAG} build/
${CIRCLE_TAG} /tmp/workspace/dist
workflows:
version: 2
build:
jobs:
- test

- build-push:
requires:
- test
filters:
branches:
only:
- master
- package:
filters:
branches:
ignore: /.*/
tags:
only: /^v?[0-9]*(\.[0-9]*)*(-rc[0-9]*)?$/

- release:
requires:
- package
filters:
branches:
ignore: /.*/
Expand Down

0 comments on commit 9afe226

Please sign in to comment.