Skip to content

Commit

Permalink
Modified testing and added CHANGELOG
Browse files Browse the repository at this point in the history
  • Loading branch information
jeronimolina committed Jun 4, 2024
1 parent d7262de commit b6e0d08
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 33 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
### Changed
- Update SonarQube to 9.9.5 and configure resources for Nexus and Sonarqube in ods-configuration ([#1283](https://github.com/opendevstack/ods-core/pull/1283))
- Update Nexus to 3.68.1-java11 to address a critical vulnerability ([#1286](https://github.com/opendevstack/ods-core/pull/1286))

- Removed NEXUS_USERNAME and NEXUS_PASSWORD on Jenkins DeploymentConfig as are no longer used ([#1289]https://github.com/opendevstack/ods-core/pull/1289)
## [4.4.0] - 2024-04-22

### Fixed
Expand Down
28 changes: 0 additions & 28 deletions nexus/configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ echo_info(){
ADMIN_USER="admin"
ADMIN_DEFAULT_PASSWORD=
ADMIN_PASSWORD=
DEVELOPER_PASSWORD=
NEXUS_URL=
LOCAL_CONTAINER_ID=
NAMESPACE="ods"
Expand Down Expand Up @@ -64,9 +63,6 @@ while [[ "$#" -gt 0 ]]; do
-a|--admin-password) ADMIN_PASSWORD="$2"; shift;;
-a=*|--admin-password=*) ADMIN_PASSWORD="${1#*=}";;

-d|--developer-password) DEVELOPER_PASSWORD="$2"; shift;;
-d=*|--developer-password=*) DEVELOPER_PASSWORD="${1#*=}";;

-n|--nexus) NEXUS_URL="$2"; shift;;
-n=*|--nexus=*) NEXUS_URL="${1#*=}";;

Expand Down Expand Up @@ -103,25 +99,6 @@ if [ -z "${ADMIN_PASSWORD}" ]; then
ADMIN_PASSWORD=${input:-""}
fi

if [ -z "${DEVELOPER_PASSWORD}" ]; then
if [ -f "${ODS_CORE_DIR}/../ods-configuration/ods-core.env" ]; then
echo_info "Configuration located, checking if password is changed from sample value"
samplePassword=$(grep NEXUS_PASSWORD_B64 "${ODS_CORE_DIR}/configuration-sample/ods-core.env.sample" | cut -d "=" -f 2-)
configuredPassword=$(grep NEXUS_PASSWORD_B64 "${ODS_CORE_DIR}/../ods-configuration/ods-core.env" | cut -d "=" -f 2- | base64 --decode)
if [ "${configuredPassword}" == "${samplePassword}" ]; then
echo_info "Developer password in ods-configuration/ods-core.env is the sample value"
else
echo_info "Setting developer password from ods-configuration/ods-core.env"
DEVELOPER_PASSWORD=${configuredPassword}
fi
fi
if [ -z "${DEVELOPER_PASSWORD}" ]; then
echo "Please enter Nexus developer password:"
read -r -e -s input
DEVELOPER_PASSWORD=${input:-""}
fi
fi

function waitForReady {
echo_info "Wait for Nexus to become responsive"
set +e
Expand Down Expand Up @@ -259,11 +236,6 @@ runJsonScript "deactivateAnonymous"
echo_info "Setup developer role"
runJsonScript "createRole" "-d @json/developer-role.json"

echo_info "Setup developer user"
sed "s|@developer_password@|${DEVELOPER_PASSWORD}|g" json/developer-user.json > json/developer-user-with-password.json
runJsonScript "createUser" "-d @json/developer-user-with-password.json"
rm json/developer-user-with-password.json

if [ -z "${LOCAL_CONTAINER_ID}" ]; then
changeScriptSetting "false"
waitForReady
Expand Down
4 changes: 0 additions & 4 deletions nexus/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ function usage {

VERIFY_ONLY=false
ADMIN_PASSWORD=
DEVELOPER_PASSWORD=
PROMPTS=true
INSECURE=""

Expand All @@ -42,9 +41,6 @@ while [[ "$#" -gt 0 ]]; do
-a|--admin-password) ADMIN_PASSWORD="$2"; shift;;
-a=*|--admin-password=*) ADMIN_PASSWORD="${1#*=}";;

-d|--developer-password) DEVELOPER_PASSWORD="$2"; shift;;
-d=*|--developer-password=*) DEVELOPER_PASSWORD="${1#*=}";;

-s|--nexus-image) NEXUS_IMAGE="$2"; shift;;
-s=*|--nexus-image=*) NEXUS_IMAGE="${1#*=}";;

Expand Down

0 comments on commit b6e0d08

Please sign in to comment.