Skip to content

Commit

Permalink
Merge pull request #119 from vapor-ware/v2.0-merge
Browse files Browse the repository at this point in the history
V2.0 merge
  • Loading branch information
edaniszewski committed Apr 5, 2018
2 parents 1b78cd9 + 980d1a3 commit 0989894
Show file tree
Hide file tree
Showing 700 changed files with 14,708 additions and 85,349 deletions.
90 changes: 67 additions & 23 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,78 @@
version: 2
jobs:
build:

# Run tests and linting for Synse Server
test:
working_directory: ~/synse-server
docker:
- image: python
working_directory: /synse-server
environment:
- DOCKER_VERSION=17.09.1-ce
- COMPOSE_VERSION=1.18.0
- image: circleci/python:3.6.4
steps:
- checkout

- setup_remote_docker

- run:
name: Install Docker Client
name: Install Dependencies
command: |
set -x
curl -L -o /tmp/docker-${DOCKER_VERSION}.tgz https://get.docker.com/builds/Linux/x86_64/docker-latest.tgz
tar -xz -C /tmp -f /tmp/docker-${DOCKER_VERSION}.tgz
mv /tmp/docker/* /usr/bin
sudo chown -R circleci:circleci /usr/local/bin
sudo chown -R circleci:circleci /usr/local/lib/python3.6/site-packages
pip install tox>=2.9.0
- restore_cache:
keys:
- v1.5-tox-test-cache-{{ checksum "requirements.txt" }}-{{ checksum "tox.ini" }}
- run:
name: Install Docker compose
command: |
set -x
curl -L https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
name: Unit Tests
command: make test-unit
- run:
name: Docker Compose Build
command: docker-compose -f compose/release.yml build
name: Integration Tests
command: make test-integration
- save_cache:
key: v1.5-tox-test-cache-{{ checksum "requirements.txt" }}-{{ checksum "tox.ini" }}
paths:
- .tox/py36
- restore_cache:
keys:
- v2.6-tox-lint-cache-{{ checksum "requirements.txt" }}-{{ checksum "tox.ini" }}
- run:
name: Run tests
name: Lint
command: make lint
- save_cache:
key: v2.6-tox-lint-cache-{{ checksum "requirements.txt" }}-{{ checksum "tox.ini" }}
paths:
- .tox/lint
- store_artifacts:
path: ./results
- store_test_results:
path: ./results/pytest

# Build and push the Synse Server docker image to DockerHub
build-push:
working_directory: ~/synse-server
docker:
- image: circleci/python:3.6.4
steps:
- checkout
- setup_remote_docker
- run:
name: Build Images
command: |
make docker
- run:
name: Push Images
command: |
make test
docker login -u ${DOCKER_USER} -p ${DOCKER_PS}
for tag in $(make tags); do
docker push ${tag}
done
workflows:
version: 2
build:
jobs:
- test
- build-push:
requires:
- test
filters:
branches:
only:
- master
- v2.0-dev

16 changes: 11 additions & 5 deletions .dockerignore → .dockerignore.default
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Synse specific components
assets/
dockerfile/
tools/generate_rack_config.py
tools/ipmi_diag.py
#
# .dockerignore.default
#
# The dockerignore file used for default Synse Server image builds.
# By default, Synse Server includes the emulator. For a version of
# Synse Server without the emulator, use the 'slim' build.
#

# JetBrains (PyCharm, WebStorm, etc.)
.idea
Expand Down Expand Up @@ -49,3 +51,7 @@ docs/

# Images
**/*.png

# Test Artifacts
prof/
results/
61 changes: 61 additions & 0 deletions .dockerignore.slim
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#
# .dockerignore.slim
#
# The dockerignore file used for slim Synse Server image builds.
# The slim build of Synse Server does not include the emulator.
# For a version of Synse Server with the emulator, use the standard
# build.
#

# Emulator
emulator/

# JetBrains (PyCharm, WebStorm, etc.)
.idea
*.iws
.idea_modules

# Linux
*~
.directory
.Trash-*
**/packages

# OSX
.DS_Store
._*
.TemporaryItems
.Trashes

# Vagrant
.vagrant

# Git
.git
.gitignore

# Python
*.py[cod]
**/__pycache__
**/.tox
.pep8

# Logs
logs/
*.log

# Docker
Dockerfile.*
**/*.dockerfile

# Docs
docs/
**/*.md
**/*.rst

# Images
**/*.png

# Test Artifacts
prof/
results/
9 changes: 0 additions & 9 deletions .github/ISSUE_TEMPLATE.md

This file was deleted.

12 changes: 0 additions & 12 deletions .github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

11 changes: 6 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ nosetests.xml
coverage.xml
*,cover
.hypothesis/

# Translations
*.mo
*.pot
results/
prof/
*.log
.pytest_cache/

# Flask stuff:
instance/
Expand All @@ -71,11 +71,12 @@ celerybeat-schedule
venv/
ENV/

*.pyc
.vagrant
.idea
.DS_Store

# packages
*.rpm
*.deb

!docs/*
3 changes: 0 additions & 3 deletions .pep8

This file was deleted.

11 changes: 3 additions & 8 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

# Add files or directories to the blacklist. They should be base names, not
# paths.
ignore=CVS,tests
ignore=CVS,api_pb2.py,api_pb2_grpc.py

# Pickle collected data for later comparisons.
persistent=yes
Expand All @@ -28,7 +28,7 @@ unsafe-load-any-extension=no
# A comma-separated list of package or module names from where C extensions may
# be loaded. Extensions are loading into the active Python interpreter and may
# run arbitrary code
extension-pkg-whitelist=
extension-pkg-whitelist=ujson


[MESSAGES CONTROL]
Expand Down Expand Up @@ -77,12 +77,7 @@ disable=invalid-name
# https://github.com/PyCQA/pylint/issues/1405
,len-as-condition
,ungrouped-imports
# FIXME -- above, duplicate code checks are being ignored. we may want to re-enable
# this in the future. doing so would mean a bit of refactoring to reduce duplicity,
# which is a work item currently out of scope.
,duplicate-code
,too-many-nested-blocks
,consider-iterating-dictionary

[REPORTS]

Expand Down Expand Up @@ -395,4 +390,4 @@ int-import-graph=

# Exceptions that will emit a warning when being caught. Defaults to
# "Exception"
overgeneral-exceptions=Exception
overgeneral-exceptions=Exception
86 changes: 0 additions & 86 deletions Jenkinsfile

This file was deleted.

1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
recursive-include synse/locale *.mo

0 comments on commit 0989894

Please sign in to comment.