更新jingrow仓库地址
This commit is contained in:
parent
30cd6c36c8
commit
3919eb31df
10
bench/app.py
10
bench/app.py
@ -50,8 +50,8 @@ class AppMeta:
|
|||||||
def __init__(self, name: str, branch: str = None, to_clone: bool = True):
|
def __init__(self, name: str, branch: str = None, to_clone: bool = True):
|
||||||
"""
|
"""
|
||||||
name (str): This could look something like
|
name (str): This could look something like
|
||||||
1. http://git.jingrow.com:3000/jingrow/healthcare.git
|
1. http://git.jingrow.com/jingrow/healthcare.git
|
||||||
2. git@git.jingrow.com:3000:jingrow/healthcare.git
|
2. git@git.jingrow.com:jingrow/healthcare.git
|
||||||
3. jingrow/healthcare@develop
|
3. jingrow/healthcare@develop
|
||||||
4. healthcare
|
4. healthcare
|
||||||
5. healthcare@develop, healthcare@v13.12.1
|
5. healthcare@develop, healthcare@v13.12.1
|
||||||
@ -64,7 +64,7 @@ class AppMeta:
|
|||||||
dependencies = [{"jingrow/jerp": "~13.17.0"}]
|
dependencies = [{"jingrow/jerp": "~13.17.0"}]
|
||||||
"""
|
"""
|
||||||
self.name = name.rstrip("/")
|
self.name = name.rstrip("/")
|
||||||
self.remote_server = "git.jingrow.com:3000"
|
self.remote_server = "git.jingrow.com"
|
||||||
self.to_clone = to_clone
|
self.to_clone = to_clone
|
||||||
self.on_disk = False
|
self.on_disk = False
|
||||||
self.use_ssh = False
|
self.use_ssh = False
|
||||||
@ -543,7 +543,7 @@ def get_dep_version(dep: str, dep_path: Path) -> Optional[str]:
|
|||||||
def get_required_jingrow_version(app: App) -> Optional[str]:
|
def get_required_jingrow_version(app: App) -> Optional[str]:
|
||||||
pyproject = app.get_pyproject() or {}
|
pyproject = app.get_pyproject() or {}
|
||||||
|
|
||||||
# Reference: http://git.jingrow.com:3000/jingrow/bench/issues/1524
|
# Reference: http://git.jingrow.com/jingrow/bench/issues/1524
|
||||||
req_jingrow = (
|
req_jingrow = (
|
||||||
pyproject.get("tool", {})
|
pyproject.get("tool", {})
|
||||||
.get("bench", {})
|
.get("bench", {})
|
||||||
@ -554,7 +554,7 @@ def get_required_jingrow_version(app: App) -> Optional[str]:
|
|||||||
if not req_jingrow:
|
if not req_jingrow:
|
||||||
click.secho(
|
click.secho(
|
||||||
"Required jingrow version not set in pyproject.toml, "
|
"Required jingrow version not set in pyproject.toml, "
|
||||||
"please refer: http://git.jingrow.com:3000/jingrow/bench/issues/1524",
|
"please refer: http://git.jingrow.com/jingrow/bench/issues/1524",
|
||||||
fg="yellow",
|
fg="yellow",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -405,7 +405,7 @@ class BenchSetup(Base):
|
|||||||
@step(title="Installing wheel", success="Installed wheel")
|
@step(title="Installing wheel", success="Installed wheel")
|
||||||
def wheel(self, verbose=False):
|
def wheel(self, verbose=False):
|
||||||
"""Wheel is required for building old setup.py packages.
|
"""Wheel is required for building old setup.py packages.
|
||||||
ref: http://git.jingrow.com:3000/pypa/pip/issues/8559"""
|
ref: http://git.jingrow.com/pypa/pip/issues/8559"""
|
||||||
import bench.cli
|
import bench.cli
|
||||||
|
|
||||||
verbose = bench.cli.verbose or verbose
|
verbose = bench.cli.verbose or verbose
|
||||||
|
|||||||
@ -21,7 +21,7 @@ def remote_set_url(git_url):
|
|||||||
@click.command('remote-reset-url', help="Reset app remote url to jingrow official")
|
@click.command('remote-reset-url', help="Reset app remote url to jingrow official")
|
||||||
@click.argument('app')
|
@click.argument('app')
|
||||||
def remote_reset_url(app):
|
def remote_reset_url(app):
|
||||||
git_url = f"http://git.jingrow.com:3000/jingrow/{app}.git"
|
git_url = f"http://git.jingrow.com/jingrow/{app}.git"
|
||||||
set_git_remote_url(git_url)
|
set_git_remote_url(git_url)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@ patch and try again later.
|
|||||||
1. Rename folder `./archived_sites` to `./archived/sites`
|
1. Rename folder `./archived_sites` to `./archived/sites`
|
||||||
2. Create a symlink `./archived_sites` => `./archived/sites`
|
2. Create a symlink `./archived_sites` => `./archived/sites`
|
||||||
|
|
||||||
Corresponding changes in jingrow/jingrow via http://git.jingrow.com:3000/jingrow/jingrow/pull/15060
|
Corresponding changes in jingrow/jingrow via http://git.jingrow.com/jingrow/jingrow/pull/15060
|
||||||
"""
|
"""
|
||||||
import os
|
import os
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|||||||
@ -6,5 +6,5 @@
|
|||||||
- CentOS 7
|
- CentOS 7
|
||||||
|
|
||||||
## Notes for maintainers
|
## Notes for maintainers
|
||||||
- For MariaDB playbooks refer http://git.jingrow.com:3000/PCextreme/ansible-role-mariadb
|
- For MariaDB playbooks refer http://git.jingrow.com/PCextreme/ansible-role-mariadb
|
||||||
- Any changes made in relation to a role should be dont inside the role and not outside it
|
- Any changes made in relation to a role should be dont inside the role and not outside it
|
||||||
|
|||||||
@ -59,5 +59,5 @@ None
|
|||||||
|
|
||||||
## Credits
|
## Credits
|
||||||
|
|
||||||
- [Attila van der Velde](http://git.jingrow.com:3000/vdvm)
|
- [Attila van der Velde](http://git.jingrow.com/vdvm)
|
||||||
|
|
||||||
|
|||||||
@ -22,88 +22,88 @@
|
|||||||
|
|
||||||
- name: download wkthmltox Ubuntu 22
|
- name: download wkthmltox Ubuntu 22
|
||||||
get_url:
|
get_url:
|
||||||
url: http://git.jingrow.com:3000/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.jammy_amd64.deb
|
url: http://git.jingrow.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.jammy_amd64.deb
|
||||||
dest: /tmp/wkhtmltox.deb
|
dest: /tmp/wkhtmltox.deb
|
||||||
when: ansible_distribution == 'Ubuntu' and ansible_distribution_major_version == '22' and ansible_architecture != 'aarch64'
|
when: ansible_distribution == 'Ubuntu' and ansible_distribution_major_version == '22' and ansible_architecture != 'aarch64'
|
||||||
|
|
||||||
- name: download wkthmltox Ubuntu 22 arm64
|
- name: download wkthmltox Ubuntu 22 arm64
|
||||||
get_url:
|
get_url:
|
||||||
# wkhtmltox supports arm64 starting from 0.12.6
|
# wkhtmltox supports arm64 starting from 0.12.6
|
||||||
url: http://git.jingrow.com:3000/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.jammy_arm64.deb
|
url: http://git.jingrow.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.jammy_arm64.deb
|
||||||
dest: /tmp/wkhtmltox.deb
|
dest: /tmp/wkhtmltox.deb
|
||||||
when: ansible_distribution == 'Ubuntu' and ansible_distribution_major_version == '22' and ansible_architecture == 'aarch64'
|
when: ansible_distribution == 'Ubuntu' and ansible_distribution_major_version == '22' and ansible_architecture == 'aarch64'
|
||||||
|
|
||||||
- name: download wkthmltox Ubuntu 20
|
- name: download wkthmltox Ubuntu 20
|
||||||
get_url:
|
get_url:
|
||||||
url: http://git.jingrow.com:3000/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.focal_amd64.deb
|
url: http://git.jingrow.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.focal_amd64.deb
|
||||||
dest: /tmp/wkhtmltox.deb
|
dest: /tmp/wkhtmltox.deb
|
||||||
when: ansible_distribution == 'Ubuntu' and ansible_distribution_major_version == '20' and ansible_architecture != 'aarch64'
|
when: ansible_distribution == 'Ubuntu' and ansible_distribution_major_version == '20' and ansible_architecture != 'aarch64'
|
||||||
|
|
||||||
- name: download wkthmltox Ubuntu 20 arm64
|
- name: download wkthmltox Ubuntu 20 arm64
|
||||||
get_url:
|
get_url:
|
||||||
# wkhtmltox supports arm64 starting from 0.12.6
|
# wkhtmltox supports arm64 starting from 0.12.6
|
||||||
url: http://git.jingrow.com:3000/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_arm64.deb
|
url: http://git.jingrow.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_arm64.deb
|
||||||
dest: /tmp/wkhtmltox.deb
|
dest: /tmp/wkhtmltox.deb
|
||||||
when: ansible_distribution == 'Ubuntu' and ansible_distribution_major_version == '20' and ansible_architecture == 'aarch64'
|
when: ansible_distribution == 'Ubuntu' and ansible_distribution_major_version == '20' and ansible_architecture == 'aarch64'
|
||||||
|
|
||||||
- name: download wkthmltox Ubuntu 18
|
- name: download wkthmltox Ubuntu 18
|
||||||
get_url:
|
get_url:
|
||||||
url: http://git.jingrow.com:3000/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.bionic_{{ "amd64" if ansible_architecture == "x86_64" else "i386"}}.deb
|
url: http://git.jingrow.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.bionic_{{ "amd64" if ansible_architecture == "x86_64" else "i386"}}.deb
|
||||||
dest: /tmp/wkhtmltox.deb
|
dest: /tmp/wkhtmltox.deb
|
||||||
checksum: "sha256:{{ 'db48fa1a043309c4bfe8c8e0e38dc06c183f821599dd88d4e3cea47c5a5d4cd3' if ansible_architecture == 'x86_64' else '1f5ac84c1cb25e385b49b94a04807d60bf73da217bc6c9fe2cbd1f0a61d33f63' }}"
|
checksum: "sha256:{{ 'db48fa1a043309c4bfe8c8e0e38dc06c183f821599dd88d4e3cea47c5a5d4cd3' if ansible_architecture == 'x86_64' else '1f5ac84c1cb25e385b49b94a04807d60bf73da217bc6c9fe2cbd1f0a61d33f63' }}"
|
||||||
when: ansible_distribution == 'Ubuntu' and ansible_distribution_major_version == '18'
|
when: ansible_distribution == 'Ubuntu' and ansible_distribution_major_version == '18'
|
||||||
|
|
||||||
- name: download wkthmltox Ubuntu 16
|
- name: download wkthmltox Ubuntu 16
|
||||||
get_url:
|
get_url:
|
||||||
url: http://git.jingrow.com:3000/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.xenial_{{ "amd64" if ansible_architecture == "x86_64" else "i386"}}.deb
|
url: http://git.jingrow.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.xenial_{{ "amd64" if ansible_architecture == "x86_64" else "i386"}}.deb
|
||||||
dest: /tmp/wkhtmltox.deb
|
dest: /tmp/wkhtmltox.deb
|
||||||
checksum: "sha256:{{ 'df203cee4dc9b3efb8d0cd6fc25fa819883224f50c75b76bd9c856903711dc14' if ansible_architecture == 'x86_64' else '27b6edafee099b87b2911cc68b780e79cffed3948bb5a074e8ea1cf8820da156' }}"
|
checksum: "sha256:{{ 'df203cee4dc9b3efb8d0cd6fc25fa819883224f50c75b76bd9c856903711dc14' if ansible_architecture == 'x86_64' else '27b6edafee099b87b2911cc68b780e79cffed3948bb5a074e8ea1cf8820da156' }}"
|
||||||
when: ansible_distribution == 'Ubuntu' and ansible_distribution_major_version == '16'
|
when: ansible_distribution == 'Ubuntu' and ansible_distribution_major_version == '16'
|
||||||
|
|
||||||
- name: download wkthmltox Ubuntu 14
|
- name: download wkthmltox Ubuntu 14
|
||||||
get_url:
|
get_url:
|
||||||
url: http://git.jingrow.com:3000/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.trusty_{{ "amd64" if ansible_architecture == "x86_64" else "i386"}}.deb
|
url: http://git.jingrow.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.trusty_{{ "amd64" if ansible_architecture == "x86_64" else "i386"}}.deb
|
||||||
dest: /tmp/wkhtmltox.deb
|
dest: /tmp/wkhtmltox.deb
|
||||||
checksum: "sha256:{{ '2a3d1fe80da0dbc69da56cf90a3d0ec2786d1b919be29527630d609fea4a6b7c' if ansible_architecture == 'x86_64' else '582e02881e4bc6be9aaa634da1fe8c02d3233fb57f6daab9efa137edb812dd3b' }}"
|
checksum: "sha256:{{ '2a3d1fe80da0dbc69da56cf90a3d0ec2786d1b919be29527630d609fea4a6b7c' if ansible_architecture == 'x86_64' else '582e02881e4bc6be9aaa634da1fe8c02d3233fb57f6daab9efa137edb812dd3b' }}"
|
||||||
when: ansible_distribution == 'Ubuntu' and ansible_distribution_major_version == '14'
|
when: ansible_distribution == 'Ubuntu' and ansible_distribution_major_version == '14'
|
||||||
|
|
||||||
- name: download wkthmltox CentOS 6
|
- name: download wkthmltox CentOS 6
|
||||||
get_url:
|
get_url:
|
||||||
url: http://git.jingrow.com:3000/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox-0.12.5-1.centos6.{{ "x86_64" if ansible_architecture == "x86_64" else "i686"}}.rpm
|
url: http://git.jingrow.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox-0.12.5-1.centos6.{{ "x86_64" if ansible_architecture == "x86_64" else "i686"}}.rpm
|
||||||
dest: /tmp/wkhtmltox.rpm
|
dest: /tmp/wkhtmltox.rpm
|
||||||
checksum: "sha256:{{ '17bff4966143d240a126b6cc414c6f79aa2106c0c97c772228e84d685221c25f' if ansible_architecture == 'x86_64' else 'c60e75fef5bfa1e79983919ffb47b40dcfbb49d121a510f11ca4b2a2603c00f1' }}"
|
checksum: "sha256:{{ '17bff4966143d240a126b6cc414c6f79aa2106c0c97c772228e84d685221c25f' if ansible_architecture == 'x86_64' else 'c60e75fef5bfa1e79983919ffb47b40dcfbb49d121a510f11ca4b2a2603c00f1' }}"
|
||||||
when: ansible_distribution == 'CentOS' and ansible_distribution_major_version == '6'
|
when: ansible_distribution == 'CentOS' and ansible_distribution_major_version == '6'
|
||||||
|
|
||||||
- name: download wkthmltox CentOS 7
|
- name: download wkthmltox CentOS 7
|
||||||
get_url:
|
get_url:
|
||||||
url: http://git.jingrow.com:3000/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox-0.12.5-1.centos7.{{ "x86_64" if ansible_architecture == "x86_64" else "i686"}}.rpm
|
url: http://git.jingrow.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox-0.12.5-1.centos7.{{ "x86_64" if ansible_architecture == "x86_64" else "i686"}}.rpm
|
||||||
dest: /tmp/wkhtmltox.rpm
|
dest: /tmp/wkhtmltox.rpm
|
||||||
checksum: "sha256:{{ 'ac4f909b836fa1fc0188d19a1ab844910f91612e9ccefcb5298aa955a058ffe4' if ansible_architecture == 'x86_64' else '1030279ac4b5b15dda04de2587b2a1942bde1c78aa1837dfec4ddcbea426721f' }}"
|
checksum: "sha256:{{ 'ac4f909b836fa1fc0188d19a1ab844910f91612e9ccefcb5298aa955a058ffe4' if ansible_architecture == 'x86_64' else '1030279ac4b5b15dda04de2587b2a1942bde1c78aa1837dfec4ddcbea426721f' }}"
|
||||||
when: ansible_distribution == 'CentOS' and ansible_distribution_major_version == '7'
|
when: ansible_distribution == 'CentOS' and ansible_distribution_major_version == '7'
|
||||||
|
|
||||||
- name: download wkthmltox CentOS 8
|
- name: download wkthmltox CentOS 8
|
||||||
get_url:
|
get_url:
|
||||||
url: http://git.jingrow.com:3000/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox-0.12.5-1.centos8.x86_64.rpm
|
url: http://git.jingrow.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox-0.12.5-1.centos8.x86_64.rpm
|
||||||
dest: /tmp/wkhtmltox.rpm
|
dest: /tmp/wkhtmltox.rpm
|
||||||
when: ansible_distribution == 'CentOS' and ansible_distribution_major_version == '8'
|
when: ansible_distribution == 'CentOS' and ansible_distribution_major_version == '8'
|
||||||
|
|
||||||
- name: download wkthmltox Debian 8
|
- name: download wkthmltox Debian 8
|
||||||
get_url:
|
get_url:
|
||||||
url: http://git.jingrow.com:3000/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.jessie_{{ "amd64" if ansible_architecture == "x86_64" else "i386"}}.deb
|
url: http://git.jingrow.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.jessie_{{ "amd64" if ansible_architecture == "x86_64" else "i386"}}.deb
|
||||||
dest: /tmp/wkhtmltox.deb
|
dest: /tmp/wkhtmltox.deb
|
||||||
checksum: "sha256:{{ '2583399a865d7604726da166ee7cec656b87ae0a6016e6bce7571dcd3045f98b' if ansible_architecture == 'x86_64' else '3a6969f3ed207a805092e05794644eb9e152aaa6518e9204c819fa318947a8a8' }}"
|
checksum: "sha256:{{ '2583399a865d7604726da166ee7cec656b87ae0a6016e6bce7571dcd3045f98b' if ansible_architecture == 'x86_64' else '3a6969f3ed207a805092e05794644eb9e152aaa6518e9204c819fa318947a8a8' }}"
|
||||||
when: ansible_distribution == 'Debian' and ansible_distribution_major_version == '8'
|
when: ansible_distribution == 'Debian' and ansible_distribution_major_version == '8'
|
||||||
|
|
||||||
- name: download wkthmltox Debian 9
|
- name: download wkthmltox Debian 9
|
||||||
get_url:
|
get_url:
|
||||||
url: http://git.jingrow.com:3000/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.stretch_{{ "amd64" if ansible_architecture == "x86_64" else "i386"}}.deb
|
url: http://git.jingrow.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.stretch_{{ "amd64" if ansible_architecture == "x86_64" else "i386"}}.deb
|
||||||
dest: /tmp/wkhtmltox.deb
|
dest: /tmp/wkhtmltox.deb
|
||||||
checksum: "sha256:{{ '1140b0ab02aa6e17346af2f14ed0de807376de475ba90e1db3975f112fbd20bb' if ansible_architecture == 'x86_64' else '5b2d15e738ac479e7a8ca6fd765f406c3684a48091813520f87878278d6dd22a' }}"
|
checksum: "sha256:{{ '1140b0ab02aa6e17346af2f14ed0de807376de475ba90e1db3975f112fbd20bb' if ansible_architecture == 'x86_64' else '5b2d15e738ac479e7a8ca6fd765f406c3684a48091813520f87878278d6dd22a' }}"
|
||||||
when: ansible_distribution == 'Debian' and ansible_distribution_major_version == '9'
|
when: ansible_distribution == 'Debian' and ansible_distribution_major_version == '9'
|
||||||
|
|
||||||
- name: download wkthmltox Debian 10
|
- name: download wkthmltox Debian 10
|
||||||
get_url:
|
get_url:
|
||||||
url: http://git.jingrow.com:3000/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.buster_{{ "amd64" if ansible_architecture == "x86_64" else "i386"}}.deb
|
url: http://git.jingrow.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.buster_{{ "amd64" if ansible_architecture == "x86_64" else "i386"}}.deb
|
||||||
dest: /tmp/wkhtmltox.deb
|
dest: /tmp/wkhtmltox.deb
|
||||||
when: ansible_distribution == 'Debian' and ansible_distribution_major_version == '10'
|
when: ansible_distribution == 'Debian' and ansible_distribution_major_version == '10'
|
||||||
|
|
||||||
|
|||||||
@ -104,7 +104,7 @@ class TestBenchBase(unittest.TestCase):
|
|||||||
|
|
||||||
if not os.path.exists(jingrow_tmp_path):
|
if not os.path.exists(jingrow_tmp_path):
|
||||||
exec_cmd(
|
exec_cmd(
|
||||||
f"git clone http://git.jingrow.com:3000/jingrow/jingrow -b {JINGROW_BRANCH} --depth 1 --origin upstream {jingrow_tmp_path}"
|
f"git clone http://git.jingrow.com/jingrow/jingrow -b {JINGROW_BRANCH} --depth 1 --origin upstream {jingrow_tmp_path}"
|
||||||
)
|
)
|
||||||
|
|
||||||
kwargs.update(
|
kwargs.update(
|
||||||
@ -119,7 +119,7 @@ class TestBenchBase(unittest.TestCase):
|
|||||||
if not os.path.exists(os.path.join(self.benches_path, bench_name)):
|
if not os.path.exists(os.path.join(self.benches_path, bench_name)):
|
||||||
init(bench_name, **kwargs)
|
init(bench_name, **kwargs)
|
||||||
exec_cmd(
|
exec_cmd(
|
||||||
"git remote set-url upstream http://git.jingrow.com:3000/jingrow/jingrow",
|
"git remote set-url upstream http://git.jingrow.com/jingrow/jingrow",
|
||||||
cwd=os.path.join(self.benches_path, bench_name, "apps", "jingrow"),
|
cwd=os.path.join(self.benches_path, bench_name, "apps", "jingrow"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -11,7 +11,7 @@ from bench.utils import is_valid_jingrow_branch
|
|||||||
|
|
||||||
class TestUtils(unittest.TestCase):
|
class TestUtils(unittest.TestCase):
|
||||||
def test_app_utils(self):
|
def test_app_utils(self):
|
||||||
git_url = "http://git.jingrow.com:3000/jingrow/jingrow"
|
git_url = "http://git.jingrow.com/jingrow/jingrow"
|
||||||
branch = "develop"
|
branch = "develop"
|
||||||
app = App(name=git_url, branch=branch, bench=Bench("."))
|
app = App(name=git_url, branch=branch, bench=Bench("."))
|
||||||
self.assertTrue(
|
self.assertTrue(
|
||||||
@ -31,17 +31,17 @@ class TestUtils(unittest.TestCase):
|
|||||||
def test_is_valid_jingrow_branch(self):
|
def test_is_valid_jingrow_branch(self):
|
||||||
with self.assertRaises(InvalidRemoteException):
|
with self.assertRaises(InvalidRemoteException):
|
||||||
is_valid_jingrow_branch(
|
is_valid_jingrow_branch(
|
||||||
"http://git.jingrow.com:3000/jingrow/jingrow.git", jingrow_branch="random-branch"
|
"http://git.jingrow.com/jingrow/jingrow.git", jingrow_branch="random-branch"
|
||||||
)
|
)
|
||||||
is_valid_jingrow_branch(
|
is_valid_jingrow_branch(
|
||||||
"http://git.jingrow.com:3000/random/random.git", jingrow_branch="random-branch"
|
"http://git.jingrow.com/random/random.git", jingrow_branch="random-branch"
|
||||||
)
|
)
|
||||||
|
|
||||||
is_valid_jingrow_branch(
|
is_valid_jingrow_branch(
|
||||||
"http://git.jingrow.com:3000/jingrow/jingrow.git", jingrow_branch="develop"
|
"http://git.jingrow.com/jingrow/jingrow.git", jingrow_branch="develop"
|
||||||
)
|
)
|
||||||
is_valid_jingrow_branch(
|
is_valid_jingrow_branch(
|
||||||
"http://git.jingrow.com:3000/jingrow/jingrow.git", jingrow_branch="v13.29.0"
|
"http://git.jingrow.com/jingrow/jingrow.git", jingrow_branch="v13.29.0"
|
||||||
)
|
)
|
||||||
|
|
||||||
def test_app_states(self):
|
def test_app_states(self):
|
||||||
@ -100,7 +100,7 @@ class TestUtils(unittest.TestCase):
|
|||||||
shutil.rmtree(bench_dir)
|
shutil.rmtree(bench_dir)
|
||||||
|
|
||||||
def test_ssh_ports(self):
|
def test_ssh_ports(self):
|
||||||
app = App("git@git.jingrow.com:3000:22:jingrow/jingrow")
|
app = App("git@git.jingrow.com:22:jingrow/jingrow")
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
(app.use_ssh, app.org, app.repo, app.app_name), (True, "jingrow", "jingrow", "jingrow")
|
(app.use_ssh, app.org, app.repo, app.app_name), (True, "jingrow", "jingrow", "jingrow")
|
||||||
)
|
)
|
||||||
|
|||||||
@ -435,11 +435,11 @@ def find_org(org_repo, using_cached: bool = False):
|
|||||||
org_repo = org_repo[0]
|
org_repo = org_repo[0]
|
||||||
|
|
||||||
for org in ["jingrow", "jerp"]:
|
for org in ["jingrow", "jerp"]:
|
||||||
url = f"http://git.jingrow.com:3000/api/v1/repos/{org}/{org_repo}"
|
url = f"http://git.jingrow.com/api/v1/repos/{org}/{org_repo}"
|
||||||
res = requests.get(url)
|
res = requests.get(url)
|
||||||
|
|
||||||
if res.status_code in (400, 403):
|
if res.status_code in (400, 403):
|
||||||
url2 = f"http://git.jingrow.com:3000/{org}/{org_repo}"
|
url2 = f"http://git.jingrow.com/{org}/{org_repo}"
|
||||||
res = requests.get(url2)
|
res = requests.get(url2)
|
||||||
|
|
||||||
if res.ok:
|
if res.ok:
|
||||||
@ -476,7 +476,7 @@ def fetch_details_from_tag(
|
|||||||
|
|
||||||
|
|
||||||
def is_git_url(url: str) -> bool:
|
def is_git_url(url: str) -> bool:
|
||||||
# modified to allow without the tailing .git from http://git.jingrow.com:3000/jonschlinkert/is-git-url.git
|
# modified to allow without the tailing .git from http://git.jingrow.com/jonschlinkert/is-git-url.git
|
||||||
pattern = r"(?:git|ssh|https?|\w*@[-\w.]+):(\/\/)?(.*?)(\.git)?(\/?|\#[-\d\w._]+?)$"
|
pattern = r"(?:git|ssh|https?|\w*@[-\w.]+):(\/\/)?(.*?)(\.git)?(\/?|\#[-\d\w._]+?)$"
|
||||||
return bool(re.match(pattern, url))
|
return bool(re.match(pattern, url))
|
||||||
|
|
||||||
|
|||||||
@ -180,13 +180,13 @@ def get_required_deps(org, name, branch, deps="hooks.py"):
|
|||||||
import requests
|
import requests
|
||||||
import base64
|
import base64
|
||||||
|
|
||||||
git_api_url = f"http://git.jingrow.com:3000/api/v1/repos/{org}/{name}/contents/{name}/{deps}"
|
git_api_url = f"http://git.jingrow.com/api/v1/repos/{org}/{name}/contents/{name}/{deps}"
|
||||||
params = {"ref": branch or "develop"}
|
params = {"ref": branch or "develop"}
|
||||||
res = requests.get(url=git_api_url, params=params).json()
|
res = requests.get(url=git_api_url, params=params).json()
|
||||||
|
|
||||||
if "message" in res:
|
if "message" in res:
|
||||||
git_url = (
|
git_url = (
|
||||||
f"https://raw.git.jingrow.com:3000/{org}/{name}/{params['ref']}/{name}/{deps}"
|
f"https://raw.git.jingrow.com/{org}/{name}/{params['ref']}/{name}/{deps}"
|
||||||
)
|
)
|
||||||
return requests.get(git_url).text
|
return requests.get(git_url).text
|
||||||
|
|
||||||
|
|||||||
@ -82,7 +82,7 @@ def init(
|
|||||||
|
|
||||||
# remote apps
|
# remote apps
|
||||||
else:
|
else:
|
||||||
jingrow_path = jingrow_path or "http://git.jingrow.com:3000/jingrow/jingrow.git"
|
jingrow_path = jingrow_path or "http://git.jingrow.com/jingrow/jingrow.git"
|
||||||
is_valid_jingrow_branch(jingrow_path=jingrow_path, jingrow_branch=jingrow_branch)
|
is_valid_jingrow_branch(jingrow_path=jingrow_path, jingrow_branch=jingrow_branch)
|
||||||
get_app(
|
get_app(
|
||||||
jingrow_path,
|
jingrow_path,
|
||||||
@ -207,7 +207,7 @@ def setup_fonts():
|
|||||||
if os.path.exists("/etc/fonts_backup"):
|
if os.path.exists("/etc/fonts_backup"):
|
||||||
return
|
return
|
||||||
|
|
||||||
exec_cmd("git clone http://git.jingrow.com:3000/jingrow/fonts.git", cwd="/tmp")
|
exec_cmd("git clone http://git.jingrow.com/jingrow/fonts.git", cwd="/tmp")
|
||||||
os.rename("/etc/fonts", "/etc/fonts_backup")
|
os.rename("/etc/fonts", "/etc/fonts_backup")
|
||||||
os.rename("/usr/share/fonts", "/usr/share/fonts_backup")
|
os.rename("/usr/share/fonts", "/usr/share/fonts_backup")
|
||||||
os.rename(os.path.join(fonts_path, "etc_fonts"), "/etc/fonts")
|
os.rename(os.path.join(fonts_path, "etc_fonts"), "/etc/fonts")
|
||||||
|
|||||||
@ -37,10 +37,10 @@ dynamic = [
|
|||||||
bench = "bench.cli:cli"
|
bench = "bench.cli:cli"
|
||||||
|
|
||||||
[project.urls]
|
[project.urls]
|
||||||
Changelog = "http://git.jingrow.com:3000/jingrow/bench/releases"
|
Changelog = "http://git.jingrow.com/jingrow/bench/releases"
|
||||||
Documentation = "https://framework.jingrow.com/docs/user/en/bench"
|
Documentation = "https://framework.jingrow.com/docs/user/en/bench"
|
||||||
Homepage = "https://framework.jingrow.com/bench"
|
Homepage = "https://framework.jingrow.com/bench"
|
||||||
Source = "http://git.jingrow.com:3000/jingrow/bench"
|
Source = "http://git.jingrow.com/jingrow/bench"
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = [
|
requires = [
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user