Skip to content

Commit

Permalink
Satisfy validators, enable template config validation (SatelliteQE#15932
Browse files Browse the repository at this point in the history
)

* Satisfy validators, enable template config validation

Plus make the local settings file work by adding dynaconf_merge and
root_path

* Update conf/rh_cloud.yaml.template

Co-authored-by: Jake Callahan <[email protected]>

---------

Co-authored-by: Jake Callahan <[email protected]>
  • Loading branch information
ogajduse and JacobCallahan authored Aug 20, 2024
1 parent 3d4eac2 commit 81071b3
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 4 deletions.
1 change: 0 additions & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ env:
PYCURL_SSL_LIBRARY: openssl
ROBOTTELO_BUGZILLA__API_KEY: ${{ secrets.BUGZILLA_KEY }}
ROBOTTELO_JIRA__API_KEY: ${{ secrets.JIRA_KEY }}
ROBOTTELO_ROBOTTELO__SETTINGS__IGNORE_VALIDATION_ERRORS: true

jobs:
codechecks:
Expand Down
2 changes: 1 addition & 1 deletion conf/capsule.yaml.template
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ CAPSULE:
OS: deploy-rhel # workflow to deploy OS that is ready to run the product
# Dictionary of arguments which should be passed along to the deploy workflow
DEPLOY_ARGUMENTS:
# deploy_network_type: '@jinja {{"ipv6" if this.server.is_ipv6 else "ipv4"}}'
deploy_network_type: '@jinja {{"ipv6" if this.server.is_ipv6 else "ipv4"}}'
4 changes: 2 additions & 2 deletions conf/gce.yaml.template
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
GCE:
# Google Provider as Compute Resource
# client json Certificate path which is local path on satellite
CERT_PATH: /path/to/certificate.json
CERT_PATH: /usr/share/foreman/path/to/certificate.json
# Zones
ZONE: example-zone
ZONE: northamerica-northeast1-a
# client certificate
CERT: "{}" # client json Certificate
1 change: 1 addition & 0 deletions conf/rh_cloud.yaml.template
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
RH_CLOUD:
TOKEN: this-isnt-the-token
INSTALL_RHC: false
ORGANIZATION: org_name
ACTIVATION_KEY: ak_name
Expand Down
1 change: 1 addition & 0 deletions robottelo/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def get_settings():
settings = LazySettings(
envvar_prefix="ROBOTTELO",
core_loaders=["YAML"],
root_path=str(robottelo_root_dir),
settings_file="settings.yaml",
preload=["conf/*.yaml"],
includes=["settings.local.yaml", ".secrets.yaml", ".secrets_*.yaml"],
Expand Down
5 changes: 5 additions & 0 deletions settings.sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
# example:
# `export SATQE_SERVER__HOSTNAME=myserver.redhat.com`
---

# merge settings from this file with the files that were preloaded from the conf/ directory
# see: https://www.dynaconf.com/merging/
dynaconf_merge: true

server:
admin_password: "<str>"
admin_username: "<str>"
Expand Down

0 comments on commit 81071b3

Please sign in to comment.