73 lines
3.0 KiB
Plaintext
73 lines
3.0 KiB
Plaintext
|
|
load('ext://dotenv', 'dotenv')
|
|
load('libs/go/Tiltfile', 'deploy_go')
|
|
dotenv()
|
|
|
|
allowed_k8s_context = os.environ.get('ALLOWED_K8S_CONTEXT', 'rancher-desktop')
|
|
|
|
parcoursmob_dir = os.environ.get('PARCOURSMOB_DIR', 'src/parcoursmob')
|
|
parcoursmob_theme_dir = os.environ.get('PARCOURSMOB_THEME_DIR', 'src/parcoursmob/themes/default')
|
|
mobility_accounts_dir = os.environ.get('MOBILITY_ACCOUNTS_DIR', 'src/mobility-accounts')
|
|
agenda_dir = os.environ.get('AGENDA_DIR', 'src/agenda')
|
|
fleets_dir = os.environ.get('FLEETS_DIR', 'src/fleets')
|
|
groups_management_dir = os.environ.get('GROUPS_MANAGEMENT_DIR', 'src/groups-management')
|
|
|
|
parcoursmob_image = os.environ.get('PARCOURSMOB_IMAGE', 'git.coopgo.io/coopgo-apps/parcoursmob')
|
|
mobility_accounts_image = os.environ.get('MOBILITY_ACCOUNTS_IMAGE', 'git.coopgo.io/coopgo-platform/mobility-accounts')
|
|
agenda_image = os.environ.get('AGENDA_IMAGE', 'git.coopgo.io/coopgo-platform/agenda')
|
|
fleets_image = os.environ.get('FLEETS_IMAGE', 'git.coopgo.io/coopgo-platform/fleets')
|
|
groups_management_image = os.environ.get('GROUPS_MANAGEMENT_IMAGE', 'git.coopgo.io/coopgo-platform/groups-management')
|
|
|
|
k8s_config = os.environ.get('K8S_CONFIG', 'k8s_config/dev')
|
|
smtp4dev_local_port = os.environ.get("SMTP4DEV_LOCAL_PORT", '12345')
|
|
|
|
allow_k8s_contexts(allowed_k8s_context)
|
|
|
|
|
|
if os.path.exists(parcoursmob_dir) and os.path.exists(parcoursmob_theme_dir):
|
|
parcoursmob_dir = os.path.realpath(parcoursmob_dir)
|
|
parcoursmob_theme_dir = os.path.realpath(parcoursmob_theme_dir)
|
|
|
|
print("PARCOURSMOB")
|
|
print("Directory : {dir}".format(dir=parcoursmob_dir))
|
|
print("Theme : {dir}".format(dir=parcoursmob_theme_dir))
|
|
deploy_go(
|
|
'parcoursmob',
|
|
parcoursmob_dir,
|
|
parcoursmob_image,
|
|
sync_folders=[("{src}".format(src=parcoursmob_theme_dir), 'themes/default')]
|
|
)
|
|
|
|
if os.path.exists(mobility_accounts_dir):
|
|
mobility_accounts_dir = os.path.realpath(mobility_accounts_dir)
|
|
print("MOBILITY ACCOUNTS")
|
|
print("Directory : {dir}".format(dir=mobility_accounts_dir))
|
|
deploy_go(
|
|
'mobility-accounts',
|
|
mobility_accounts_dir,
|
|
mobility_accounts_image,
|
|
sync_folders=[("{src}/oidc-provider/templates/".format(src=mobility_accounts_dir), 'oidc-provider/templates')]
|
|
)
|
|
|
|
if os.path.exists(agenda_dir):
|
|
agenda_dir = os.path.realpath(agenda_dir)
|
|
print("AGENDA")
|
|
print("Directory : {dir}".format(dir=agenda_dir))
|
|
deploy_go('agenda', agenda_dir, agenda_image)
|
|
|
|
if os.path.exists(fleets_dir):
|
|
fleets_dir = os.path.realpath(fleets_dir)
|
|
print("FLEETS")
|
|
print("Directory : {dir}".format(dir=fleets_dir))
|
|
deploy_go('fleets', fleets_dir, fleets_image)
|
|
|
|
if os.path.exists(groups_management_dir):
|
|
groups_management_dir =os.path.realpath(groups_management_dir)
|
|
print("GROUPS MANAGEMENT")
|
|
print("Directory : {dir}".format(dir=groups_management_dir))
|
|
deploy_go('groups-management', groups_management_dir, groups_management_image)
|
|
|
|
k8s_yaml(kustomize(k8s_config))
|
|
k8s_resource(workload='smtp4dev', port_forwards=smtp4dev_local_port+":80")
|
|
|