diff --git a/roles/artemis/defaults/main.yml b/roles/artemis/defaults/main.yml index f32d6b7..00a546d 100644 --- a/roles/artemis/defaults/main.yml +++ b/roles/artemis/defaults/main.yml @@ -144,6 +144,9 @@ artemis_external_password_reset_link_de: "https://campus.tum.de/tumonline/ee/ui/ # user: # An artemis admin user for the local version control system # password: # The password of the artemis admin user for the local version control system # ssh_key_path: /opt/artemis/ssh-keys + # build_agent_git_credentials: + # user: + # password: # #continuous_integration: # bamboo: diff --git a/roles/artemis/templates/application-prod.yml.j2 b/roles/artemis/templates/application-prod.yml.j2 index bf1e1d7..7d3e566 100644 --- a/roles/artemis/templates/application-prod.yml.j2 +++ b/roles/artemis/templates/application-prod.yml.j2 @@ -178,8 +178,14 @@ artemis: url: {{ version_control.localvc.url }} local-vcs-repo-path: {{ version_control.localvc.repo_storage_base_path }} default-branch: {{ artemis_version_control_default_branch_name }} +{% if artemis_computed_is_core_node or version_control.localvc.build_agent_git_credentials is not defined %} user: {{ artemis_internal_admin_user }} password: {{ artemis_internal_admin_password }} +{% endif %} +{% if version_control.localvc.build_agent_git_credentials is defined %} + build-agent-git-username: {{ version_control.localvc.build_agent_git_credentials.user }} + build-agent-git-password: {{ version_control.localvc.build_agent_git_credentials.password }} +{% endif %} {% if version_control.localvc.ssh_key_path is defined and version_control.localvc.ssh_key_path|length > 0 %} ssh-host-key-path: {{ version_control.localvc.ssh_key_path }} {% endif %} diff --git a/roles/artemis/templates/artemis.env.j2 b/roles/artemis/templates/artemis.env.j2 index b667cce..75da4da 100644 --- a/roles/artemis/templates/artemis.env.j2 +++ b/roles/artemis/templates/artemis.env.j2 @@ -132,8 +132,14 @@ ARTEMIS_CONTINUOUSINTEGRATION_ARTEMISAUTHENTICATIONTOKENVALUE='{{ continuous_int {% if version_control.localvc is defined %} ARTEMIS_VERSIONCONTROL_URL='{{ version_control.localvc.url }}' ARTEMIS_VERSIONCONTROL_LOCALVCSREPOPATH='{{ artemis_repo_basepath }}/local-vcs-repos' -ARTEMIS_VERSIONCONTROL_USER='demo' -ARTEMIS_VERSIONCONTROL_PASSWORD='demo' +{% if artemis_computed_is_core_node or version_control.localvc.build_agent_git_credentials is not defined %} +ARTEMIS_VERSIONCONTROL_USER='{{ artemis_internal_admin_user }}' +ARTEMIS_VERSIONCONTROL_PASSWORD='{{ artemis_internal_admin_password }}' +{% endif %} +{% if version_control.localvc.build_agent_git_credentials is defined %} +ARTEMIS_VERSIONCONTROL_BUILDAGENTGITUSERNAME='{{ version_control.localvc.build_agent_git_credentials.user }}' +ARTEMIS_VERSIONCONTROL_BUILDAGENTGITPASSWORD='{{ version_control.localvc.build_agent_git_credentials.password }}' +{% endif %} {% if version_control.localvc.ssh_key_path is defined and version_control.localvc.ssh_key_path|length > 0 %} ARTEMIS_VERSIONCONTROL_SSHHOSTKEYPATH='{{ artemis_repo_basepath }}/ssh-keys' {% endif %}