Closed ElizabethForest closed 5 years ago
Cool. Looks good. A couple requests:
Instead of having to maintain a separate VERSION
file, I think it makes sense just to keep the version in project.clj
as the source of truth. Most other projects keep the version something like <next-version>-SNAPSHOT
so for Toucan right now it could be 1.10-SNAPSHOT
. Then when the time comes to do a new release I can do that manually
Second, in my experience CircleCI 2.0 Docker images work 1000x better than machine
, which seems almost practically unsupported. Instead something like this should do the trick:
jobs:
test:
working_directory: /home/circleci/metabase/toucan
docker:
- image: circleci/clojure:lein-2.8.1
- image: circleci/postgres:9.6-alpine
environment:
POSTGRES_USER: toucan_test
POSTGRES_DB: toucan_test
steps:
- checkout
- run:
name: Run tests
environment:
TOUCAN_TEST_DB_USER: toucan_test
command: lein test
no_output_timeout: 5m
- run:
name: Run linters
command: lein lint
no_output_timeout: 5m
I want to merge some changes to Toucan this afternoon so I'll go ahead and merge this and tweak things a little bit myself.
Thanks for the contribution!
Massive success @ElizabethForest
I have updated the project so that it will work with Circle CI 2.1 and so that deploys are automated.
When a branch isn't
master
it will deploy a snapshot to clojars with the version of[version]-[branch-name]-SNAPSHOT
. Otherwise, when on the master branch, it will be released with the version number. To update the version just update theVERSION
file.Since the updates use Circle CI 2.1
Enable build processing
needs to be turned in the Toucan Circle CI Settings underAdvanced Settings
. For the deploys to work a context needs to be added to Circle CI with the name ofclojars
with the environment variablesCLOJARS_USERNAME
andCLOJARS_PASSWORD
.Here is in action! https://circleci.com/gh/jesims/workflows/toucan
@camsaul