From 558df580576400912d2fc5c5c4a1b569cecc43fd Mon Sep 17 00:00:00 2001 From: hahn <axel.hahn@iml.unibe.ch> Date: Wed, 27 Jul 2022 13:31:25 +0200 Subject: [PATCH] add config_custom.php.erb --- hooks/templates/config_custom.php.erb | 114 ++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 hooks/templates/config_custom.php.erb diff --git a/hooks/templates/config_custom.php.erb b/hooks/templates/config_custom.php.erb new file mode 100644 index 00000000..7e6a81cd --- /dev/null +++ b/hooks/templates/config_custom.php.erb @@ -0,0 +1,114 @@ +<?php +/* + * TARGET: config/config_custom.php.php + * ---------------------------------------------------------------------- + * CUSTOM SETTINGS + * + * Settings here override defaults from config_defaults.php + * + */ +return [ + + 'lang' => '<%= @replace["lang"] %>', // for available languages see ./config/lang/*.json + + 'auth' => [ + // force using a given user ... for development only + 'forceuser' => false, + + // use a real login + 'ldap' => [ + 'server' => '<%= @replace["ldap-url"] %>', + 'port' => <%= @replace["ldap-port"] %>, + 'DnLdapUser' => '<%= @replace["ldap-user"] %>', + 'PwLdapUser' => '<%= @replace["ldap-password"] %>', + 'DnUserNode' => '<%= @replace["ldap-dn-user"] %>', + 'DnAppNode' => '<%= @replace["ldap-cn-apps"] %><%= @replace["ldap-dn-apps"] %>', + 'debugLevel' => 0, + ] + ], + + // ---------------------------------------------------------------------- + + 'phases' => [ + "preview" => [], + "stage" => [], + "live" => [ + // prevent immediate installation after build or accept + "deploytimes" => ['<%= @replace["deploytimes-live"] %>'], + ], + ], + 'showdebug' => [ + 'ip'=> [<%= @replace["debug-ips"] %>], + ], + + 'projectgroups' => [<%= @replace["projectgroups"] %>], + + // ---------------------------------------------------------------------- + // build settings + // ---------------------------------------------------------------------- + 'versionsToKeep' => <%= @replace["versions-to-keep"] %>, // for cleanup: keep n unused versions + 'builtsToKeep' => <%= @replace["builds-to-keep"] %>, + 'build' => [ + 'env' => 'export RVMSCRIPT="/usr/local/rvm/scripts/rvm";', + 'hooks' => [ + 'build-postclone' => 'hooks/onbuild-postclone', + 'build-precompress' => 'hooks/onbuild', + ], + ], + + // ---------------------------------------------------------------------- + // sync of archives + // ---------------------------------------------------------------------- + 'mirrorPackages' => [<%= @replace["mirror-packages"] %>], + + // ---------------------------------------------------------------------- + // plugins + // existing subkeys = enabled plugins + // ---------------------------------------------------------------------- + 'plugins'=>[ + + 'rollout'=>[ + 'default'=>[], + 'ssh'=>[ + 'user'=>'<%= @replace["rollout-ssh-user"] %>', + 'privatekey'=>'', + 'addkeycommand'=>'/usr/bin/ssh-keygen -R %s; /usr/bin/ssh-keyscan -t rsa %s >> /home/www-data/.ssh/known_hosts', + 'testcommand'=>'<%= @replace["rollout-ssh-testcommand"] %>', + 'command'=>'<%= @replace["rollout-ssh-command"] %>', + ], + 'awx'=>[ + 'url'=>'<%= @replace["rollout-axw-url"] %>', // no ending "/" + 'user'=>'<%= @replace["rollout-axw-user"] %>', + 'password'=>'<%= @replace["rollout-axw-password"] %>', + 'jobtemplate'=>'<%= @replace["rollout-axw-jobtemplate"] %>', + 'tags'=>'<%= @replace["rollout-axw-tags"] %>', + // 'ignore-ssl-error'=>false, + ], + ], + ], + + // ---------------------------------------------------------------------- + // notifications to messengers ... + // ---------------------------------------------------------------------- + + // notifications to messengers ... + 'messenger'=>[ + 'slack'=>[ + 'presets'=>[<%= @replace["messenger-slack-presets"] %>], + ], + 'email'=>[ + 'from'=>[<%= @replace["messenger-email-from"] %>], + ], + ], + + 'foreman' => array( + 'api'=>'<%= @replace["foreman-url"] %>', // with ending "/" + 'user'=>'<%= @replace["foreman-user"] %>', + 'password'=>'<%= @replace["foreman-password"] %>', + 'ignore-ssl-error'=><%= @replace["ignore-ssl-error"] %>, + // 'varname-replace'=>'ci-replacement', + ), + + // ---------------------------------------------------------------------- + +]; \ No newline at end of file -- GitLab