Compare commits

...

3 Commits

Author SHA1 Message Date
056795e73f Revert "type hint"
Some checks failed
Lint Checks / Run linter (pull_request) Successful in 37s
Webapp Test / Run webapp test suite (pull_request) Failing after 5m9s
Deploy Test / Run deploy test suite (pull_request) Successful in 6m10s
Smoke Test / Run basic test suite (pull_request) Successful in 4m7s
K8s Deploy Test / Run deploy test suite on kind/k8s (pull_request) Failing after 15m28s
K8s Deployment Control Test / Run deployment control suite on kind/k8s (pull_request) Failing after 15m38s
This reverts commit f238078940.
2024-10-15 16:39:58 +08:00
f238078940 type hint
Some checks failed
Lint Checks / Run linter (pull_request) Successful in 33s
Deploy Test / Run deploy test suite (pull_request) Failing after 1m18s
K8s Deploy Test / Run deploy test suite on kind/k8s (pull_request) Failing after 1m16s
K8s Deployment Control Test / Run deployment control suite on kind/k8s (pull_request) Failing after 1m17s
Webapp Test / Run webapp test suite (pull_request) Failing after 1m31s
Smoke Test / Run basic test suite (pull_request) Failing after 1m24s
2024-10-15 15:58:20 +08:00
832e5c6e3c Pass --cluster option to deploy create 2024-10-15 15:35:57 +08:00
2 changed files with 5 additions and 3 deletions

View File

@ -422,9 +422,10 @@ def _copy_files_to_directory(file_paths: List[Path], directory: Path):
copy(path, os.path.join(directory, os.path.basename(path)))
def _create_deployment_file(deployment_dir: Path):
def _create_deployment_file(deployment_dir: Path, cluster):
deployment_file_path = deployment_dir.joinpath(constants.deployment_file_name)
cluster = f"{constants.cluster_name_prefix}{token_hex(8)}"
if cluster is None:
cluster = f"{constants.cluster_name_prefix}{token_hex(8)}"
with open(deployment_file_path, "w") as output_file:
output_file.write(f"{constants.cluster_id_key}: {cluster}\n")
@ -473,7 +474,7 @@ def create_operation(deployment_command_context, spec_file, deployment_dir, netw
# Copy spec file and the stack file into the deployment dir
copyfile(spec_file, deployment_dir_path.joinpath(constants.spec_file_name))
copyfile(stack_file, deployment_dir_path.joinpath(constants.stack_file_name))
_create_deployment_file(deployment_dir_path)
_create_deployment_file(deployment_dir_path, deployment_command_context.cluster_context.cluster)
# Copy any config varibles from the spec file into an env file suitable for compose
_write_config_file(spec_file, deployment_dir_path.joinpath(constants.config_file_name))
# Copy any k8s config file into the deployment dir

View File

@ -92,6 +92,7 @@ def create_deployment(ctx, deployment_dir, image, url, kube_config, image_regist
spec_file_name,
deployment_dir,
None,
None,
None
)
# Fix up the container tag inside the deployment compose file