-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integration of the toolbox.sh script and associated unit tests to install the SonarQube development environment #62
base: main
Are you sure you want to change the base?
Conversation
christopherlouet
commented
Jul 22, 2024
- Add toolbox.sh utility script for SonarQube development environment installation
- Add utils.sh script to launch toolbox commands
- Addition of the pytest framework for unit testing bash scripts
@@ -0,0 +1,336 @@ | |||
#!/usr/bin/env bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
error during execution of toolbox.sh
~/git_ecocode/ecoCode-java PR_62 ✔ ./toolbox.sh
./toolbox.sh: line 14: declare: -A: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]
Usage toolbox.sh [OPTIONS] COMMAND
Commands:
init Initialize and creating containers
start Starting Docker containers
stop Stopping Docker containers
clean Stop and remove containers, networks and volumes
build Build the ecoCode plugin
compile Compile the ecoCode plugin
build-docker Build Docker services
release Create a new release
release-push Push the new release
Options:
-l, --logs Display Docker container logs
-p, --push Push the new release
-f, --force To delete the target folder or recompile the source code
--token=<TOKEN> Creating containers with previously created token
-h, --help Display help
-v, --verbose Make the command more talkative
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
error after checking the result => no plugin deployed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The “declare: -A: invalid option” error is linked to the use of bash on macOS, which is not recent (3.2?). The shebang line “#!/usr/bin/env bash” should have used the most recent version of bash (4.0 or higher) located in /usr/local/bin/bash.
As a precaution, a correction will be made to make the array compatible with bash v3.
The documentation for this script will be updated in the README and the ecoCode-common project today.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok for correction ... but the main problem is the JAR deployment to correct
As a first step, I propose to update the script documentation directly in the README, as these new utilities are currently only used in the ecoCode-java project. |
…ent. The toolbox.sh script can now be run correctly from this container
Quality Gate passedIssues Measures |
MAVEN_BUILDER_VERSION=3-openjdk-17-slim | ||
SONARQUBE_VERSION=10.6.0-community | ||
POSTGRES_VERSION=12 | ||
DOCKER_BUILDKIT=1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
put a comment for these 2 options, please
Following on from the last point, here are the changes to be made in the future:
|
This PR has been automatically marked as stale because it has no activity for 30 days. |