Commit 2a4314e6 authored by Christian Kuhn's avatar Christian Kuhn
Browse files

[TASK] Add sec repo handling

parent dbce08a5
......@@ -153,6 +153,7 @@ write_files:
RABBITMQ_PASSWORD="${gerrit_adapter_rabbitmq_pass}"
GERRIT_TOKEN="${gerrit_adapter_gerrit_token}"
GERRIT_AUTHORIZATION="${gerrit_adapter_gerrit_authorization}"
GERRIT_AUTHORIZATION_SECURITY="${gerrit_adapter_gerrit_authorization_security}"
RABBITMQ_HOST="${gerrit_adapter_rabbitmq_host}"
USER_HOME="${gerrit_adapter_user_home}"
SLACK_HOOK="${gerrit_adapter_slack_hook}"
......@@ -163,6 +164,12 @@ write_files:
content: |
${gerrit_adapter_git_ssh_private_key}
- owner: 'root:root'
path: /root/gerrit_adapter_git_ssh_security_private_key
encoding: "base64"
content: |
${gerrit_adapter_git_ssh_security_private_key}
- owner: 'root:root'
path: /root/install.sh
content: |
......@@ -179,6 +186,7 @@ write_files:
git clone https://gitlab.typo3.org/core-testing/gerrit-adapter.git
cp /root/.env.local gerrit-adapter/
cp /root/gerrit_adapter_git_ssh_private_key /export/gerrit-adapter/keys/id_rsa
cp /root/gerrit_adapter_git_ssh_security_private_key /export/gerrit-adapter/keys/security_id_rsa
chmod 600 /export/gerrit-adapter/keys/id_rsa
docker run --rm --entrypoint /bin/sh -v /export/gerrit-adapter/:/srv php:7.4-fpm-alpine-local -c "cd /srv && composer install --no-dev --no-progress --no-interaction"
# uid/gid of www-data in php image
......
......@@ -37,10 +37,12 @@ data "template_file" "gerrit_adapter_cloudinit" {
gerrit_adapter_rabbitmq_pass = var.gerrit_adapter_rabbitmq_pass
gerrit_adapter_gerrit_token = var.gerrit_adapter_gerrit_token
gerrit_adapter_gerrit_authorization = var.gerrit_adapter_gerrit_authorization
gerrit_adapter_gerrit_authorization_security = var.gerrit_adapter_gerrit_authorization_security
gerrit_adapter_user_home = var.gerrit_adapter_user_home
gerrit_adapter_app_secret = var.gerrit_adapter_app_secret
gerrit_adapter_app_url = var.gerrit_adapter_app_url
gerrit_adapter_git_ssh_private_key = base64encode(var.gerrit_adapter_git_ssh_private_key)
gerrit_adapter_git_ssh_security_private_key = base64encode(var.gerrit_adapter_git_ssh_security_private_key)
gerrit_adapter_slack_hook = var.gerrit_adapter_slack_hook
}
}
......
......@@ -4,8 +4,10 @@ variable "gerrit_adapter_rabbitmq_user" {}
variable "gerrit_adapter_rabbitmq_pass" {}
variable "gerrit_adapter_gerrit_token" {}
variable "gerrit_adapter_gerrit_authorization" {}
variable "gerrit_adapter_gerrit_authorization_security" {}
variable "gerrit_adapter_user_home" {}
variable "gerrit_adapter_app_secret" {}
variable "gerrit_adapter_app_url" {}
variable "gerrit_adapter_git_ssh_private_key" {}
variable "gerrit_adapter_git_ssh_security_private_key" {}
variable "gerrit_adapter_slack_hook" {}
\ No newline at end of file
......@@ -14,6 +14,7 @@ variable "gerrit_adapter_rabbitmq_user" {}
variable "gerrit_adapter_rabbitmq_pass" {}
variable "gerrit_adapter_gerrit_token" {}
variable "gerrit_adapter_gerrit_authorization" {}
variable "gerrit_adapter_gerrit_authorization_security" {}
variable "gerrit_adapter_user_home" {}
variable "gerrit_adapter_app_secret" {}
variable "gerrit_adapter_app_url" {}
......@@ -39,9 +40,11 @@ module "gerrit-adapter" {
gerrit_adapter_rabbitmq_pass = var.gerrit_adapter_rabbitmq_pass
gerrit_adapter_gerrit_token = var.gerrit_adapter_gerrit_token
gerrit_adapter_gerrit_authorization = var.gerrit_adapter_gerrit_authorization
gerrit_adapter_gerrit_authorization_security = var.gerrit_adapter_gerrit_authorization_security
gerrit_adapter_user_home = var.gerrit_adapter_user_home
gerrit_adapter_app_secret = var.gerrit_adapter_app_secret
gerrit_adapter_app_url = var.gerrit_adapter_app_url
gerrit_adapter_git_ssh_private_key = trimspace(file("keys/gerrit_adapter_git_ssh_private_key_id_rsa"))
gerrit_adapter_git_ssh_security_private_key = trimspace(file("keys/gerrit_adapter_security_git_ssh_private_key_id_rsa"))
gerrit_adapter_slack_hook = var.gerrit_adapter_slack_hook
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment