Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ python3 setup.py bdist_wheel
pip install --upgrade --force-reinstall dist/sonar_tools-*-py3-*.whl

if [ "$build_image" == "1" ]; then
docker build -t olivierkorach/sonar-tools:3.4 -t olivierkorach/sonar-tools:latest -f snapshot.Dockerfile .
docker build -t olivierkorach/sonar-tools:3.5 -t olivierkorach/sonar-tools:latest -f snapshot.Dockerfile . --load
fi

if [ "$build_docs" == "1" ]; then
Expand All @@ -69,5 +69,5 @@ if [ "$release" = "1" ]; then
fi

if [ "$release_docker" = "1" ]; then
docker buildx build --push --platform linux/amd64,linux/arm64 -t olivierkorach/sonar-tools:3.4 -t olivierkorach/sonar-tools:latest -f release.Dockerfile .
docker buildx build --push --platform linux/amd64,linux/arm64 -t olivierkorach/sonar-tools:3.5 -t olivierkorach/sonar-tools:latest -f release.Dockerfile .
fi
File renamed without changes.
19 changes: 19 additions & 0 deletions migration/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#
# sonar-tools
# Copyright (C) 2022-2024 Olivier Korach
# mailto:olivier.korach AT gmail DOT com
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 3 of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
4 changes: 2 additions & 2 deletions deploy-migration.sh → migration/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ python3 setup_migration.py bdist_wheel
pip install --upgrade --force-reinstall dist/sonar_migration-*-py3-*.whl

if [ "$build_image" == "1" ]; then
docker build -t sonar-migration:latest -f migration.Dockerfile .
docker build -t olivierkorach/sonar-migration:latest -f migration/snapshot.Dockerfile . --load
fi

# Deploy on pypi.org once released
Expand All @@ -60,5 +60,5 @@ if [ "$release" = "1" ]; then
fi

if [ "$release_docker" = "1" ]; then
docker buildx build --push --platform linux/amd64,linux/arm64 -t olivierkorach/sonar-migration:0.1 -t olivierkorach/sonar-migration:latest -f migration-release.Dockerfile .
docker buildx build --push --platform linux/amd64,linux/arm64 -t olivierkorach/sonar-migration:0.2 -t olivierkorach/sonar-migration:latest -f migration/release.Dockerfile .
fi
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ COPY ./LICENSE .
COPY ./sonar/audit sonar/audit

RUN pip install --upgrade pip \
&& pip install sonar-migration==0.1 --force-reinstall
&& pip install sonar-migration==0.2 --force-reinstall

USER ${USERNAME}
WORKDIR /home/${USERNAME}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,16 @@ WORKDIR /opt/sonar-migration

COPY ./sonar sonar
COPY ./requirements.txt .
COPY ./migration migration
COPY ./LICENSE .
COPY ./cli cli
COPY ./setup_migration.py .
COPY ./sonar_migration .
COPY ./README.md .
COPY ./LICENSE .
COPY ./sonar/audit sonar/audit

RUN pip install --upgrade pip \
&& pip install --no-cache-dir -r requirements.txt \
&& pip install --no-cache-dir --upgrade pip setuptools wheel \
&& python setup_migration.py bdist_wheel \
&& pip install dist/sonar_migration-py3-*.whl --force-reinstall
&& pip install dist/sonar_migration-*-py3-*.whl --force-reinstall

USER ${USERNAME}
WORKDIR /home/${USERNAME}
Expand Down
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions setup_migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@
import setuptools
from sonar import version

with open("README.md", "r", encoding="utf-8") as fh:
with open("migration/README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setuptools.setup(
name="sonar-migration",
version=version.MIGRATION_TOOL_VERSION,
scripts=["sonar_migration"],
scripts=["migration/sonar_migration"],
author="Olivier Korach",
author_email="[email protected]",
description="A SonarQube collection tool to use in the context of SonarQube to SonarCloud migration",
Expand All @@ -40,7 +40,7 @@
url="https://github.com/okorach/sonar-tools",
project_urls={
"Bug Tracker": "https://github.com/okorach/sonar-tools/issues",
"Documentation": "https://github.com/okorach/sonar-tools/doc/README.sonar-migration.md",
"Documentation": "https://github.com/okorach/sonar-tools/migration/README.md",
"Source Code": "https://github.com/okorach/sonar-tools",
},
packages=setuptools.find_packages(),
Expand All @@ -59,7 +59,7 @@
],
entry_points={
"console_scripts": [
"sonar-migration = cli.migration:main",
"sonar-migration = migration.migration:main",
]
},
python_requires=">=3.8",
Expand Down
4 changes: 2 additions & 2 deletions sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ sonar.python.pylint.reportPaths=build/pylint-report.out
# sonar.python.bandit.reportPaths=build/bandit-report.json

sonar.exclusions=api-doc/**/*, build/**/*, test/**/*
sonar.coverage.exclusions=test/**/*, shellcheck2sonar.py, cli/cust_measures.py, sonar/custom_measures.py, cli/support.py, cli/projects_export.py, , cli/projects_import.py, cli/migration.py, setup*.py
sonar.cpd.exclusions = setup*.py, cli/migration.py
sonar.coverage.exclusions=setup*.py, migration/migration.py, test/**/*, shellcheck2sonar.py, cli/cust_measures.py, sonar/custom_measures.py, cli/support.py, cli/projects_export.py, , cli/projects_import.py
sonar.cpd.exclusions=setup*.py, migration/migration.py
sonar.tests=test
2 changes: 1 addition & 1 deletion test/test_migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import utilities as util
from sonar import errcodes
import cli.options as opt
from cli import migration
from migration import migration

CMD = "migration.py"
OPTS = [CMD] + util.STD_OPTS + [f"-{opt.REPORT_FILE_SHORT}", util.JSON_FILE]
Expand Down