-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
14 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,34 @@ | ||
#!/usr/bin/env python3 | ||
|
||
from pathlib import Path | ||
from kubetools.docker_utils import build_and_push_img | ||
import sys | ||
from kubetools.docker_utils import build_and_push_client_img, build_and_push_server_img | ||
from kubetools.ansible_utils import load_vars | ||
|
||
root_directory = Path(__file__).parent.parent | ||
data = load_vars(root_directory / '.ansible/vault_key', root_directory / 'vars/vault.yaml') | ||
docker_username = data['docker_username'] | ||
docker_password = data['docker_password'] | ||
github_access_token = sys.argv[1] | ||
|
||
build_and_push_img( | ||
if not github_access_token: | ||
print('GitHub access token is missing', flush=True, file=sys.stderr) | ||
exit(1) | ||
|
||
build_and_push_client_img( | ||
src=root_directory / 'client', | ||
docker_context_path=root_directory / 'client', | ||
ignore=['node_modules', 'dist'], | ||
tag_prefix='client', | ||
image_name='mucsi96/training-log-pro-client', | ||
docker_username=docker_username, | ||
docker_password=docker_password | ||
docker_password=docker_password, | ||
github_access_token=github_access_token | ||
) | ||
|
||
build_and_push_img( | ||
build_and_push_server_img( | ||
src=root_directory / 'server', | ||
docker_context_path=root_directory / 'server', | ||
ignore=['target', 'dist'], | ||
tag_prefix='server', | ||
image_name='mucsi96/training-log-pro-server', | ||
docker_username=docker_username, | ||
docker_password=docker_password | ||
docker_password=docker_password, | ||
github_access_token=github_access_token | ||
) |