Skip to content

Commit

Permalink
1.7.2
Browse files Browse the repository at this point in the history
Changelog:
*  Migrate to vstutils 3.0.X.
  *  Use webpack for frontend.
  *  Compile vue templates.
  *  Migrate to `/api/endpoint/` instead of `_bulk`.
  *  Refactoring frontend code.
*  Fix GIT lib.
*  Update dependencies.

Closes vstconsulting/polemarch#98

See merge request polemarch/ce!191
  • Loading branch information
onegreyonewhite committed May 8, 2020
2 parents adb6067 + 09e8cf2 commit 30e5981
Show file tree
Hide file tree
Showing 77 changed files with 11,529 additions and 4,637 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,8 @@ venv.bak/

# mypy
.mypy_cache/

# Frontend
node_modules
polemarch/static/polemarch
yarn-error.log
186 changes: 74 additions & 112 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# set to local images because too long execution
image: onegreyonewhite/tox:tox
default:
image: vstconsulting/images:build

variables:
GET_SOURCES_ATTEMPTS: 3
Expand Down Expand Up @@ -31,57 +32,31 @@ stages:
###########################################
.branch_tests_template: &branch_tests
stage: test
image: onegreyonewhite/tox:tox
image: vstconsulting/images:tox
variables:
TOX_ENVS: ""
before_script:
- if [ "${CI_BUILD_REF_NAME}" != "master" -a "${CI_BUILD_REF_NAME}" != "developer" ]; then export TOX_ARGS="--workdir /tmp/.tox_polemarchplus_${CI_BUILD_REF_NAME}"; fi
script:
- make test ENVS=$TOX_ENVS
- make build-clean
except:
refs:
- tags
only:
refs:
- merge_requests
- web
- master
changes:
- polemarch/main/**/*
- polemarch/api/**/*
- polemarch/__init__.py
- tests.py
- setup.{py,cfg}
- MANIFEST.in
- requirements.txt
- requirements-test.txt
- Makefile
- tox.ini
- .coveragerc
- .gitlab-ci.yml
retry: 2
- tox -e $TOX_ENVS $TOX_ARGS
rules:
- if: '$CI_COMMIT_BRANCH == "master"'
when: on_success
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" || $CI_PIPELINE_SOURCE == "external_pull_request_event"'
when: on_success
- if: '$CI_PIPELINE_SOURCE == "web" && $CI_COMMIT_TAG == null'
when: on_success
- when: never

# Branch tests
###########################################
code_style:
<<: *branch_tests
stage: code_standarts
image: onegreyonewhite/tox:tox
variables:
TOX_ARGS: "--workdir /cache/.tox_polemarch_code"
script:
- make test ENVS=flake,pylint,jshint
except:
refs:
- tags
- issue_building
only:
refs:
- merge_requests
- web
retry: 2
TOX_ENVS: "flake,pylint,jshint"

py37-coverage:
py38-coverage:
<<: *branch_tests
variables:
TOX_ENVS: "$CI_BUILD_NAME"
Expand All @@ -93,47 +68,45 @@ py36-install:

# Realese
###########################################
deploy_environment:
stage: release
image: onegreyonewhite/tox:tox
services:
- name: "docker:19.03-dind"
alias: "docker_service_host"
script:
- tox -e deploy_env
environment:
name: review/$CI_COMMIT_REF_NAME
on_stop: delete_environment
url: http://polemarch-$KUBE_NAMESPACE.$KUBE_INGRESS_BASE_DOMAIN
only:
kubernetes: active
refs:
- branches
when: manual

delete_environment:
stage: release
image: onegreyonewhite/tox:tox
script:
- tox -e destroy_env
environment:
name: review/$CI_COMMIT_REF_NAME
action: stop
only:
kubernetes: active
refs:
- branches
when: manual
#deploy_environment:
# stage: release
# image: vstconsulting/images:tox
# services:
# - name: "docker:19.03-dind"
# alias: "docker_service_host"
# script:
# - tox -e deploy_env
# environment:
# name: review/$CI_COMMIT_REF_NAME
# on_stop: delete_environment
# url: http://polemarch-$KUBE_NAMESPACE.$KUBE_INGRESS_BASE_DOMAIN
# only:
# kubernetes: active
# refs:
# - branches
# when: manual
#
#delete_environment:
# stage: release
# image: vstconsulting/images:tox
# script:
# - tox -e destroy_env
# environment:
# name: review/$CI_COMMIT_REF_NAME
# action: stop
# only:
# kubernetes: active
# refs:
# - branches
# when: manual

release:
stage: release
image: onegreyonewhite/tox:tox
only:
refs:
- master
variables:
- $GIT_ACCESS_USER
- $GIT_ACCESS_PASSWORD
image: vstconsulting/images:tox
rules:
- if: '$CI_COMMIT_BRANCH == "master" && $GIT_ACCESS_USER && $GIT_ACCESS_PASSWORD'
when: on_success
- when: never
before_script:
- url_host=`echo "${CI_REPOSITORY_URL}" | sed -e "s/https:\/\/gitlab-ci-token:.*@//g"`
- git config --global user.name "${GITLAB_USER_NAME}"
Expand All @@ -145,71 +118,60 @@ release:
pages:
stage: release
script:
- make test ENVS=builddoc
- tox -e builddoc $TOX_ARGS
- mv doc/_build/html public
artifacts:
paths:
- public
only:
refs:
- developer
- tags
when: always
rules:
- if: '$CI_COMMIT_BRANCH == "developer" && $GIT_ACCESS_USER && $GIT_ACCESS_PASSWORD'
when: always
- when: never

release_pypi:
stage: release
image: onegreyonewhite/tox:centos6
only:
refs:
- tags
variables:
- $PYPI_UPLOAD_PASSWORD
- $PYPI_UPLOAD_NAME
image: vstconsulting/images:build
rules:
- if: '$CI_COMMIT_TAG && $PYPI_UPLOAD_PASSWORD && $PYPI_UPLOAD_NAME'
when: on_success
allow_failure: true
- when: never
variables:
TOX_ARGS: ""
script:
- make test ENVS=build
- tox -e build $TOX_ARGS
- twine upload -u ${PYPI_UPLOAD_NAME} -p ${PYPI_UPLOAD_PASSWORD} $(find dist/*.{tar.gz,whl})
allow_failure: true
artifacts:
name: "release-packages-${CI_BUILD_REF_NAME}.${CI_BUILD_ID}"
paths:
- dist/

publish_docker:
stage: publish
image: onegreyonewhite/tox:tox
image: vstconsulting/images:tox
services:
- name: 'docker:19.03-dind'
alias: 'docker_service_host'
script:
- pip install tox
- tox -e release-docker
only:
refs:
- tags
variables:
- $POLEMARCH_DOCKER_USER
- $POLEMARCH_DOCKER_PASSWORD
- $POLEMARCH_DOCKER_EMAIL
- $POLEMARCH_DOCKER_IMAGE_NAME
rules:
- if: '$CI_COMMIT_TAG && $POLEMARCH_DOCKER_USER && $POLEMARCH_DOCKER_PASSWORD && $POLEMARCH_DOCKER_EMAIL && $POLEMARCH_DOCKER_IMAGE_NAME'
when: on_success
- when: never

publish_release:
stage: publish
image: onegreyonewhite/tox:ubuntu
image: vstconsulting/images:tox
allow_failure: true
needs: ["release_pypi"]
only:
refs:
- tags
variables:
- $PYPI_UPLOAD_PASSWORD
- $PYPI_UPLOAD_NAME
variables:
TOX_ARGS: ""
rules:
- if: '$CI_COMMIT_TAG && $PYPI_UPLOAD_PASSWORD && $PYPI_UPLOAD_NAME'
when: on_success
- when: never
before_script:
- git config --global user.name "${GITLAB_USER_NAME}"
- git config --global user.email "${GITLAB_USER_EMAIL}"
- git push https://${GITHUB_USER}:${GITHUB_TOKEN}@github.com/vstconsulting/polemarch.git ${CI_COMMIT_TAG} || echo "Failed to upload to github."
script:
- make test ENVS=release
- tox -e release
45 changes: 3 additions & 42 deletions .jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -17,54 +17,15 @@
"devel": true,

"globals": {
"_translate": true,
"addCssClassesToElement": true,
"ApiConnector": true,
"api_connector_config": true,
"moment": true,
"app": true,
"BaseEntityConstructor": true,
"base_field_content_readonly_mixin": true,
"base_field_label_mixin": true,
"capitalizeString": true,
"current_view": true,
"deepEqual": true,
"ErrorHandler": true,
"fieldsRegistrator": true,
"field_fk_content_readonly_mixin": true,
"findClosestPath": true,
"guiFields": true,
"guiLocalSettings": true,
"guiPopUp": true,
"guiSkins": true,
"guiWidgets": true,
"gui_fields_mixins": true,
"guiCustomizer": true,
"guiDashboard": true,
"guiModels": true,
"guiQuerySets": true,
"hostname": true,
"IMask": true,
"isEmptyObject": true,
"iziToast": true,
"modal_window_and_button_mixin": true,
"moment": true,
"my_user_id": true,
"onLoadingErrorHandler": true,
"openapi_dictionary": true,
"path_pk_key": true,
"pop_up_msg": true,
"project_connected_models_dict": true,
"StatusError": true,
"SubViewWithOutApiPathConstructor": true,
"table_row_mixin": true,
"tabSignal": true,
"trim": true,
"View": true,
"ViewConstructor": true,
"view_with_autoupdate_mixin": true,
"vst_vue_components": true,
"Vue": true,
"XRegExp": true,
"$": true
"$": true,
"spa": true
}
}
5 changes: 2 additions & 3 deletions autorelease.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
#!/usr/bin/env bash
CURRENT_VERSION=$(python setup.py --version | tr -d '\n')
CURRENT_VERSION=$(python3 setup.py --version | tr -d '\n')
TAG=$(git tag -l $CURRENT_VERSION)
MESSAGE=${CI_COMMIT_MESSAGE:-"Release ${CURRENT_VERSION}"}

if [ -z "${TAG}" ]; then
echo "Creating new tag ${CURRENT_VERSION}.";
git tag $CURRENT_VERSION -m "${MESSAGE}"> /dev/null 2>&1;
git tag $CURRENT_VERSION > /dev/null 2>&1;
git push origin $CURRENT_VERSION > /dev/null 2>&1;
else
echo "Current release ${CURRENT_VERSION} already exists. Update version to release."
Expand Down
6 changes: 0 additions & 6 deletions doc/_static/custom.css

This file was deleted.

23 changes: 14 additions & 9 deletions doc/api_schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ info:
url: https://gitlab.com/vstconsulting/polemarch.git
Request:
- name: Question
url: https://gitlab.com/vstconsulting/polemarch/issues/new?issuable_template%5D=Ask&issue%5Btitle%5D=Ask%20about%20version%201.6.2
url: https://gitlab.com/vstconsulting/polemarch/issues/new?issuable_template%5D=Ask&issue%5Btitle%5D=Ask%20about%20version%201.7.0
- name: Bug report
url: https://gitlab.com/vstconsulting/polemarch/issues/new?issuable_template%5D=Bug&issue%5Btitle%5D=Bug%20in%20version%201.6.2
url: https://gitlab.com/vstconsulting/polemarch/issues/new?issuable_template%5D=Bug&issue%5Btitle%5D=Bug%20in%20version%201.7.0
- name: Feature request
url: https://gitlab.com/vstconsulting/polemarch/issues/new?issuable_template%5D=Feature%20request&issue%5Btitle%5D=
x-menu:
- name: Projects
span_class: fa fa-fort-awesome
span_class: fab fa-fort-awesome
url: /project
- name: Community
span_class: fa fa-cloud
Expand All @@ -38,7 +38,7 @@ info:
span_class: fa fa-tasks
url: /group
- name: Hosts
span_class: fa fa-codepen
span_class: fab fa-codepen
url: /host
url: /inventory
- name: History
Expand All @@ -53,13 +53,18 @@ info:
- name: Hooks
span_class: fa fa-plug
url: /hook
x-settings:
static_path: /static/
enable_gravatar: true
time_zone: UTC
x-versions:
application: 1.6.2
library: 1.6.2
vstutils: 2.15.1
django: 2.2.7
ansible: 2.9.2
application: 1.7.0
library: 1.7.0
vstutils: 3.0.0b7
django: 2.2.10
ansible: 2.9.5
version: v2
x-user-id: 1
host: localhost:8080
schemes:
- http
Expand Down
Loading

0 comments on commit 30e5981

Please sign in to comment.