Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToon Claes <toon@gitlab.com>2023-04-12 14:33:32 +0300
committerToon Claes <toon@gitlab.com>2023-04-14 15:58:58 +0300
commit3583ade7eeb59d61332a8c6465afa9c0bbd3325f (patch)
tree1da4226bbbf9bf716870040900f6f3578041c436
parenta0dbd18268dd8829f9a705daadf1b8928a3db3c3 (diff)
ci: Build praefect config with envsubst
Instead of using Ruby, build the praefect config file with `envsubst`.
-rw-r--r--.gitlab-ci.yml2
-rwxr-xr-x_support/config.praefect.toml.ci-sql-test (renamed from _support/config.praefect.toml.ci-sql-test.erb)6
2 files changed, 4 insertions, 4 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 728df169c..695007f5b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -274,7 +274,7 @@ test:praefect_smoke:
<<: *test_definition
script:
- make -j$(nproc)
- - ruby -rerb -e 'ERB.new(ARGF.read).run' _support/config.praefect.toml.ci-sql-test.erb > config.praefect.toml
+ - envsubst < _support/config.praefect.toml.ci-sql-test > config.praefect.toml
- ./_build/bin/praefect -config config.praefect.toml sql-ping
- ./_build/bin/praefect -config config.praefect.toml sql-migrate
diff --git a/_support/config.praefect.toml.ci-sql-test.erb b/_support/config.praefect.toml.ci-sql-test
index fdd1081c1..5ac5a7963 100755
--- a/_support/config.praefect.toml.ci-sql-test.erb
+++ b/_support/config.praefect.toml.ci-sql-test
@@ -10,7 +10,7 @@ listen_addr = "127.0.0.1:2305"
[database]
# The following variables are defined in .gitlab-ci.yml.
- host = '<%= ENV['PGHOST'] %>'
- dbname = '<%= ENV['POSTGRES_DB'] %>'
- user = '<%= ENV['PGUSER'] %>'
+ host = '${PGHOST}'
+ dbname = '${POSTGRES_DB}'
+ user = '${PGUSER}'
sslmode = 'disable'