Skip to content

Commit 476d30e

Browse files
authored
Merge pull request #1364 from okorach:migration-dedicated-directory
sonar-migration dedicated directory
2 parents a377617 + 7a2ef47 commit 476d30e

File tree

12 files changed

+34
-17
lines changed

12 files changed

+34
-17
lines changed

deploy.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ python3 setup.py bdist_wheel
5151
pip install --upgrade --force-reinstall dist/sonar_tools-*-py3-*.whl
5252

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

5757
if [ "$build_docs" == "1" ]; then
@@ -69,5 +69,5 @@ if [ "$release" = "1" ]; then
6969
fi
7070

7171
if [ "$release_docker" = "1" ]; then
72-
docker buildx build --push --platform linux/amd64,linux/arm64 -t olivierkorach/sonar-tools:3.4 -t olivierkorach/sonar-tools:latest -f release.Dockerfile .
72+
docker buildx build --push --platform linux/amd64,linux/arm64 -t olivierkorach/sonar-tools:3.5 -t olivierkorach/sonar-tools:latest -f release.Dockerfile .
7373
fi
File renamed without changes.

migration/__init__.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#
2+
# sonar-tools
3+
# Copyright (C) 2022-2024 Olivier Korach
4+
# mailto:olivier.korach AT gmail DOT com
5+
#
6+
# This program is free software; you can redistribute it and/or
7+
# modify it under the terms of the GNU Lesser General Public
8+
# License as published by the Free Software Foundation; either
9+
# version 3 of the License, or (at your option) any later version.
10+
#
11+
# This program is distributed in the hope that it will be useful,
12+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14+
# Lesser General Public License for more details.
15+
#
16+
# You should have received a copy of the GNU Lesser General Public License
17+
# along with this program; if not, write to the Free Software Foundation,
18+
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19+
#

deploy-migration.sh renamed to migration/deploy.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ python3 setup_migration.py bdist_wheel
4747
pip install --upgrade --force-reinstall dist/sonar_migration-*-py3-*.whl
4848

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

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

6262
if [ "$release_docker" = "1" ]; then
63-
docker buildx build --push --platform linux/amd64,linux/arm64 -t olivierkorach/sonar-migration:0.1 -t olivierkorach/sonar-migration:latest -f migration-release.Dockerfile .
63+
docker buildx build --push --platform linux/amd64,linux/arm64 -t olivierkorach/sonar-migration:0.2 -t olivierkorach/sonar-migration:latest -f migration/release.Dockerfile .
6464
fi
File renamed without changes.

migration-release.Dockerfile renamed to migration/release.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ COPY ./LICENSE .
3131
COPY ./sonar/audit sonar/audit
3232

3333
RUN pip install --upgrade pip \
34-
&& pip install sonar-migration==0.1 --force-reinstall
34+
&& pip install sonar-migration==0.2 --force-reinstall
3535

3636
USER ${USERNAME}
3737
WORKDIR /home/${USERNAME}

migration-snapshot.Dockerfile renamed to migration/snapshot.Dockerfile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,16 @@ WORKDIR /opt/sonar-migration
2323

2424
COPY ./sonar sonar
2525
COPY ./requirements.txt .
26+
COPY ./migration migration
27+
COPY ./LICENSE .
2628
COPY ./cli cli
2729
COPY ./setup_migration.py .
28-
COPY ./sonar_migration .
29-
COPY ./README.md .
30-
COPY ./LICENSE .
31-
COPY ./sonar/audit sonar/audit
3230

3331
RUN pip install --upgrade pip \
3432
&& pip install --no-cache-dir -r requirements.txt \
3533
&& pip install --no-cache-dir --upgrade pip setuptools wheel \
3634
&& python setup_migration.py bdist_wheel \
37-
&& pip install dist/sonar_migration-py3-*.whl --force-reinstall
35+
&& pip install dist/sonar_migration-*-py3-*.whl --force-reinstall
3836

3937
USER ${USERNAME}
4038
WORKDIR /home/${USERNAME}
File renamed without changes.
File renamed without changes.

setup_migration.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@
2626
import setuptools
2727
from sonar import version
2828

29-
with open("README.md", "r", encoding="utf-8") as fh:
29+
with open("migration/README.md", "r", encoding="utf-8") as fh:
3030
long_description = fh.read()
3131
setuptools.setup(
3232
name="sonar-migration",
3333
version=version.MIGRATION_TOOL_VERSION,
34-
scripts=["sonar_migration"],
34+
scripts=["migration/sonar_migration"],
3535
author="Olivier Korach",
3636
author_email="[email protected]",
3737
description="A SonarQube collection tool to use in the context of SonarQube to SonarCloud migration",
@@ -40,7 +40,7 @@
4040
url="https://github.com/okorach/sonar-tools",
4141
project_urls={
4242
"Bug Tracker": "https://github.com/okorach/sonar-tools/issues",
43-
"Documentation": "https://github.com/okorach/sonar-tools/doc/README.sonar-migration.md",
43+
"Documentation": "https://github.com/okorach/sonar-tools/migration/README.md",
4444
"Source Code": "https://github.com/okorach/sonar-tools",
4545
},
4646
packages=setuptools.find_packages(),
@@ -59,7 +59,7 @@
5959
],
6060
entry_points={
6161
"console_scripts": [
62-
"sonar-migration = cli.migration:main",
62+
"sonar-migration = migration.migration:main",
6363
]
6464
},
6565
python_requires=">=3.8",

0 commit comments

Comments
 (0)