Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:splunk/splunk-add-on-sdk-python …
Browse files Browse the repository at this point in the history
…into develop
  • Loading branch information
rfaircloth-splunk committed Sep 17, 2020
2 parents da36eca + 856f9ce commit e33f43e
Show file tree
Hide file tree
Showing 3 changed files with 733 additions and 16 deletions.
84 changes: 76 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@ jobs:
- image: circleci/python:3.7-node
steps:
- checkout
# - restore_cache:
# keys:
# - poetry-{{ checksum "poetry.lock" }}
- restore_cache:
keys:
- poetry-{{ checksum "poetry.lock" }}
- restore_cache:
keys:
- npm-deps-{{ checksum "splunk_add_on_ucc_framework/UCC-UI-lib/package-lock.json" }}
- run:
name: Install Tools
command: |
Expand All @@ -23,18 +26,80 @@ jobs:
name: Build
command: |
source $HOME/.poetry/env
git fetch --all --tags
git tag
poetry version
export PATH=~/.npm-global/bin:$PATH
poetry install
poetry run poetry-dynamic-versioning
poetry run build-ucc
poetry build
#poetry run ucc-gen --source tests/data/package --config tests/data/globalConfig.json
- save_cache:
key: poetry-{{ checksum "poetry.lock" }}
paths:
- ~/.poetry
- save_cache:
paths:
- ~/.npm-global # location depends on npm version
key: npm-deps-{{ checksum "splunk_add_on_ucc_framework/UCC-UI-lib/package-lock.json" }}
- store_artifacts:
path: dist
- store_artifacts:
path: output
- persist_to_workspace:
# Must be an absolute path, or relative path from working_directory. This is a directory on the container which is
# taken to be the root directory of the workspace.
root: .
# Must be relative path from root
paths:
- dist
- output

test:
docker:
- image: circleci/python:3.7-node
steps:
- checkout
- attach_workspace:
at: /tmp/workspace
- run:
name: Install Tools
command: |
pip install /tmp/workspace/dist/*
publish:
docker:
- image: circleci/python:3.7-node
steps:
- checkout
- restore_cache:
keys:
- poetry-{{ checksum "poetry.lock" }}
- restore_cache:
keys:
- npm-deps-{{ checksum "splunk_add_on_ucc_framework/UCC-UI-lib/package-lock.json" }}
- run:
name: Install Tools
command: |
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
mkdir ~/.npm-global || true
npm config set prefix '~/.npm-global'
export PATH=~/.npm-global/bin:$PATH
npm install -g bower
- run:
name: Build
command: |
source $HOME/.poetry/env
export PATH=~/.npm-global/bin:$PATH
poetry install
poetry run poetry-dynamic-versioning
poetry run build-ucc
poetry build
poetry publish -u ${TWINE_USERNAME} -p ${TWINE_PASSWORD}
- save_cache:
key: poetry-{{ checksum "poetry.lock" }}
paths:
- ~/.poetry
- save_cache:
paths:
- ~/.npm-global # location depends on npm version
key: npm-deps-{{ checksum "splunk_add_on_ucc_framework/UCC-UI-lib/package-lock.json" }}
- store_artifacts:
path: dist
- store_artifacts:
Expand All @@ -52,9 +117,12 @@ workflows:
build_test:
jobs:
- build
- test:
requires:
- build
build_release:
jobs:
- build:
- publish:
filters:
branches:
ignore: /.*/
Expand Down
10 changes: 2 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ repository = "https://github.com/splunk/splunk-add-on-sdk-python/"
homepage = "https://github.com/splunk/splunk-add-on-sdk-python/"

keywords = ['splunk']

[tool.poetry.dependencies]
python = "^3.7"
solnlib = '^2.1'
Expand All @@ -26,9 +27,6 @@ future = "^0"
pytest = "^5.4"
pytest-splunk-addon = { version = "^1.3", extras = [ "docker" ] }
poetry-dynamic-versioning = "^0.8"
#setuptools = "^50"
#wheel = "^0"
#pip = "^20"

[tool.poetry-dynamic-versioning]
enable = true
Expand All @@ -38,10 +36,6 @@ ucc-gen="splunk_add_on_ucc_framework:main"
build-ucc="build:build_ucc"
install-libs="splunk_add_on_ucc_framework:install_requirements"

#[build-system]
#requires=["setuptools >= 40.6.0", "wheel"]
#build-backend="setuptools.build_meta"

[build-system]
requires = ["poetry>=0.12"]
requires = ["poetry>=1.0.0"]
build-backend = "poetry.masonry.api"
Loading

0 comments on commit e33f43e

Please sign in to comment.