mzcompose.py 942 B

1234567891011121314151617181920212223242526272829
  1. # Copyright Materialize, Inc. and contributors. All rights reserved.
  2. #
  3. # Use of this software is governed by the Business Source License
  4. # included in the LICENSE file at the root of this repository.
  5. #
  6. # As of the Change Date specified in that file, in accordance with
  7. # the Business Source License, use of this software will be governed
  8. # by the Apache License, Version 2.0.
  9. import os
  10. from materialize.mz_env_util import get_cloud_hostname
  11. from materialize.mzcompose.composition import Composition, WorkflowArgumentParser
  12. from materialize.mzcompose.services.mz import Mz
  13. SERVICES = [
  14. Mz(app_password=""),
  15. ]
  16. def workflow_default(c: Composition, parser: WorkflowArgumentParser) -> None:
  17. parser.add_argument("--app-password-env-var", type=str)
  18. args = parser.parse_args()
  19. app_password = os.environ[args.app_password_env_var]
  20. hostname = get_cloud_hostname(c, app_password=app_password, quiet=True)
  21. print(hostname)