Skip to content

Commit

Permalink
Pass in initial admin password in jenkins verification library
Browse files Browse the repository at this point in the history
Signed-off-by: Derek Ho <[email protected]>
  • Loading branch information
derek-ho committed Dec 18, 2023
1 parent 16c4bf3 commit 4ab9390
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions vars/rpmDashboardsDistValidation.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def call(Map args = [:]) {

//Start the installed OpenSearch-Dashboards distribution
systemdCommands(
command: "start",
command: "sudo env OPENSEARCH_INITIAL_ADMIN_PASSWORD=myStrongPassword123! start",
product: "opensearch"
)
systemdCommands(
Expand All @@ -84,12 +84,12 @@ def call(Map args = [:]) {
if (osd_status_json != 0) {
sleep 10
osd_status_json = sh (
script: "curl -s \"http://localhost:5601/api/status\" -u admin:admin",
script: "curl -s \"http://localhost:5601/api/status\" -u admin:myStrongPassword123!",
returnStatus: true
)
} else {
osd_status_json = sh (
script: "curl -s \"http://localhost:5601/api/status\" -u admin:admin",
script: "curl -s \"http://localhost:5601/api/status\" -u admin:myStrongPassword123!",
returnStdout: true
).trim()
break
Expand Down
4 changes: 2 additions & 2 deletions vars/rpmOpenSearchDistValidation.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def call(Map args = [:]) {
//Install OpenSearch with designated version via yum
println("Start installation with yum.")
rpmCommands(
command: "install",
command: "sudo env OPENSEARCH_INITIAL_ADMIN_PASSWORD=myStrongPassword123! install",
product: "$name-$rpmVersion"
)
println("RPM distribution for $name is installed with yum.")
Expand Down Expand Up @@ -103,7 +103,7 @@ def call(Map args = [:]) {

//Check the starting cluster
def cluster_info_json = sh (
script: "curl -s \"https://localhost:9200\" -u admin:admin --insecure",
script: "curl -s \"https://localhost:9200\" -u admin:myStrongPassword123! --insecure",
returnStdout: true
).trim()
println("Cluster info is: \n" + cluster_info_json)
Expand Down

0 comments on commit 4ab9390

Please sign in to comment.