Compare commits
3 Commits
Author | SHA1 | Date |
---|---|---|
|
40f19989fe | |
|
1dde74203b | |
|
58d9351bf5 |
|
@ -0,0 +1,12 @@
|
||||||
|
FROM fedora:28
|
||||||
|
|
||||||
|
RUN useradd -M -l -u 3000018 jenkins
|
||||||
|
RUN dnf install -y \
|
||||||
|
gcc \
|
||||||
|
git \
|
||||||
|
libjpeg-devel \
|
||||||
|
openssh-clients \
|
||||||
|
python3-devel \
|
||||||
|
rsync \
|
||||||
|
zlib-devel \
|
||||||
|
--
|
|
@ -0,0 +1,34 @@
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
dockerfile {
|
||||||
|
dir 'ci'
|
||||||
|
args '-v /etc/ssh/ssh_known_hosts:/etc/ssh/ssh_known_hosts:ro'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
triggers {
|
||||||
|
pollSCM ''
|
||||||
|
}
|
||||||
|
|
||||||
|
environment {
|
||||||
|
PUBLISH_HOST = 'file0.pyrocufflink.blue'
|
||||||
|
XDG_CACHE_HOME = "${WORKSPACE}"
|
||||||
|
}
|
||||||
|
|
||||||
|
stages {
|
||||||
|
stage('Build') {
|
||||||
|
steps {
|
||||||
|
sh '. ci/build.sh'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Publish') {
|
||||||
|
steps {
|
||||||
|
sshagent(['jenkins-sftp']) {
|
||||||
|
sh '. ci/publish.sh'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
rm -rf .venv
|
||||||
|
python3.6 -m venv .venv
|
||||||
|
|
||||||
|
rm -rf dist
|
||||||
|
.venv/bin/pip install --upgrade pip setuptools wheel
|
||||||
|
.venv/bin/pip wheel -w dist -r requirements.txt .
|
||||||
|
|
||||||
|
sed -i '/^-i/d' requirements.txt
|
|
@ -0,0 +1,9 @@
|
||||||
|
: ${PUBLISH_PATH:=/var/lib/wheels/taiga}
|
||||||
|
|
||||||
|
rsync -rtiO \
|
||||||
|
--delete \
|
||||||
|
--include '*.whl' \
|
||||||
|
--include requirements.txt \
|
||||||
|
dist/ \
|
||||||
|
requirements.txt \
|
||||||
|
${PUBLISH_HOST}:${PUBLISH_PATH%/}/
|
|
@ -0,0 +1,15 @@
|
||||||
|
from setuptools import find_packages, setup
|
||||||
|
|
||||||
|
setup(
|
||||||
|
name='taiga-back',
|
||||||
|
use_scm_version=True,
|
||||||
|
description='taiga-back',
|
||||||
|
url='https://taiga.io/',
|
||||||
|
license='GPL-3',
|
||||||
|
packages=find_packages(
|
||||||
|
exclude=['tests', 'tests.*'],
|
||||||
|
),
|
||||||
|
setup_requires=[
|
||||||
|
'setuptools_scm',
|
||||||
|
],
|
||||||
|
)
|
|
@ -515,13 +515,8 @@ class TagsFilter(FilterBackend):
|
||||||
def _prepare_filter_query(self, query):
|
def _prepare_filter_query(self, query):
|
||||||
return Q(tags__contains=query)
|
return Q(tags__contains=query)
|
||||||
|
|
||||||
def _prepare_exclude_query(self, tags):
|
def _prepare_exclude_query(self, query):
|
||||||
queries = [Q(tags__contains=[tag]) for tag in tags]
|
return ~Q(tags__contains=query)
|
||||||
query = queries.pop()
|
|
||||||
for item in queries:
|
|
||||||
query |= item
|
|
||||||
|
|
||||||
return ~Q(query)
|
|
||||||
|
|
||||||
def filter_queryset(self, request, queryset, view):
|
def filter_queryset(self, request, queryset, view):
|
||||||
operations = {
|
operations = {
|
||||||
|
|
|
@ -476,18 +476,6 @@ def test_api_filters(client, filter_name, collection, expected, exclude_expected
|
||||||
assert len(response.data) == exclude_expected
|
assert len(response.data) == exclude_expected
|
||||||
|
|
||||||
|
|
||||||
def test_mulitple_exclude_filter_tags(client):
|
|
||||||
data = create_filter_issues_context()
|
|
||||||
project = data["project"]
|
|
||||||
client.login(data["users"][0])
|
|
||||||
tags = data["tags"]
|
|
||||||
|
|
||||||
url = "{}?project={}&exclude_tags={},{}".format(reverse('issues-list'), project.id, tags[1], tags[2])
|
|
||||||
response = client.get(url)
|
|
||||||
assert response.status_code == 200
|
|
||||||
assert len(response.data) == 4
|
|
||||||
|
|
||||||
|
|
||||||
def test_api_filters_data(client):
|
def test_api_filters_data(client):
|
||||||
data = create_filter_issues_context()
|
data = create_filter_issues_context()
|
||||||
project = data["project"]
|
project = data["project"]
|
||||||
|
|
Loading…
Reference in New Issue