#67 Fix up the jenkins slave.
Merged 4 years ago by ralph. Opened 4 years ago by ralph.

@@ -17,6 +17,7 @@ 

      wget postgresql make rpmdevtools rpmlint \

      python3-flake8 python3-pylint python3-pytest \

      python3-nose \

+     python3-tox \

      python3-sphinx python3-sphinxcontrib-httpdomain \

    && mkdir -p /usr/local/src/sync2jira \

    && TEMPDIR=$(mktemp -d) \
@@ -35,7 +36,8 @@ 

    && rm -rf "$TEMPDIR" \

    && dnf clean all

  

- COPY sync2jira.spec /usr/local/src/sync2jira/sync2jira.spec

+   # Pull down our spec file.

+ RUN curl https://pagure.io/sync-to-jira/raw/develop/f/sync2jira.spec > /usr/local/src/sync2jira/sync2jira.spec

  

  # install build dependencies for sync2jira

  RUN cd /usr/local/src/sync2jira \

file modified
+1 -1
@@ -1,5 +1,5 @@ 

  jira

- requests==2.14.0

+ requests

  fedmsg

  PyGithub

  urllib3 

\ No newline at end of file

file modified
+3 -58
@@ -1,11 +1,3 @@ 

- %if 0%{?fedora}

- %global py2 2

- %global with_python3 1

- %else

- # On EL7 define %%{py2} as the empty string.

- %define py2 %{nil}

- %endif

- 

  %{!?_licensedir: %global license %%doc}

  

  %global modname sync2jira
@@ -24,27 +16,16 @@ 

  

  BuildRequires:      systemd

  

- BuildRequires:      python%{py2}-devel

- BuildRequires:      python%{py2}-setuptools

- BuildRequires:      python%{py2}-fedmsg-core

- BuildRequires:      python%{py2}-requests

- BuildRequires:      python%{py2}-nose

- BuildRequires:      python%{py2}-mock

- BuildRequires:      python%{py2}-arrow

- %if 0%{?fedora}

- BuildRequires:      python%{py2}-jira

- %endif

- 

- %if 0%{?with_python3}

  BuildRequires:      python3-devel

  BuildRequires:      python3-setuptools

  BuildRequires:      python3-fedmsg-core

+ BuildRequires:      python3-github3py

  BuildRequires:      python3-requests

  BuildRequires:      python3-nose

+ BuildRequires:      python3-pytest

  BuildRequires:      python3-mock

  BuildRequires:      python3-jira

  BuildRequires:      python3-arrow

- %endif

  

  %description

  This is a process that listens to activity on upstream repos on pagure and
@@ -54,25 +35,6 @@ 

  allows you to match one upstream repo (say, 'pungi' on pagure) to a downstream

  project/component pair in Jira (say, 'COMPOSE', and 'Pungi').

  

- %package -n python2-%{modname}

- Summary:            %{sum}

- %{?python_provide:%python_provide python2-%{modname}}

- 

- Requires:           python%{py2}-requests

- Requires:           python%{py2}-fedmsg-core

- %if 0%{?fedora}

- Requires:           python%{py2}-jira

- %endif

- 

- %description -n python2-%{modname}

- This is a process that listens to activity on upstream repos on pagure and

- github via fedmsg, and syncs new issues there to a Jira instance elsewhere.

- 

- Configuration is in /etc/fedmsg.d/. You can maintain a mapping there that

- allows you to match one upstream repo (say, 'pungi' on pagure) to a downstream

- project/component pair in Jira (say, 'COMPOSE', and 'Pungi').

- 

- %if 0%{?with_python3}

  %package -n python3-%{modname}

  Summary:            %{sum}

  %{?python_provide:%python_provide python3-%{modname}}
@@ -80,6 +42,7 @@ 

  Requires:           python3-requests

  Requires:           python3-jira

  Requires:           python3-fedmsg-core

+ Requires:           python3-github3py

  

  %description -n python3-%{modname}

  This is a process that listens to activity on upstream repos on pagure and
@@ -88,7 +51,6 @@ 

  Configuration is in /etc/fedmsg.d/. You can maintain a mapping there that

  allows you to match one upstream repo (say, 'pungi' on pagure) to a downstream

  project/component pair in Jira (say, 'COMPOSE', and 'Pungi').

- %endif

  

  %prep

  %setup -q -n %{modname}-%{upstream_version}
@@ -103,40 +65,23 @@ 

  rm -rf *.egg*

  

  %build

- %py2_build

- %if 0%{?with_python3}

  %py3_build

- %endif

  

  %install

- %py2_install

- %if 0%{?with_python3}

  %py3_install

- %endif

  

  %{__mkdir_p} %{buildroot}%{_unitdir}

  %{__install} -pm644 systemd/sync2jira.service \

      %{buildroot}%{_unitdir}/sync2jira.service

  

  %check

- %{__python2} setup.py test

- %if 0%{?with_python3}

  %{__python3} setup.py test

- %endif

- 

- %files -n python2-%{modname}

- %doc README.rst

- %license LICENSE

- %{python2_sitelib}/%{modname}/

- %{python2_sitelib}/%{modname}-*.egg*

  

- %if 0%{?with_python3}

  %files -n python3-%{modname}

  %doc README.rst

  %license LICENSE

  %{python3_sitelib}/%{modname}/

  %{python3_sitelib}/%{modname}-*.egg*

- %endif

  

  # If built with py3, provide executables in py3 subpackage

  %{_bindir}/sync2jira

file modified
+2 -2
@@ -1,9 +1,9 @@ 

  [tox]

- envlist = {py27,py35},flake8

+ envlist = {py37,py35},flake8

  

  [testenv]

  basepython =

-     py27: python2.7

+     py37: python3.7

      py35: python3.5

  deps =

      -r{toxinidir}/requirements.txt

A couple different changes in here.

Some of the legacy tests use nose tools (from nose.tools import eq_) See test_downstream.py:171

1 new commit added

  • Make sure tox is available in the slave.
4 years ago

Ah, good catch. Will bring that back.

1 new commit added

  • Bring back nose as a dep.
4 years ago

rebased onto 03bb2c6

4 years ago

Pull-Request has been merged by ralph

4 years ago