Skip to content

Commit 8740688

Browse files
author
Moritz Clasmeier
committed
Use new AssembleRoxieEnvironment for setting up environment
1 parent 38a8c66 commit 8740688

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

internal/deployer/deployer.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
"github.com/stackrox/roxie/internal/k8s"
2222
"github.com/stackrox/roxie/internal/logger"
2323
"github.com/stackrox/roxie/internal/portforward"
24+
"github.com/stackrox/roxie/internal/roxieenv"
2425
"github.com/stackrox/roxie/internal/types"
2526
)
2627

@@ -704,12 +705,10 @@ func (d *Deployer) cleanupTempDir(path string, description string) {
704705

705706
func (d *Deployer) writeEnvrcFile(ctx context.Context) error {
706707
var content strings.Builder
707-
fmt.Fprintf(&content, "export API_ENDPOINT=%q\n", d.centralEndpoint)
708-
fmt.Fprintf(&content, "export ROX_ENDPOINT=%q\n", d.centralEndpoint)
709-
fmt.Fprintf(&content, "export ROX_BASE_URL='https://%s'\n", d.centralEndpoint)
710-
fmt.Fprintf(&content, "export ROX_USERNAME=%q\n", AdminUsername)
711-
fmt.Fprintf(&content, "export ROX_ADMIN_PASSWORD=%q\n", d.centralPassword)
712-
fmt.Fprintf(&content, "export ROX_CA_CERT_FILE=%q\n", d.roxCACertFile)
708+
for name, val := range roxieenv.AssembleRoxieEnvironment(d.GetCentralDeploymentInfo()).Export() {
709+
fmt.Fprintf(&content, "export %s=%q\n", name, val)
710+
}
711+
713712
if d.portForwardPID != 0 {
714713
fmt.Fprintf(&content, "export ROXIE_PORT_FORWARD_PID=%d\n", d.portForwardPID)
715714
}

0 commit comments

Comments
 (0)