Skip to content

Commit

Permalink
Merge pull request #611 from StackStorm/feature/circleci
Browse files Browse the repository at this point in the history
Switch to workflows for deploy step
  • Loading branch information
LindsayHill authored Oct 9, 2018
2 parents 8001266 + 0b3d484 commit 8f05324
Showing 1 changed file with 48 additions and 14 deletions.
62 changes: 48 additions & 14 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,18 +126,52 @@ jobs:
- store_artifacts:
path: ~/artifacts
destination: packages
- deploy:
name: Maybe Deploy
- persist_to_workspace:
root: /home/circleci/artifacts
paths:
- trusty
- xenial
- el6
- el7
deploy:
docker:
- image: ruby:2.4.4
environment:
ARTIFACTS: /home/circleci/artifacts
DISTROS: trusty xenial el6 el7
steps:
- checkout
- attach_workspace:
at: /home/circleci/artifacts
- run:
name: List workspace files
command: find $ARTIFACTS | sed 's|[^/]*/| |g'
- run:
name: Install dependencies
command: |
if [[ "${CIRCLE_BRANCH}" == "master" || "${CIRCLE_BRANCH}" =~ v[0-9]+(\.[0-9]+)* || "${CIRCLE_BRANCH}" == "feature/circleci" ]]; then
for distro in ${RPM} ${DEB}; do
packagecloud.sh deploy $distro ~/artifacts/$distro
done
fi
experimental:
notify:
branches:
only:
- master
- /v[0-9]+(\.[0-9]+)*/
set -x
apt-get -qq update
apt-get -y install jq
wget -qO - https://github.com/StackStorm/st2-packages/raw/master/.circle/packagecloud.sh > ~/packagecloud.sh
chmod 755 ~/packagecloud.sh
gem install package_cloud
- run:
name: Deploy to packagecloud
command: |
for distro in ${DISTROS}; do
~/packagecloud.sh deploy $distro $ARTIFACTS/$distro
done
workflows:
version: 2
build-deploy-workflow:
jobs:
- build
- deploy:
requires:
- build
filters:
branches:
only:
- master
- /v[0-9]+\.[0-9]+/
- feature/circleci

0 comments on commit 8f05324

Please sign in to comment.