-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a3a7958
commit 572698f
Showing
4 changed files
with
51 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,144 +1,16 @@ | ||
--- | ||
version: 2 | ||
|
||
jobs: | ||
build_and_test_python27: | ||
circleci_is_disabled_job: | ||
docker: | ||
- image: circleci/python:2.7 | ||
- image: rabbitmq:3 | ||
- image: mongo:3.4 | ||
|
||
working_directory: ~/repo | ||
|
||
environment: | ||
VIRTUALENV_DIR: "~/virtualenv" | ||
# Don't install various StackStorm dependencies which are already | ||
# installed by CI again in the various check scripts | ||
ST2_INSTALL_DEPS: "0" | ||
|
||
steps: | ||
- checkout | ||
- restore_cache: | ||
key: v1-dependency-cache-py27-{{ checksum "requirements.txt" }} | ||
- run: | ||
name: Download dependencies | ||
command: | | ||
git clone -b master git://github.com/stackstorm-exchange/ci.git ~/ci | ||
~/ci/.circle/dependencies | ||
- run: | ||
name: Run tests (Python 2.7) | ||
command: ~/ci/.circle/test | ||
- save_cache: | ||
key: v1-dependency-cache-py27-{{ checksum "requirements.txt" }} | ||
paths: | ||
- ~/.cache/pip | ||
- ~/.apt-cache | ||
# NOTE: We use virtualenv files from Python 2.7 step in "deploy" job so we | ||
# only persist paths from this job | ||
- persist_to_workspace: | ||
root: / | ||
paths: | ||
- home/circleci/ci | ||
- home/circleci/virtualenv | ||
- tmp/st2 | ||
- home/circleci/repo | ||
- home/circleci/.gitconfig | ||
|
||
# NOTE: Until we add "python_version" metadata attribute to pack.yaml and | ||
# explicitly call which packs work with Python 3.x, Python 3.x failures are | ||
# not considered fatal | ||
build_and_test_python36: | ||
docker: | ||
- image: circleci/python:3.6 | ||
- image: rabbitmq:3 | ||
- image: mongo:3.4 | ||
|
||
working_directory: ~/repo | ||
|
||
environment: | ||
VIRTUALENV_DIR: "~/virtualenv" | ||
# Don't install various StackStorm dependencies which are already | ||
# installed by CI again in the various check scripts | ||
ST2_INSTALL_DEPS: "0" | ||
|
||
- image: cimg/base:stable | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
key: v1-dependency-cache-py36-{{ checksum "requirements.txt" }} | ||
- run: | ||
name: Download dependencies | ||
# NOTE: We don't want to use default "-e" option because this means | ||
# step will fail immediately on one of the commands failures and we | ||
# can't intercept the error and cause non-fatal exit in case pack | ||
# doesn't declare support for Python 3 | ||
shell: /bin/bash | ||
command: | | ||
git clone -b master git://github.com/stackstorm-exchange/ci.git ~/ci | ||
~/ci/.circle/dependencies ; ~/ci/.circle/exit_on_py3_checks $? | ||
- run: | ||
name: Run tests (Python 3.6) | ||
# NOTE: We don't want to use default "-e" option because this means | ||
# step will fail immediately on one of the commands failures and we | ||
# can't intercept the error and cause non-fatal exit in case pack | ||
# doesn't declare support for Python 3 | ||
shell: /bin/bash | ||
command: ~/ci/.circle/test ; ~/ci/.circle/exit_on_py3_checks $? | ||
- save_cache: | ||
key: v1-dependency-cache-py36-{{ checksum "requirements.txt" }} | ||
paths: | ||
- ~/.cache/pip | ||
- ~/.apt-cache | ||
|
||
deploy: | ||
docker: | ||
- image: circleci/python:2.7 | ||
|
||
working_directory: ~/repo | ||
|
||
environment: | ||
VIRTUALENV_DIR: "~/virtualenv" | ||
|
||
steps: | ||
- checkout | ||
- restore_cache: | ||
key: v1-dependency-cache-py27-{{ checksum "requirements.txt" }} | ||
- attach_workspace: | ||
at: / | ||
- run: | ||
name: Install dependencies | ||
command: sudo apt -y install gmic optipng | ||
- run: | ||
# NOTE: We try to retry the script up to 5 times if it fails. The command could fail due | ||
# to the race (e.g. we try to push changes to index, but index has been updated by some | ||
# other pack in the mean time) | ||
name: Update exchange.stackstorm.org | ||
command: ~/ci/.circle/retry_on_failure.sh ~/ci/.circle/deployment | ||
command: echo CircleCI disabled on StackStorm-Exchange | ||
|
||
workflows: | ||
version: 2 | ||
# Workflow which runs on each push | ||
build_test_deploy_on_push: | ||
jobs: | ||
- build_and_test_python27 | ||
- build_and_test_python36 | ||
- deploy: | ||
requires: | ||
- build_and_test_python27 | ||
filters: | ||
branches: | ||
only: master | ||
build_test_weekly: | ||
circleci_is_disabled: | ||
jobs: | ||
- build_and_test_python27 | ||
- build_and_test_python36 | ||
# Workflow which runs nightly - note we don't perform deploy job on nightly | ||
# build | ||
triggers: | ||
# Run nightly build for the pack | ||
- schedule: | ||
# NOTE: We run it at 1 am UTC on every Sunday | ||
cron: "0 1 * * 0" | ||
filters: | ||
branches: | ||
only: | ||
- master | ||
- circleci_is_disabled_job |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: CI | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
schedule: | ||
# NOTE: We run this weekly at 1 am UTC on every Sunday | ||
- cron: '0 1 * * 0' | ||
|
||
jobs: | ||
# This is mirrored in the release workflow. | ||
build_and_test: | ||
name: 'Build and Test' | ||
uses: StackStorm-Exchange/ci/.github/workflows/pack-build_and_test.yaml@master | ||
with: | ||
enable-common-libs: true | ||
#apt-cache-version: v0 | ||
#py-cache-version: v0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
# the default branch | ||
- aaa | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
# This mirrors build_and_test workflow | ||
build_and_test: | ||
name: 'Build and Test' | ||
uses: StackStorm-Exchange/ci/.github/workflows/pack-build_and_test.yaml@master | ||
with: | ||
enable-common-libs: true | ||
#apt-cache-version: v0 | ||
#py-cache-version: v0 | ||
|
||
tag_release: | ||
needs: build_and_test | ||
name: Tag Release | ||
uses: StackStorm-Exchange/ci/.github/workflows/pack-tag_release.yaml@master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,6 @@ keywords: | |
- Community | ||
author: StackStorm | ||
email: [email protected] | ||
python_versions: | ||
- "2" | ||
- "3" |