I’ve been using CircleCI for a couple weeks now and I’m very impressed. One minor annoyance is that, to access my build artifacts from the UI, I must traverse several trivial directories, which all start out collapsed: home->CircleCI->repo->artifacts
. Is there a way to add build artifacts lower down on this hierarchy, ideally at the same level as home
?
Below is my configuration.
# Python CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-python/ for more details
#
version: 2
jobs:
build:
docker:
# specify the version you desire here
# use `-browsers` prefix for selenium tests, e.g. `3.6.1-browsers`
- image: circleci/python:3.7.3
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
# - image: circleci/postgres:9.4
working_directory: ~/repo
steps:
- checkout
# Download and cache dependencies
- restore_cache:
keys:
- v12-dependencies-{{ checksum "setup.py" }}
# fallback to using the latest cache if no exact match is found
- v12-dependencies-
- run:
name: install dependencies
command: |
python3 -m venv venv
. venv/bin/activate
pip install .
- save_cache:
paths:
- ./venv
key: v12-dependencies-{{ checksum "setup.py" }}
# https://circleci.com/docs/2.0/collect-test-data/#pytest
- run:
name: make directories
command: |
mkdir artifacts
mkdir artifacts/test-reports
mkdir artifacts/schema
mkdir artifacts/schema/catalog
mkdir artifacts/schema/tree
mkdir artifacts/schema/linkages
mkdir artifacts/coverage
mkdir artifacts/coverage/fixtures
mkdir artifacts/coverage/fixtures/origin
mkdir artifacts/coverage/fixtures/logical
mkdir artifacts/coverage/fixtures/semantic
mkdir artifacts/coverage/actual
mkdir artifacts/coverage/actual/logical
mkdir artifacts/coverage/actual/semantic
- run:
name: generate schema and fixture metadata
command: |
. venv/bin/activate
etl5 schema linkage export ./schemas/ nonprofit/origin nonprofit/logical \
./artifacts/schema/linkages/logical_linkages.csv
etl5 schema linkage export ./schemas/ nonprofit/logical nonprofit/semantic \
./artifacts/schema/linkages/semantic_linkages.csv
etl5 schema catalog ./schemas nonprofit/origin artifacts/schema/catalog/origin_catalog.csv
etl5 schema catalog ./schemas nonprofit/logical artifacts/schema/catalog/logical_catalog.csv
etl5 schema catalog ./schemas nonprofit/semantic artifacts/schema/catalog/semantic_catalog.csv
etl5 schema treeview ./schemas nonprofit/origin > artifacts/schema/tree/origin_tree.txt
etl5 schema treeview ./schemas nonprofit/logical > artifacts/schema/tree/logical_tree.txt
etl5 schema treeview ./schemas nonprofit/semantic > artifacts/schema/tree/semantic_tree.txt
etl5 coverage ./schemas/ nonprofit/origin ./fixtures/composites/origin \
artifacts/coverage/fixtures/origin/origin_fixtures --t-group origin_temporal_000997
etl5 coverage ./schemas/ nonprofit/logical ./fixtures/composites/logical \
artifacts/coverage/fixtures/logical/logical_fixtures --t-group logical_temporal_000117
etl5 coverage ./schemas/ nonprofit/semantic ./fixtures/composites/semantic \
artifacts/coverage/fixtures/semantic/semantic_fixtures --t-group semantic_temporal_000009
- run:
name: run tests
command: |
. venv/bin/activate
python -m pytest --junitxml=artifacts/test-reports/junit.xml
- run:
name: generate test coverage metadata
when: always
command: |
. venv/bin/activate
etl5 coverage ./schemas/ nonprofit/logical /tmp/etl5_fixture_tests/entities/nonprofit/logical \
artifacts/coverage/actual/logical/logical_actual --t-group logical_temporal_000117
etl5 coverage ./schemas/ nonprofit/semantic /tmp/etl5_fixture_tests/entities/nonprofit/semantic \
artifacts/coverage/actual/semantic/semantic_actual --t-group semantic_temporal_000009
- store_artifacts:
path: artifacts
- store_test_results:
path: artifacts/test-reports