Skip to content

Commit

Permalink
Release 0.1.6
Browse files Browse the repository at this point in the history
Changelog:
*  Fix GUI bugs
*  Update sidebar menu
*  Add execution time to history
*  Add template history list
*  Refactoring history: user is `executor`, initiators is projects, periodic tasks and templates
*  Add Template option to history object
*  Add synced hooks (experimental)
*  Add user notes for all objects
*  Add option to project means that project updates on execute

See merge request polemarch/ce!1
  • Loading branch information
onegreyonewhite committed May 10, 2018
2 parents bbbcaf3 + ae5210a commit 143f6e9
Show file tree
Hide file tree
Showing 151 changed files with 9,610 additions and 2,695 deletions.
21 changes: 11 additions & 10 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ variables:
ARTIFACT_DOWNLOAD_ATTEMPTS: 3
RESTORE_CACHE_ATTEMPTS: 3

cache:
paths:
- .tox/


stages:
- code_standarts
- build
Expand All @@ -17,7 +22,7 @@ stages:

.branch_tests_template: &branch_tests
stage: test
image: git.vst.lan/vst/tests:tox
image: onegreyonewhite/tox:tox
variables:
TOX_ENVS: ""
script:
Expand All @@ -39,7 +44,7 @@ stages:

.pack_tamplate: &packing-test
stage: packaging-test
image: git.vst.lan/vst/tests:tox
image: onegreyonewhite/tox:tox
variables:
MYSQL_ROOT_PASSWORD: 'polemarch'
MYSQL_DATABASE: 'polemarch'
Expand Down Expand Up @@ -86,13 +91,9 @@ stages:
###########################################
code_style:
stage: code_standarts
image: git.vst.lan/vst/tests:tox
image: onegreyonewhite/tox:tox
script:
- make test ENVS=flake,pylint
cache:
paths:
- .tox/pylint
- .tox/flake
only:
- /^.{0,}issue_.*$/
- developer
Expand Down Expand Up @@ -121,7 +122,7 @@ default_rpm_tests:

default_oracle_tests:
<<: *packing-test
image: git.vst.lan/vst/tests:oracle
image: onegreyonewhite/tox:oracle
script:
- cat /etc/hosts
- make rpm RELEASE=${CI_BUILD_ID}
Expand All @@ -133,7 +134,7 @@ default_oracle_tests:

default_deb_tests:
<<: *packing-test
image: git.vst.lan/vst/tests:ubuntu
image: onegreyonewhite/tox:ubuntu
script:
- cat /etc/hosts
- make deb RELEASE=${CI_BUILD_ID}
Expand Down Expand Up @@ -203,7 +204,7 @@ release_deb:
stage: release
only:
- tags
image: git.vst.lan/vst/tests:ubuntu
image: onegreyonewhite/tox:ubuntu
script:
- make deb
allow_failure: false
Expand Down
2 changes: 2 additions & 0 deletions .pep8
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
[pep8]
ignore = E221,E222,E121,E123,E126,E226,E24,E704,E116,E731,E722,E741
exclude = ./polemarch/*/migrations/*,./polemarch/main/settings*.py,.tox/*,./etc/*,./*/__init__.py,./t_openstack.py
max-line-length=90

[flake8]
ignore = E221,E222,E121,E123,E126,E226,E24,E704,E116,E731,E722,E741
exclude = ./polemarch/*/migrations/*,./polemarch/main/settings*.py,.tox/*,./etc/*,./*/__init__.py,./t_openstack.py,./polemarch/projects/*
max-line-length=90
7 changes: 1 addition & 6 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,8 @@ include polemarch/main/tests/test_repo.tar
include requirements.txt
include requirements-git.txt
include requirements-doc.txt
recursive-include etc *
recursive-include polemarch/*.c *
recursive-include polemarch/doc/html *
recursive-include polemarch/*.so *
recursive-include polemarch/static *
recursive-include polemarch/*/templates *
recursive-include initbin *
include Makefile
include deb.mk
include rpm.mk
recursive-include polemarch/*/templates *
59 changes: 53 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,22 @@ COMPOSE = docker-compose-testrun.yml
COMPOSE_ARGS = --abort-on-container-exit
COMPLEX_TESTS_COMPOSE = docker-compose-tests.yml
COMPLEX_TESTS_COMPOSE_ARGS = '--abort-on-container-exit --build'
DEFAULT_PREFIX = /opt
INSTALL_PREFIX = $(shell if [[ ! -z "${prefix}" ]]; then echo -n $(prefix); else echo -n $(DEFAULT_PREFIX); fi)
INSTALL_DIR = $(INSTALL_PREFIX)/${NAME}
INSTALL_BINDIR = $(INSTALL_DIR)/bin
REQUIREMENTS = -r requirements.txt -r requirements-doc.txt
TMPDIR := $(shell mktemp -d)
BUILD_DIR= $(TMPDIR)
PREBUILD_DIR = $(BUILD_DIR)/$(INSTALL_DIR)
PREBUILD_BINDIR = $(BUILD_DIR)/$(INSTALL_BINDIR)
SOURCE_DIR = $(shell pwd)


include rpm.mk
include deb.mk

all: compile
all: compile clean_prebuild prebuild


docs:
Expand All @@ -52,11 +63,44 @@ compile: build-clean
-rm -rf polemarch/doc/*
$(PY) setup.py compile -v

prebuild:
# Create virtualenv
$(PY) -m virtualenv --no-site-packages $(PREBUILD_DIR)
# Install required packages
$(PREBUILD_BINDIR)/pip install -U pip
$(PREBUILD_BINDIR)/pip install -U dist/$(NAME)-$(VER).tar.gz $(REQUIREMENTS)
$(PREBUILD_BINDIR)/pip install -U -r requirements-git.txt
# RECORD files are used by wheels for checksum. They contain path names which
# match the buildroot and must be removed or the package will fail to build.
find $(PREBUILD_DIR) -name "RECORD" -exec rm -rf {} \;
# Change the virtualenv path to the target installation direcotry.
venvctrl-relocate --source=$(PREBUILD_DIR) --destination=$(INSTALL_DIR)
# Remove sources for Clang
find $(PREBUILD_DIR)/lib -type f -name "*.c" -print0 | xargs -0 rm -rf
# Remove broken link
-rm -rf $(PREBUILD_DIR)/local
# Install settings
-install -Dm 755 $(NAME)/main/settings.ini $(BUILD_DIR)/etc/$(USER)/settings.ini.template
# Install systemd services
-install -Dm 755 initbin/$(NAME)web.service $(BUILD_DIR)/etc/systemd/system/$(NAME)web.service
-install -Dm 755 initbin/$(NAME)worker.service $(BUILD_DIR)/etc/systemd/system/$(NAME)worker.service
# Install tmpdirs config
-install -Dm 755 initbin/$(NAME).conf $(BUILD_DIR)/etc/tmpfiles.d/$(NAME).conf
# Create tmpdirs
-mkdir -p $(BUILD_DIR)/var/{log,run,lock}/$(NAME)

install:
$(PIP) install dist/$(ARCHIVE) django\>=1.8,\<1.12
# Change owner for packages
-chown -R $(USER):$(USER) $(PREBUILD_DIR) $(BUILD_DIR)/var/{log,run,lock}/$(NAME) $(BUILD_DIR)/etc/$(USER)
# Copy build
cp -rf $(BUILD_DIR)/* /
$(MAKE) clean_prebuild

uninstall:
$(PIP) uninstall $(NAME)
-rm -rf $(INSTALL_DIR)

clean_prebuild:
-rm -rf $(BUILD_DIR)/*

clean: build-clean
find ./polemarch -name "*.c" -print0 | xargs -0 rm -rf
Expand All @@ -79,13 +123,13 @@ fclean: clean
find ./polemarch -name "*.c" -print0 | xargs -0 rm -rf
-rm -rf .tox

rpm: compile
rpm:
echo "$$RPM_SPEC" > polemarch.spec
rm -rf ~/rpmbuild
mkdir -p ~/rpmbuild/SOURCES/
ls -la
cp -vf dist/$(ARCHIVE) ~/rpmbuild/SOURCES
rpmbuild --verbose -bb polemarch.spec
mkdir -p dist
cp -v ~/rpmbuild/RPMS/x86_64/*.rpm dist/
rm polemarch.spec

Expand All @@ -108,11 +152,14 @@ deb:
chmod +x debian/prerm
chmod +x debian/postrm
# build
dpkg-buildpackage -uc -us
dpkg-buildpackage -d -uc -us
mv -v ../$(NAME)_$(VER)*.deb dist/
# cleanup
rm -rf debian

compose_down:
docker-compose -f $(COMPOSE) down

compose:
docker-compose -f $(COMPOSE) build

Expand Down
25 changes: 3 additions & 22 deletions deb.mk
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,14 @@ export DEBIAN_COPYRIGHT

# paths and executables variables
BUILDROOT = debian/$(NAME)
INSTALLDIR = opt/$(NAME)
define DEBIAN_RULES
#!/usr/bin/make -f
# maximum verbosity during deb build
DH_VERBOSE = 1
export DH_OPTIONS=-v
# targets, that we want to override with no actions
override_dh_auto_build:
# don't need becouse all makes in 'override_dh_auto_install' target
override_dh_auto_test:
# don't want to test during package build
override_dh_strip:
Expand All @@ -65,27 +66,7 @@ override_dh_auto_install:
mkdir -p $(BUILDROOT)
touch $(BUILDROOT)/dummy
rm -rf $(BUILDROOT)/*
# install our package with all required python dependencies in virtualenv
virtualenv --no-site-packages $(BUILDROOT)/$(INSTALLDIR)
rm -rf $(BUILDROOT)/$(INSTALLDIR)/local
$(BUILDROOT)/$(INSTALLDIR)/bin/pip install $(PIPARGS) -r requirements-doc.txt
$(BUILDROOT)/$(INSTALLDIR)/bin/pip install $(PIPARGS) dist/$(NAME)-$(VER).tar.gz
$(BUILDROOT)/$(INSTALLDIR)/bin/pip install $(PIPARGS) -r requirements-git.txt
find $(BUILDROOT)/ -name "RECORD" -exec rm -rf {} \;
venvctrl-relocate --source=$(BUILDROOT)/$(INSTALLDIR) --destination=/$(INSTALLDIR)
find $(BUILDROOT)/$(INSTALLDIR)/lib -type f -name "*.c" -print0 | xargs -0 rm -rf
# system folders which is needed for application to work (lob, lock, etc)
mkdir -p $(BUILDROOT)/var/log/$(NAME)
mkdir -p $(BUILDROOT)/var/run/$(NAME)
mkdir -p $(BUILDROOT)/var/lock/$(NAME)
mkdir -p $(BUILDROOT)/etc/$(NAME)
# systemd services
mkdir -p $(BUILDROOT)/etc/systemd/system/
mkdir -p $(BUILDROOT)/etc/tmpfiles.d/
cp initbin/*.service $(BUILDROOT)/etc/systemd/system/
cp initbin/*.conf $(BUILDROOT)/etc/tmpfiles.d/
# settings
cp $(NAME)/main/settings.ini $(BUILDROOT)/etc/$(NAME)/
make BUILD_DIR=$(BUILDROOT)
%:
dh $$@
endef
Expand Down
2 changes: 1 addition & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = 'en'

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand Down
Loading

0 comments on commit 143f6e9

Please sign in to comment.