Skip to content

Commit

Permalink
Merge pull request #241 from LinuxSuRen/improve-passwd-update
Browse files Browse the repository at this point in the history
Avoid to set the password of Jenkins to be empty
  • Loading branch information
ks-ci-bot committed Nov 24, 2021
2 parents 64e21cc + 051f862 commit 65fad1a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion kubectl-plugin/config/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,13 @@ func (o *migrateOption) runE(cmd *cobra.Command, args []string) (err error) {
}

var password string
if password, err = o.getDevOpsPassword(); err == nil {
if password, err = o.getDevOpsPassword(); password == "" {
if err == nil {
err = fmt.Errorf("the password of Jenkins is empty")
} else {
err = fmt.Errorf("the password of Jenkins is empty, it might caused by: %v", err)
}
} else if err == nil {
err = o.updateKubeSphereConfig("devops-config", o.namespace, map[string]interface{}{
"password": password,
})
Expand Down

0 comments on commit 65fad1a

Please sign in to comment.