Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Circle ci deploy #36

Merged
merged 7 commits into from
Apr 26, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat(circleci): run test ditto/upgrade to 2.1
Naramsim committed Apr 26, 2020

Unverified

No user is associated with the committer email.
commit 43594b33d9082db6286862076b1ae16180ba21be
43 changes: 30 additions & 13 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,50 @@
version: 2
version: 2.1

jobs:
build:
executors:
python36:
docker:
- image: circleci/python:3.6.5
- image: circleci/python:3.6.5

commands:
ditto-transform:
description: Run Ditto in order to transform the base URL to https://pokeapi.co instead of localhost
steps:
- checkout
- run: pip install --user -r requirements.txt
- run:
command: |
~/.local/bin/ditto transform \
--base-url='https://pokeapi.co' \
--src-dir=data \
--dest-dir=_gen
command: |
~/.local/bin/ditto transform \
--base-url='https://pokeapi.co' \
--src-dir=data \
--dest-dir=_gen

jobs:
test:
executor: python36
steps:
- checkout
- ditto-transform
build:
executor: python36
steps:
- checkout
- ditto-transform
- run: tar czf _gen.tar.gz _gen/*
- store_artifacts:
path: _gen.tar.gz
deploy:
docker:
- image: circleci/python:3.6.5
executor: python36
steps:
# Trigger a new build of the deploy project
- run: "curl -X POST --header \"Content-Type: application/json\" https://circleci.com/api/v1.1/project/github/PokeAPI/deploy/build?circle-token=$CIRCLECI_API_TOKEN"

workflows:
version: 2
build-and-deploy:
test-build-and-deploy:
jobs:
- test
- build:
requires:
- test
filters:
branches:
only: master